1 Reply Latest reply on Nov 21, 2009 12:28 AM by Shervin Asgari

    Jbpm action is called infinitly

    Alexander Müller Newbie

      Hello everyone,

      I've got a problem while developing a jbpm business process that has to wait until a specified time and execute an action.
      Everything works as expected while not using outjection on a variable. If outjection is activated through the @Out annotation
      the action method gets called infinitly.

      ----- The Process ------

      <?xml version="1.0" encoding="UTF-8"?>
      <process-definition  xmlns="urn:jbpm.org:jpdl-3.2"  name="sellingProcess">
      <start-state name="new selling">
           <transition to="wait auction"></transition>
      <state name="wait auction">
              <timer name="waitAuctionTimer" duedate="1 minute" transition="interuptWaitAuction">               
                <action expression="#{sellingManager.startAuctioning}"/>                              
           <transition to="wait selling" name="interuptWaitAuction"/>
           <transition to="end invalid selling" name="interuptFailedWaitAuction"></transition>
      <state name="wait selling">
      <end-state name="end invalid selling"/>

      ----- The Component -----

      public class SellingManagerBean implements SellingManager {
      //     @Out(scope=ScopeType.BUSINESS_PROCESS, required=false)
           @In(scope=ScopeType.BUSINESS_PROCESS, required=false)
           Selling selling;
           public String startAuctioning() {
                if( selling.getEbayItemId() == null && selling.getEbayItemLink() == null ) {
                     String itemId = ebayDriver.addItem(selling);
                     selling.setEbayItemLink(buildEbayItemUrl(itemId, ebayDriver.getEbayModuleConfiguration().isProduction()));
                     return itemId;
                return null;

      If @Out(scope=ScopeType.BUSINESS_PROCESS, required=false) is active, the startAuctioning method is called infinitly.

      I'm using Seam 2.2.0 GA, Jboss5 and Jbpm 3.2.6SP1

      Anyone an idea?


      Alexander Müller

        • 1. Re: Jbpm action is called infinitly
          Shervin Asgari Master

          I believe there is a bug with outjection on business process scope with seam.
          We had to implement a workaround in our application for this behaviour.
          I can't remember what the bug was, or if it is applicable for your situation, but
          basically what we are doing is outjecting the value directly to the business context.


          Now you can from your java or xhtml page inject and use the value either with

           private Selling selling;
          //or directly from EL #{selling}

          Hope this helps.