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

Allow "early binding" of process definition in CallActivity

    • Icon: Feature Request Feature Request
    • Resolution: Fixed
    • Icon: L3 - Default L3 - Default
    • 7.0.0-alpha9, 7.0.0
    • None
    • engine
    • None

      Background: Currently we can only set a "process definition key" in a CallActivity (as String or via Expression). This is too limited as it means that always the latest version of the process definition is used.

      AT:

      • You can specify the "process definition version" additionally in the CallActivity to "early bind" the process definition (as we had it in jBPM 3 and jBPM 4)
      • Specify this in the XML like this:

      <callActivity id="callSubProcess"
      calledElement="checkCreditProcess"
      activiti:calledElementBinding="latest|deployment|version"
      activiti:calledElementVersion="17">

      <extensionElements>
      <activiti:in source="someVariableInMainProcess" target="nameOfVariableInSubProcess" />
      <activiti:out source="someVariableInSubProcss" target="nameOfVariableInMainProcess" />
      </extensionElements>
      </callActivity>

      Binding Options:
      1) LATEST; always call latest version (current semantics)
      2) SAME DEPLOYMENT: if called process definition is part of the same deployment as the calling process definition use version from deployment
      3) FIXED: fixed version (in this case a processDefinitionId or a version can be provided)

        This is the controller panel for Smart Panels app

            [CAM-948] Allow "early binding" of process definition in CallActivity

            Big question: How to we specify the version or processDefinitionId in the XML. Currently we use the "calledElement" attribute of BPMN 2.0 for the "processDefinitionKey".

            Current:
            <callActivity id="callSubProcess" calledElement="checkCreditProcess" >
            <extensionElements>
            <camunda:in source="someVariableInMainProcess" target="nameOfVariableInSubProcess" />
            <camunda:out source="someVariableInSubProcss" target="nameOfVariableInMainProcess" />
            </extensionElements>
            </callActivity>

            Alternativ A: Recognize ID automatically by some magic:

            <callActivity id="callSubProcess" calledElement="checkCreditProcess:17:dasda234dasd3" >
            <extensionElements>
            <camunda:in source="someVariableInMainProcess" target="nameOfVariableInSubProcess" />
            <camunda:out source="someVariableInSubProcss" target="nameOfVariableInMainProcess" />
            </extensionElements>
            </callActivity>

            Alternativ B: Some pattern in the calledElement

            <callActivity id="callSubProcess" calledElement="key=checkCreditProcess;version=17" >
            <extensionElements>
            <camunda:in source="someVariableInMainProcess" target="nameOfVariableInSubProcess" />
            <camunda:out source="someVariableInSubProcss" target="nameOfVariableInMainProcess" />
            </extensionElements>
            </callActivity>

            Alternativ C: own extension element

            <callActivity id="callSubProcess" calledElement="checkCreditProcess" >
            <extensionElements>
            <camunda:calledElement version="17" />
            <camunda:in source="someVariableInMainProcess" target="nameOfVariableInSubProcess" />
            <camunda:out source="someVariableInSubProcss" target="nameOfVariableInMainProcess" />
            </extensionElements>
            </callActivity>
            or
            <callActivity id="callSubProcess" calledElement="checkCreditProcess" >
            <extensionElements>
            <camunda:calledElement processDefinitionId="checkCreditProcess:17:dasda234dasd3" />
            <camunda:in source="someVariableInMainProcess" target="nameOfVariableInSubProcess" />
            <camunda:out source="someVariableInSubProcss" target="nameOfVariableInMainProcess" />
            </extensionElements>
            </callActivity>

            WDYT?

            Bernd Ruecker added a comment - Big question: How to we specify the version or processDefinitionId in the XML. Currently we use the "calledElement" attribute of BPMN 2.0 for the "processDefinitionKey". Current: <callActivity id="callSubProcess" calledElement="checkCreditProcess" > <extensionElements> <camunda:in source="someVariableInMainProcess" target="nameOfVariableInSubProcess" /> <camunda:out source="someVariableInSubProcss" target="nameOfVariableInMainProcess" /> </extensionElements> </callActivity> Alternativ A: Recognize ID automatically by some magic: <callActivity id="callSubProcess" calledElement="checkCreditProcess:17:dasda234dasd3" > <extensionElements> <camunda:in source="someVariableInMainProcess" target="nameOfVariableInSubProcess" /> <camunda:out source="someVariableInSubProcss" target="nameOfVariableInMainProcess" /> </extensionElements> </callActivity> Alternativ B: Some pattern in the calledElement <callActivity id="callSubProcess" calledElement="key=checkCreditProcess;version=17" > <extensionElements> <camunda:in source="someVariableInMainProcess" target="nameOfVariableInSubProcess" /> <camunda:out source="someVariableInSubProcss" target="nameOfVariableInMainProcess" /> </extensionElements> </callActivity> Alternativ C: own extension element <callActivity id="callSubProcess" calledElement="checkCreditProcess" > <extensionElements> <camunda:calledElement version="17" /> <camunda:in source="someVariableInMainProcess" target="nameOfVariableInSubProcess" /> <camunda:out source="someVariableInSubProcss" target="nameOfVariableInMainProcess" /> </extensionElements> </callActivity> or <callActivity id="callSubProcess" calledElement="checkCreditProcess" > <extensionElements> <camunda:calledElement processDefinitionId="checkCreditProcess:17:dasda234dasd3" /> <camunda:in source="someVariableInMainProcess" target="nameOfVariableInSubProcess" /> <camunda:out source="someVariableInSubProcss" target="nameOfVariableInMainProcess" /> </extensionElements> </callActivity> WDYT?

            Bernd Ruecker added a comment - see discussion in https://groups.google.com/forum/embed/?place=forum/camunda-bpm-dev&showsearch=true&showpopout=true#!topic/camunda-bpm-dev/BK5vijaZ6hk

            Kristin Polenz added a comment - Pull request: https://github.com/camunda/camunda-bpm-platform/pull/25

            Kristin Polenz added a comment - Docu pull request: https://github.com/camunda/docs.camunda.org/pull/5

              smirnov Roman Smirnov
              ruecker Bernd Ruecker
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: