How to define parallel tasks dynamically?

cancel
Showing results for 
Search instead for 
Did you mean: 
Established Member

How to define parallel tasks dynamically?

Hi Team,

I am using activiti in my spring web application. I was defined one process as follows,

Here i was defined parallel tasks are three. But in my scenario, it may be one or more parallel tasks then please let me know how can i define the diagram? Please help me out this?

Thanks

13 Replies
Established Member

Re: How to define parallel tasks dynamically?

Please anyone reply me about this

Established Member

Re: How to define parallel tasks dynamically?

Go for a multi instance user task, based on a list of objects. The execution depends on the number of objects that are there in the list. 

Senior Member

Re: How to define parallel tasks dynamically?

Yeah multi instance nodes are the answer. Check the docs on how to use them. 

Established Member

Re: How to define parallel tasks dynamically?

Hi Hari,

Thank you for your reply. Please how can i get list objects in multi instance tab.

Here i was placed count ( 2 ) statically at loop cardinality. how can i dynamic this from db.

Thanks

Established Member

Re: How to define parallel tasks dynamically?

Instead of setting the loop cardinality do it something like this. 

Collection is the list on which you want to iterate upon. and Element variable is what you call an item in the list. 

Ensure the List is available by the time it reaches this(User Task, Call Activiti, etc) step for it to iterate as per your need. 

Established Member

Re: How to define parallel tasks dynamically?

Ya i tried like that. I was prepared the list one of the task listener. But It is skipping the list when users are available. please help me out of this.

Established Member

Re: How to define parallel tasks dynamically?

and list as like List<String> format. Now how can i set this.

Established Member

Re: How to define parallel tasks dynamically?

and list as like List of String format. Now how can i set this.

Established Member

Re: How to define parallel tasks dynamically?

Try doing it in a service task instead of a task listener Or start the process with the variable containing the list of values.