bpmnServer / bpmn-server

BPMN 2.0 server for Node.js , providing modeling, execution, persistence and monitoring for Workflow. along with sample UI. Intended to be developers workbench for BPMN 2.0
MIT License
186 stars 48 forks source link

Passing output values to other tasks #107

Closed mramin2000 closed 1 year ago

mramin2000 commented 1 year ago

Hello @ralphhanna ,

I'm using the bpmn-server for a student project. At the moment I'm trying to use a Service Task to compute an output value. This is done by a service that I have added to the MyServices Class in appDelegate.ts. Calling this method with the execution of the Service Task works fine. In the next step I like to pass the output value to another task. For testing I tried to use a Script or a Service Task. But in both cases I could not use the output value of the first service task as an input parameter.

I'm not sure if this idea in general works. Are there best practices on how to pass output values from one task as input parameters to another task?

Thanks for the help!

ralphhanna commented 1 year ago

Hi,

You can capture output parameter into instance data by having a end trigger

data.result2=output;

image

Then you can set input by having a start trigger:


 input.var1=data.result2;

``