[jboss-user] [jBPM] New message: "Injecting external object into custom activity"
M M
do-not-reply at jboss.com
Tue Mar 2 18:15:15 EST 2010
User development,
A new message was posted in the thread "Injecting external object into custom activity":
http://community.jboss.org/message/529498#529498
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:
import org.jbpm.api.activity.ExternalActivityBehaviour;public class Custom implements ExternalActivityBehaviour{ private Object externalThing;
public void setExternalThing( final Object externalThing ) { this.externalThing = externalThing; } // ...}
<process name="sample_process">
<start name="start">
<transition to="custom"></transition>
</start>
<custom class="Custom" name="custom">
<property name="inputs"><object expr="#{munchkinLand}"></object></property>
</custom>
</process>
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/529498#529498
More information about the jboss-user
mailing list