Completing tasks twice in CMMN


#1

Hi

I have a use case where many people are working on a case items, and we want to log each time the tasks are completed. It may be, that a manager wants to also say they’ve completed the task. Is that something that is possible in Flowable’s CMMN?

In other words, on a particular task, a Human wants to mark it as complete twice and we want to record (and access the history) that the task has been completed twice (and by whom).

— EDIT
A few more details after investigating further:

  • I can add a repetitionRule to the item control section. Without a repetition variable, that means repetition as many as I like.
  • Ideally, we could combine this with an itemControl of type “Completion Neutral Rule” but unfortunately, whilst it looks like the next plan items are unlocked (activated) within the stage does not move on.
  • I’ve also tried an expression in a required condition ${repetitionCount == 1} but that didn’t seem to work either. In fact I tried to set required to false but the stage didn’t complete and fire of the next stage
  • I also tried to mark the stage as autocomplete but again no changes.

I’ve managed to find a way to do this, but it does require manual activation - is this the only way? The CMMN fragment in question is:

<planItem id="createEmailItem" name="Create email address"
            definitionRef="createEmailTask">
      <itemControl>
        <extensionElements>
        <flowable:completionNeutralRule/>
        </extensionElements>
        <repetitionRule flowable:counterVariable="repetitionCounter" />
        <requiredRule>
          <condition><![CDATA[${repetitionCounter <= 1}]]></condition>
        </requiredRule>
        <manualActivationRule>
          <condition><![CDATA[${repetitionCounter > 1}]]></condition>
        </manualActivationRule>
      </itemControl>
    </planItem>

In the above, we basically have a repetition rule ad-infinitum, a required which is only required the very first time, and manual activation from repetition 2 onwards… Is there any way not to have the manual activation?

I assume this gives us an “at least” once execution method, albeit with manual activation for executions 2-n.

Any pointers?
Chris