cancel
Showing results for 
Search instead for 
Did you mean: 

How to make multiinstance task choose in runtime what to call

alper
Champ in-the-making
Champ in-the-making
Hi,
I have a paralel multiinstance task which is suppose to call outer system or child workflow.

How to make each instance of this multitask choose what to call depending on the input parameter?

Thank you.
3 REPLIES 3

pkonyves
Champ in-the-making
Champ in-the-making
From the userguide. You can tell Activiti to take the elements from a collection, and assign that element to an (execution local) variable for that instance. For example your collection can hold a list of URLs, and each service task in the multi-instance will call one.

<code>
<userTask id="miTasks" name="My Task" activiti:assignee="${assignee}">
  <multiInstanceLoopCharacteristics isSequential="true"
     activiti:collection="${myService.resolveUsersForTask()}" activiti:elementVariable="assignee" >
  </multiInstanceLoopCharacteristics>
</userTask>
</code>

alper
Champ in-the-making
Champ in-the-making
I can do that.
What I am asking is that how to implement a kind of Switch? I mean, to call different workflows depending on the input parameter?

pkonyves
Champ in-the-making
Champ in-the-making
Maybe you can use EL expression in a call activiti to determine the called process' id
http://activiti.org/userguide/#bpmnCallActivity
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.