<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.6000.16788" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Steve,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>If you have access to the process instance, you can
access the variables like this:</FONT></DIV>
<DIV><FONT face=Arial
size=2>processInstance.getContextInstance(VariableScope.VARIABLE_SCOPE).getVariable(variableName);</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>You can of course hide this behind a function or
java util method if you want to hide the details.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Kris</FONT></DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=stevearoonie@gmail.com href="mailto:stevearoonie@gmail.com">Steven
Williams</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=rules-users@lists.jboss.org
href="mailto:rules-users@lists.jboss.org">Rules Users List</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Wednesday, January 28, 2009 11:59
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [rules-users] RuleFlow
question</DIV>
<DIV><BR></DIV>Hi guys,<BR><BR>I am playing with the OrderExample in
drools-examples and was wondering how I get access in my rules to the
parameters that are sent to startProcess? e.g.<BR><BR>
Map<String, Object> parameters = new
HashMap<String, Object>();<BR>
parameters.put("order", order);<BR>
parameters.put("orderId", order.getOrderId());<BR>
parameters.put("email",
emailTextField.getText());<BR>
ProcessInstance processInstance =
ksession.startProcess("org.drools.examples.process.ruleset.RuleSetExample",
parameters);<BR><BR clear=all>I have access to the ProcessInstance but there
doesn't seem to be any clear path to the
parameters.<BR><BR>thanks<BR>Steve<BR><BR>
<P>
<HR>
<P></P>_______________________________________________<BR>rules-users mailing
list<BR>rules-users@lists.jboss.org<BR>https://lists.jboss.org/mailman/listinfo/rules-users<BR></BLOCKQUOTE></BODY></HTML>