@Anatoly,

Thanks for the feedback.

>>    If they have access to globals, they would become always stateful, which 
>>is not _always_ the desired behavior. 

I don't see this, any more than with any other data.  If the WorkItem or 
WorkItemManager interface supplied a getGlobal(String name), and the 
WorkItemHandler doesn't stuff it away in a field or otherwise retain it as 
state, then it's not stateful - unless I'm missing something.

>>    But you can map all the variables into the handler, can't you? 

Yes, if I must.  But some resources used by workitems need to be configured by 
either the process initiator or a process participant, yet don't make sense in 
the variable domain.  Consider, e.g., a process where multiple workitems need 
to access a database - but the selection of database is up to the process 
initiator.  The connection credentials don't really belong in a variable, at 
least as I understand the intended uses for globals and variables.

-Ed

-- 
View this message in context: 
http://n3.nabble.com/Access-to-globals-from-WorkItemHandlers-tp732460p732724.html
Sent from the Drools - User mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

Reply via email to