Start Multiple Instances of the Process using a Submit Button

1
0
-1

Hi
I need to start multiple Instances of a Process using a Click event of a Submit Button.
Each instance may or May not have the Same data passed at each instance.
The Idea was to have multiple rows for users to fill in data like name, age, city etc .
Each row may have same information or Each row may have Different information.

Scenario 1 : There are 2 Rows and each row has same information. Same info is repeated.
Then, when the user clicks on Submit, it should raise 2 separate cases with the 1st case has 1st row as Data and 2nd case has 2nd row info as Data.

Scenario 2 : There are 2 rows of Data and each row has different records.
On clicking Submit, the 1st case should be raised with the 1st row information,and the 2nd case should have the 2nd row as information or Data.

Now, I use a Living app Page(Application Page) outside portal to instantiate a process.
And there in the Submit Button, I set the Action as POST and pass values like
< return "/bonita/API/bpm/process/" + process.id +"/instantiation"; > to instantiate the process once.

What Should I be doing to raise Multiple instances ( Cases) and How to pass different set of data for each instance /case raised using a Single Button click instance.

Kindly Help

Thanks

1 answer

1
0
-1

I would do the following:

  1. Application screen submits data (in POST)
  2. Process starts and accepts data (assuming in List<>)
  3. I would then pass the data to a multi-instantiate task (sub-process) which will loop against the list which will do exactly what you want, initiate an update sub-process for every row in the list.

regards
Sean

PS: as this answer answers your question please mark as resolved

Comments

Submitted by Dibyajit.Roy on Wed, 06/28/2017 - 12:52

Hi Sean

Thanks for your reply.

There seems another way.
In the Instantiation page / form , we can provide multiple buttons and all of them have action as POST and urltoPass is same.
Each button click will generate a new Case (Process Instance) .

I am exploring this further to device a better solution but for now, this works.

Thanks and regards

Notifications