2 Replies Latest reply on Mar 2, 2010 6:33 PM by Mike M

    Injecting external object into custom activity

    Mike M Newbie

      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" />
          <custom class="Custom" name="custom">
              <property name="externalThing"><object expr="#{munchkinLand}" /></property>


      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?