I'm tring to understand how can distribute one task per user in BOS 6.x.
at sometime in my process i have to get the aproval from some actores id difined in a List(java.util.List) listOfUsers(global variable)
so i create a step multi-instance:
1º-General->Iterration-> i select "is Multi-Instantiated"
2º-I select "Use a Collection" and i use the listOfUsers to this field
-"input Data"- i don't now what to put in this field
-"Output Data"-i ceate a local variable a_user(java.util.Map) that recive the variables that a instance porduces in values and the key have de id of the actor that execute the task.
-"List of Output results"- i create a global variable all_users(java.util.List) that store all the maps a_user
3º- i create a group with the ids involved, and in General->Actors->"Use the actor below"->in the field "Select an actor" i put this group
the number os instances are the size of listOfUsers<- this is ok
i can store the variables of the form and associate to the user/actor that perform the task<- this is ok
one user can do all the instances of the task<- this is bad :( one user/actor should only make one instance of the task, i have read something about the use of custom actor filter but i cant produce a working filter, i hoping that in the field "input data" i can in a simple way pu the user id or the user name to solve this problem.
i realy need guidance and i hope someone can help me.
First of all let me explain what is the meaning of "Input data" field. You can define different enviroment (meant different couple variable/value) for each instance of the multi-instantiated task.
Let me switch to your case. You have a list of user that are approvers of your task. This list is process scope variable. Let me say that it contains the IDs of user (it is just to simplify). You can create a local variable on multi-instastiated task named approver. Set it as Input Data. It means that the engine will create different instance one for each id in listOfUser and will assign each value of the list to the local variable approver.
Let me explain with an example:
listOfUser: [100,102,300]
The engine will create 3 instance of the task
instance 1 -> approver=100
instance2 -> approver=102
instance3 -> approver=300
Now you can assign to the multi-instantiated task a user filter. You can use single user filter and you can use approver as parameter. It means that engine will assign each task instance at each value of approver.
Hope it can help you. If you have other doubts let me know, I coul share with you some examples.
-"Output Data"-i ceate a local variable a_user(java.util.Map) that recive the variables that a instance porduces in values and the key have de id of the actor that execute the task.
<p>
-"List of Output results"- i create a global variable all_users(java.util.List) that store all the maps a_use</p>
How do it? An example please.
Imagine I have a variable decision. The "approver" assume value of selected field of list as said by domenico.giordano (Input Data).
How can I set the Output Data (I think like [["Approver", "Alex"], ["decision“,true]], etc. each for one element of collection) and List of Output results? Script Groovy (connector on finish of the multi-instantiated task)?
I saw the example posted by domenico.girodano which used a select widget to select a group. I would like to know if it is possible to select several groups (and not juste one). I am trying to use a checkboxlist but the return type of a checkboxlist is of course a List whereas the return type of the select widget is a map.
I am trying all day to fix and see how I can arrange that but i didn’t manage.
Bonitasoft empowers development teams with Bonita, the open-source and extensible platform to solve the most demanding process automation use cases. The Bonita platform accelerates delivery of complex applications with clear separation between capabilities for visual programming and for coding. Bonita integrates with existing solutions, orchestrates heterogeneous systems, and provides deep visibility into processes across the organization.