Discussion:
[jboss-user] [jBPM] - Re: How to use different implementation of UserGroupCallback for each Process?
Maciej Swiderski
2013-07-09 07:58:10 UTC
Permalink
Maciej Swiderski [https://community.jboss.org/people/swiderski.maciej] created the discussion

"Re: How to use different implementation of UserGroupCallback for each Process?"

To view the discussion, visit: https://community.jboss.org/message/827034#827034

--------------------------------------------------------------
I am afraid that it cannot be easily achieved as there are some contextual information missing. UserGroupCallbackManager is a singleton so you can't register other implementations. One thing that you could try is to:
* register custom implementation of UserGroupCallback that is capable of delegating the actual checks to some other implementation
* make the UserGroupCallback impl context aware - for example pass some contextual data via ThreadLocal
* based on contextual data make the decision on what delegate should be used
That way you have one master UserGroupCallback registered but it does not decide itself but always delegate to others based on some data such as process id or so.

HTH
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/827034#827034]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Thomas Setiabudi
2013-07-09 09:15:14 UTC
Permalink
Thomas Setiabudi [https://community.jboss.org/people/thomas.setiabudi] created the discussion

"Re: How to use different implementation of UserGroupCallback for each Process?"

To view the discussion, visit: https://community.jboss.org/message/827055#827055

--------------------------------------------------------------
Thank you Maciej,

I have not thought about using ThreadLocal at all.


Haven't implemented your method but will try it.



Regards,
Thomas Setiabudi
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/827055#827055]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Loading...