using multi instance...
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-04-2012 08:08 AM
hi,
i have a user task which is needed to be assigned to all members of a group, so i should use multi instance , but i couldn't define collection variable properly in the designer in Eclipse, can anyone help me?! it always says "[variable name]" is not a collection!!!
how should i define this collection in Eclipse?!
i tried to create a script task , define a List<String> … but it didn't work,
use groovy and define: def Lname= ["user1", "user2"] it also didn't work…
define a new form variable Listname with value of {"user1" , "user2"} , ["user1" , "user2"] …. it didn't work too…
please help me
i have a user task which is needed to be assigned to all members of a group, so i should use multi instance , but i couldn't define collection variable properly in the designer in Eclipse, can anyone help me?! it always says "[variable name]" is not a collection!!!
how should i define this collection in Eclipse?!
i tried to create a script task , define a List<String> … but it didn't work,
use groovy and define: def Lname= ["user1", "user2"] it also didn't work…
define a new form variable Listname with value of {"user1" , "user2"} , ["user1" , "user2"] …. it didn't work too…
please help me

Labels:
- Labels:
-
Archive
5 REPLIES 5

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-05-2012 02:14 PM
Hi,
Did you try to create a List in a Java service task?
Best regards,
Did you try to create a List in a Java service task?
Best regards,
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2012 04:59 AM
oOps… thanks alot , it solved my problem..


Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-20-2012 09:24 AM
Hi soja,
Can you explain how you define the list in the Java service task?
I'm having the same problem here.
Can you explain how you define the list in the Java service task?
I'm having the same problem here.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-22-2012 05:41 AM
hi nitroin,
define a java service task , and assign a java class to this task, with the below code:
"nameList" is the variable , that you should define it , and use it in the multi instance section of the task rpopertise, which you want to run in multi instance mode.
define a java service task , and assign a java class to this task, with the below code:
package makeMYusers;
import java.util.ArrayList;
import java.util.Collection;
import org.activiti.engine.delegate.DelegateExecution;
import org.activiti.engine.delegate.JavaDelegate;
public class mylist implements JavaDelegate {
@Override
public void execute(DelegateExecution execution) throws Exception {
Collection<String> USlistName = new ArrayList<String>();
USlistName.add("name1");
USlistName.add("name2");
execution.setVariable("nameList", USlistName);
}
}
"nameList" is the variable , that you should define it , and use it in the multi instance section of the task rpopertise, which you want to run in multi instance mode.


Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-23-2012 06:09 AM
Thanks!

