Defining variables to user tasks

I am new to BPMN. While I am exploring it I did not follow why there is no way to define variables for user tasks. As I understand a User task represents a task executed by a person with the assistance of an application.

We are defining a workflow for api orchestration. We would chaining api calls together through a workflow. We have defined user tasks whereever we need user inputs. I could define expressions to a sequence flow that uses variables but I could not define a user task that expects a variable before it could be completed. Is that possible to do with a standard bpmn process?

Thanks.

Dear @jgeek ,

welcome to the forum!

What workflow management system are you using?

  • If you are using camunda, then you could just use our pre-packaged camunda-bpmn-js distributions, which provide a properties panel, which will allow you to configure camunda specific input / output mappings for User Tasks (in compliance with the Camunda process engine). For example for Camunda 8 this would look something like this:
    <bpmn:userTask id="Activity_0w876r5">
      <bpmn:extensionElements>
        <zeebe:ioMapping>
          <zeebe:input source="= source" target="myInputVar" />
        </zeebe:ioMapping>
      </bpmn:extensionElements>
    </bpmn:userTask>

Best
Max

Thanks Max for the reply. I am using Activiti as the workflow management system. I will go through the link you shared for vanilla BPMN.

In general are there any advantages to using pure BPMN concepts apart from being able to switch the BPMN engine which anyways sounds like an impractical task later?

Thanks

I personally would decide for the workflow / process engine first and then follow their recommendations. If you are in for “automation” rather then “cross-vendor compatible documentation of processes”, then I think just using the specific implementation of the decided engine is the best strategy.

apart from being able to switch the BPMN engine which anyways sounds like an impractical task later?

=> I would subscribe to that :slight_smile: