Prevent stage from automatically completing

I have a stage without any tasks in it. I have set a manual activation flag to true. I do not want this stage to be completed automatically. The movement I start the stage it is automatically completed. Also, the autocomplete flag is set to false for this stage.

<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/CMMN/20151109/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:flowable="http://flowable.org/cmmn" xmlns:cmmndi="http://www.omg.org/spec/CMMN/20151109/CMMNDI" xmlns:dc="http://www.omg.org/spec/CMMN/20151109/DC" xmlns:di="http://www.omg.org/spec/CMMN/20151109/DI" targetNamespace="http://www.flowable.org/casedef">
  <case id="app" name="app" flowable:initiatorVariableName="initiator">
    <casePlanModel id="casePlanModel" flowable:formFieldValidation="true">
      <planItem id="planItem1" definitionRef="sid-C4B2BFF9-23AF-4556-99F8-2B695F3FBF7A"></planItem>
      <stage id="sid-C4B2BFF9-23AF-4556-99F8-2B695F3FBF7A" flowable:autoCompleteCondition="false"></stage>
    </casePlanModel>
  </case>
  <cmmndi:CMMNDI>
    <cmmndi:CMMNDiagram id="CMMNDiagram_app">
      <cmmndi:CMMNShape id="CMMNShape_casePlanModel" cmmnElementRef="casePlanModel">
        <dc:Bounds height="714.0" width="718.0" x="40.0" y="40.0"></dc:Bounds>
        <cmmndi:CMMNLabel></cmmndi:CMMNLabel>
      </cmmndi:CMMNShape>
      <cmmndi:CMMNShape id="CMMNShape_planItem1" cmmnElementRef="planItem1">
        <dc:Bounds height="170.0" width="370.0" x="135.0" y="52.0"></dc:Bounds>
        <cmmndi:CMMNLabel></cmmndi:CMMNLabel>
      </cmmndi:CMMNShape>
    </cmmndi:CMMNDiagram>
  </cmmndi:CMMNDI>
</definitions>

CMMN specifies that a stage without any active plan item will immediately be completed. That’s what’s happening here. What’s the use case you’re tying to model?

@joram I do not want the stage to be completed as soon as all tasks are completed. I want to complete the stage manually.

But what’s the point of a stage without any elements? That’s why it now completes immediately.

There must be some event that is behind needing to “complete the stage manually”, which suggests a User event listener maybe the appropriate thing to have in the stage - which then just completes the stage. Or if by manual you mean some system trigger, then one of the other event listener types.

Cheers
Paul.

1 Like