Since Trustbuilder 5.0 subworkflows are available. These are activity steps that call other workflows to do part of their work. Doing this allows for workflow/code reuse if some work needs to be done more than once.
In order to call a subworkflow and return a result from it, you have 2 options:
- Use the request / response mechanism of the workflow [default]
- Use the workItem as a means to pass around objects to/from the parent to the child workflow
The first option
is generally the cleanest, but requires more thought as the response needs to be wrapped by ‘tb.simpleResponse’ which is ok if you only need one response. So the input parameter of the child workflow needs to be wrapped by for example