I have a generic service task handler, which takes arbitrarily structured input and returns an output (think of them as
Map<String, Object>). This task will be used intensively in many processes. So, there is a need to map different process variables into some input variable with predefined name and custom structure, and the other way around for output.
I found an exact solution to my problem in another well-known open-source BPM engine (don’t want to advertise here ). They allow to specify input/output variable mapping for tasks, subprocesses, and events, which can have list/map structure, as well as basic types. However, I was unable to find similar solution in Flowable.
The closest thing I found is field injection, but it seems only supporting string values (or expressions, which resolve to string).
Any suggestions on how this can be achieved?
Thanks in advance.
P.S. Currently I’m adding a script task in front of every service task to assemble this input variable, but this is not a solution for production use.