[jboss-dev-forums] [Design of JBoss jBPM] - Re: commands & EJB 3

tom.baeyens@jboss.com do-not-reply at jboss.com
Sun Feb 18 04:31:19 EST 2007


In the constructor of your authorization service impl, you can fetch the JbpmContext with JbpmContext.getCurrentContext().  (ignore the deprecated.  that is to indicate that the method jbpmConfiguration.getCurrentContext() is to be preferred.  but in the case of service construction, you don't have a pointer to the jbpmConfiguration...)

To navigate from the jbpmContext to other services, use jbpmContext.getServices().getService(...)  where ... is one of the constants defined in Services.

To navigate from the jbpmContext to the sessions for db access, use jbpmContext.getXxxSession().

You can also use jbpmContext.getSession() and put your queries directly in the service.


i know this services/session stuff stinks :-)  it's one of the main topics to be improved in jbpm 4.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4018464#4018464

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4018464



More information about the jboss-dev-forums mailing list