调用同一部署中的子流程
True
无标题

The default behavior is that the latest deployed process definition is taken to start the referenced process. There are use cases where you would like to deploy the referenced process from the same deployment as the main process to use the same state of the referenced process at the time of the deployment. This requires that you deploy the main and the referenced process within the same deployment unit, such that the process definitions have the same reference to the deployment.

To use the referenced process from the same deployment you can set the sameDeployment attribute to true on the callActivity element like in the following example:

<callActivity id="callSubProcess" calledElement="checkCreditProcess" flowable:sameDeployment="true">
...
</callActivity>

By default the sameDeployment attribute is set to false.

Example

The following process diagram shows a simple handling of an order. As the checking of the customer’s credit could be common to many other processes, the check credit step is modeled here as a call activity.

bpmn.call.activity.super.process

The process looks as follows:

1 2 3 4 5 6 7 8 9 10 11 12 13
<startEvent id="theStart" /> <sequenceFlow id="flow1" sourceRef="theStart" targetRef="receiveOrder" /> <manualTask id="receiveOrder" name="Receive Order" /> <sequenceFlow id="flow2" sourceRef="receiveOrder" targetRef="callCheckCreditProcess" /> <callActivity id="callCheckCreditProcess" name="Check credit" calledElement="checkCreditProcess" /> <sequenceFlow id="flow3" sourceRef="callCheckCreditProcess" targetRef="prepareAndShipTask" /> <userTask id="prepareAndShipTask" name="Prepare and Ship" /> <sequenceFlow id="flow4" sourceRef="prepareAndShipTask" targetRef="end" /> <endEvent id="end" />

The sub-process looks as follows:

bpmn.call.activity.sub.process

There is nothing special about the process definition of the sub-process. It could as well be used without being called from another process.



multiple-instance
True