cancel
Showing results for 
Search instead for 
Did you mean: 

Activiti Report: Pass parameter to bpm20.xml

chrisx_212
Champ in-the-making
Champ in-the-making
I know that Report will not be implemented in 6 later but I'd like to ask about this feature more at the moment.

Is there a way that we can pass a parameter from Java to a bpm20.xml file used for reporting? Similar to passing a parameter to a function/class?

Thanks.
1 REPLY 1

hari
Star Contributor
Star Contributor
Hi Chris,

Do you mean passing a value to a BPM from java ?
If so, yes you can do that. While starting the BPM, you can set the values to various input parameters of BPM and start it.
Example below.
  Map<String, Object> variables = new HashMap<String, Object>();
  variables.put("projectName", "IPEMS");
  variables.put("projectLocation", "Hyderabad");
 
  runtimeService.startProcessInstanceByKey(bpmName, variables);