AnsweredAssumed Answered

Passing parameters to Java classes

Question asked by borisjan on Jul 19, 2012
Latest reply on Jan 5, 2016 by jbarrez

I have read the documentation to my best ability but still is not sure how to do the following (if possible at all):

I would like to execute Java code (service task) passing in a variable number of possible varying parameters. I.e. a set of name/values that the Java code would use for its execution. The variables should not be global since this would pollute the process context and I might want to call the Java task a number of times with varying values.. As far as I can see the injection mechanism require named fields in the Java class corresponding to parameters stated in the process definition so that won't do the trick for me..

Any suggestions? Is this possible at all in Activiti/BPMN 2.0?

I looked at the scripting task and as far as I can see it does not support passing in parameters to the script but only using "global" process variables.