AnsweredAssumed Answered

Problem adding Variables when starting with submitStartFormData

Question asked by prace on Nov 13, 2015
Latest reply on Feb 17, 2017 by dean

we want to start a Process with Form Parameters for the startEvent. For later steps in the Workflow we need to add additional variables.
I know that all Form Variables will become Workflow variables so I could just add them to the submitStartFormData call in the Map.

Problem for us is, that the signature of the Map supplied to startProcessInstanceByKey is Map<String,Object> (which we actually use to submit eg. java.util.Date's), but the signature for the Map of submitStartFormData is Map<String,String>.

We tried adding the variables after the start via something like this:

processInstance = getFormService().submitStartFormData(processDefinition.getId(), formValues);
getRuntimeService().setVariables(processInstance.getId(), dataMap);

but obviously the second statement never gets executed because the start of the process causes exceptions about unknown expressions/process variables.

Any other Ideas or hints besides converting all entries in the dataMap to Strings and handling everything as String in the Workflow?


Greets, Peter