[rules-users] Access to globals from WorkItemHandlers?
Ed Staub
estaub at telcordia.com
Tue Apr 20 11:40:29 EDT 2010
@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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20100420/1fdfea14/attachment.html
More information about the rules-users
mailing list