Hi,
I’ve create simple process with subprocess loop:
I would like control loop by process variable:
testLoopCondition - boolean set false after finished all execution loops
Definition subproces in definition looks:
<bpmn:subProcess id="_SubProcess" name="SubProcess" camunda:asyncBefore="true">
<bpmn:extensionElements>
<camunda:in variables="all" />
<camunda:out variables="all" />
<camunda:failedJobRetryTimeCycle>1</camunda:failedJobRetryTimeCycle>
<camunda:properties>
<camunda:property name="loopCondition" value="$(testLoopCondition1}" />
</camunda:properties>
</bpmn:extensionElements>
<bpmn:incoming>SequenceFlow_1ybwx0a</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_1x93po6</bpmn:outgoing>
<bpmn:standardLoopCharacteristics>
<bpmn:loopCondition xsi:type="bpmn:tFormalExpression">${testLoopCondition}</bpmn:loopCondition>
</bpmn:standardLoopCharacteristics>
<bpmn:startEvent id="_startSubTask" camunda:asyncBefore="true">
<bpmn:outgoing>SequenceFlow_0mlhe5u</bpmn:outgoing>
</bpmn:startEvent>
<bpmn:endEvent id="_endSubtask" camunda:asyncAfter="true">
<bpmn:incoming>SequenceFlow_17zd2oj</bpmn:incoming>
</bpmn:endEvent>
<bpmn:sequenceFlow id="SequenceFlow_0mlhe5u" sourceRef="_startSubTask" targetRef="_looperTask" />
<bpmn:sequenceFlow id="SequenceFlow_17zd2oj" sourceRef="_looperTask" targetRef="_endSubtask" />
<bpmn:serviceTask id="_looperTask" name="LooperTask" camunda:delegateExpression="${looper}">
<bpmn:extensionElements>
<camunda:inputOutput>
<camunda:outputParameter name="counter">${counter}</camunda:outputParameter>
</camunda:inputOutput>
</bpmn:extensionElements>
<bpmn:incoming>SequenceFlow_0mlhe5u</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_17zd2oj</bpmn:outgoing>
</bpmn:serviceTask>
</bpmn:subProcess>
When I’ve started this process looper task executed only one even testLoopCondition still be true.
What can I do wrong, or where can I found more information about definition loops in subprocess?
I know that this part of subproces can be recreated to:
General it’s part on bigger process for sequential send messages from list.
Regards Marcin