Steve,
 
If you have access to the process instance, you can access the variables like this:
processInstance.getContextInstance(VariableScope.VARIABLE_SCOPE).getVariable(variableName);
 
You can of course hide this behind a function or java util method if you want to hide the details.
 
Kris
----- Original Message -----
From: Steven Williams
To: Rules Users List
Sent: Wednesday, January 28, 2009 11:59 PM
Subject: [rules-users] RuleFlow question

Hi guys,

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.

        Map<String, Object> parameters = new HashMap<String, Object>();
        parameters.put("order", order);
        parameters.put("orderId", order.getOrderId());
        parameters.put("email", emailTextField.getText());
        ProcessInstance processInstance = ksession.startProcess("org.drools.examples.process.ruleset.RuleSetExample", parameters);

I have access to the ProcessInstance but there doesn't seem to be any clear path to the parameters.

thanks
Steve


_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users