Thanks for your response.
Actually, The POC I am trying out is, User is provided with an option to customize few characteristics(eg. Status Name) in UI. Accordingly, we need to change the values in the groovy script and deploy the workflow in the flowable engine and to create instances.
So you mean there’s actually 2 processes - one that captures the configuration values, and one that runs multiple times that uses those configurations?
Another approach that avoids generating process definitions with tweaked scripts might be to use a mix of CMMN and BPMN. In the CMMN, have a case that includes a human task for collecting the configuration values, plus a repeating process task that has the script, passing in the case variables. If I find time, I’ll do an example app if this approach sounds useful.
Ya you are right Thanks for sharing your thoughts. Will try out your ideas.
I also have a doubt. For example, lets say I have some variables kept as part of start form variables. How to access those variables inside the script (Groovy) ? I tried using execution.getVariable("<<VARIABLE_NAME>>")… Kindly share if there is a way to fetch those variables.
if(input == config1)
execution.setVariable('output', "Matched")
else
execution.setVariable('output', "No match")
where ‘input’ happened to be a form variable and ‘config1’ happened to be passed into the process as an input (Call activity in BPMN or Process task in CMMN). The ‘output’ variable was then available to the process.