[jboss-user] [jBPM] New message: "Injecting external object into custom activity"

M M do-not-reply at jboss.com
Tue Mar 2 18:12:07 EST 2010


User development,

A new message was posted in the thread "Injecting external object into custom activity":

http://community.jboss.org/message/529497#529497

Author  : M M
Profile : http://community.jboss.org/people/gubespam

Message:
--------------------------------------------------------------
In jbpm, you can use object references to have jbpm to dynamically inject objects into custom activities, like below:

{code}
import org.jbpm.api.activity.ExternalActivityBehaviour;
public class Custom implements ExternalActivityBehaviour
{
    private Object externalThing;

    public void setExternalThing( final Object externalThing )
    {
        this.externalThing = externalThing;
    }
    // ...
}
{code}

{code}
<process name="sample_process">
    <start name="start">
        <transition to="custom" />
    </start>
    <custom class="Custom" name="custom">
        <property name="inputs"><object expr="#{munchkinLand}" /></property>
    </custom>
</process>
{code}

I remember reading somewhere (can't find it now), that jbpm will search up the context chain until it finds an object with the given name ("munchkinLand" above). My question is, how does one inject an external resourceinto jBPM so that it can find it?

--------------------------------------------------------------

To reply to this message visit the message page: http://community.jboss.org/message/529497#529497




More information about the jboss-user mailing list