Uploaded image for project: 'camunda BPM'
  1. camunda BPM
  2. CAM-13608

Multiple subprocess cancellation does not compensate for all instances.

    • Icon: Feature Request Feature Request
    • Resolution: Won't Do
    • Icon: L3 - Default L3 - Default
    • None
    • None
    • engine
    • None

      When a multiple sub-process cancels a transaction from the instance of one of the child processes, it triggers the compensation only of the process that canceled it, but the canceled transaction does not trigger the compensation of the neighboring sub-processes.

      To make it less abstract, I have attached this example process.
      In the "Get potential participants" task, the script creates the participants variable: S('["John", "Mary", "Richard"]');
      After everyone pays for the event:
      -If John gives up and is not required, he will get his money back;
      -If Mary resigns and is required, she will also receive her money back;
      -But Richard will be sad, because as Mary's withdrawal canceled the event, Camunda did not perform the compensation of Richard's sub-process.

        This is the controller panel for Smart Panels app

            [CAM-13608] Multiple subprocess cancellation does not compensate for all instances.

            Hi rodrigocarlstrom,

            Thank you for your feature request.

            Could you please reformat your ticket description that it follows our feature request template?

            h4. User Story (Required on creation): 
            h4. Functional Requirements (Required before implementation): 
            h4. Technical Requirements (Required before implementation): 
            h4. Limitations of Scope (Optional): 
            h4. Hints (Optional):
            

            Best,
            Tassilo

            Tassilo Weidner added a comment - Hi rodrigocarlstrom , Thank you for your feature request. Could you please reformat your ticket description that it follows our feature request template? h4. User Story (Required on creation): h4. Functional Requirements (Required before implementation): h4. Technical Requirements (Required before implementation): h4. Limitations of Scope (Optional): h4. Hints (Optional): Best, Tassilo

            Hi rodrigocarlstrom,

            Interesting case. 

            I think your feature request would be against the Object Modeling Group's BPMN 2.0 specification which says:

            3.2.7: The multi-instance (MI) Activity is a type of Activity that acts as a wrapper for an Activity which has multiple instances spawned in parallel or sequentially.

            Only the inner activity is a transaction and not the multi-instance (MI) Activity. The cancel boundary event is attached to the transaction. Triggering the cancellation compensates the specific inner instance.

            Does this make sense to you?

            Best,
            Tassilo

            Tassilo Weidner added a comment - Hi rodrigocarlstrom , Interesting case.  I think your feature request would be against the Object Modeling Group's BPMN 2.0 specification which says: 3.2.7: The multi-instance (MI) Activity is a type of Activity that acts as a wrapper for an Activity which has multiple instances spawned in parallel or sequentially. Only the inner activity is a transaction and not the multi-instance (MI) Activity. The cancel boundary event is attached to the transaction. Triggering the cancellation compensates the specific inner instance. Does this make sense to you? Best, Tassilo

            Rodrigo Carlstrom added a comment - - edited

            Hi Tassilo, nice to talk to you!

            Well, my understanding is that the Cancel End Event should really only cancel the sub-instance it's part of, acting as a wrapper as the specification says. However, I understand that if a transactional multiple sub-process has a Cancel Boundary Event, this event should clear all the sub-instances before canceling them, to keep the business transaction coherent, otherwise the transaction concept would no longer make sense of multiple sub-processes:
            "A transaction is a logical unit of work that allows the grouping of a set of individual activities to collectively succeed or fail."

            Tks!

            Rodrigo Carlstrom added a comment - - edited Hi Tassilo, nice to talk to you! Well, my understanding is that the Cancel End Event should really only cancel the sub-instance it's part of, acting as a wrapper as the specification says. However, I understand that if a transactional multiple sub-process has a Cancel Boundary Event, this event should clear all the sub-instances before canceling them, to keep the business transaction coherent, otherwise the transaction concept would no longer make sense of multiple sub-processes: "A transaction is a logical unit of work that allows the grouping of a set of individual activities to collectively succeed or fail." Tks!

            Hi rodrigocarlstrom,

            The important part here is that the Cancel Boundary Event is not attached to the multi-instance Activity but to the transaction itself.
            This is why it makes sense that only the specific multi-instance is canceled.

            Best,
            Tassilo

            Tassilo Weidner added a comment - Hi rodrigocarlstrom , The important part here is that the Cancel Boundary Event is not attached to the multi-instance Activity but to the transaction itself. This is why it makes sense that only the specific multi-instance is canceled. Best, Tassilo

              tassilo.weidner Tassilo Weidner
              rodrigocarlstrom Rodrigo Carlstrom
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: