[rules-users] Nested access to process variables
marton.bokor
marton.bokor at gfthu.com
Mon Sep 6 11:23:48 EDT 2010
Hi,
I have some process variabless passed via map in startProcess. AFAIU these
represent the current state of my process instance so what I would like to
do is compare these in a condition of a wait state node against an inserted
fact, which would be the dynamic (changing) part (Because I imagined that
this is what wait nodes are mostly good for, hope I'm right...). AFAIK this
node accepts only rule syntax (no mvel or java) so ATM I managed to do it
with eval, see code below, but it is ugly:
transaction : TransactionDAO( ) #this is the changing part
processInstance : WorkflowProcessInstance() #this is the process level
eval(
((APSSender)((BaseForm)processInstance.getVariable("form")).getDao()).getTransactionId().equals(transaction.getTransactionId())
)
As you can see the left side in eval is a nested object. In java it would
look like simply form.getDao().getTransactionId(). My question is how can I
do it with rule syntax without eval? Is it possible? I was experimenting
like a whole day with no success. Please help!
Thanks
Marton
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Nested-access-to-process-variables-tp1427158p1427158.html
Sent from the Drools - User mailing list archive at Nabble.com.
More information about the rules-users
mailing list