How do you or, even, can you access process variables in rules?
I did this sort of thing in my rules consequences:
ProcessInstance pi = drools.getWorkingMemory().getProcessInstance(1);
((VariableScopeInstance)
pi.getContextInstance("VariableScope")).setVariable("x", x);
In my test, the process id of 1 is a bit of a kludge. Is there a good way
to find that id?
This looks pretty ugly.
Is the right way to do this to create a subprocess and map the variable into
the subprocesses' working memory as facts with <mapping> tags?
Bob
--
View this message in context:
http://drools-java-rules-engine.46999.n3.nabble.com/Rules-and-process-var...
Sent from the Drools - User mailing list archive at
Nabble.com.