flowable和Activiti6新增了ad-hoc子流程(adHocSubProcess),即adHocSubProcess流程。该类型的子流程无需再子流程中为节点配置任何的出线:
操作方式如下:
runtimeService.getEnabledActivitiesFromAdhocSubProcess(executionId);
runtimeService.executeActivityInAdhocSubProcess(executionId, id);
runtimeService.completeAdhocSubProcess(executionId);
<adHocSubProcess id="adhocSubProcess" ordering="Sequential">
<
userTask
id
=
"subProcessTask"
name
=
"Task in subprocess"
/>
<userTask id="subProcessTask2" name="Task2 in subprocess" />
<completionCondition>${completed}</completionCondition>
</adHocSubProcess>
关于
ad-hoc子流程的更多使用可以参考http://www.shareniu.com/article/25.htm