[jboss-user] [jBPM] - How to read external parameters from within a process?

Umar Ashfaq do-not-reply at jboss.com
Mon Dec 12 06:16:53 EST 2011

Umar Ashfaq [http://community.jboss.org/people/umarm] created the discussion

"How to read external parameters from within a process?"

To view the discussion, visit: http://community.jboss.org/message/641043#641043

Here's my code that starts a process:
StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession();  
Map<String, Object> params = new HashMap<String, Object>(); 
params.put("doctorsDecision", "L1"); ksession.startProcess("MyProcess", params); 
And here's how I expect this variable to be available in MyProcess. This is the Action of one of my script tasks in MyProcess:
System.out.println("doctorsDecision: "+doctorsDecision); 
Is this the right way to access external variables from within a process? 


When I run my application, the process definition is never added to knowledge base because jBPM doesn't seem to recognize doctorsDecision variable. How can I tell jBPM that this variable is external and it's value will be provided on runtime? I am using BPMN2 files.

Reply to this message by going to Community

Start a new discussion in jBPM at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20111212/5576c17a/attachment.html 

More information about the jboss-user mailing list