2 Replies Latest reply on Jun 19, 2009 1:46 PM by Michael Wohlfart

    jBPM: process business key may not be null

    Alexandros Karypidis Novice

      Hi,


      I'm trying out the Seam/jBPM integration. When trying to start a business process with the following:


      @Name("mycomponent")
      @Stateless
      public class MyTestAction implements MyTest {
           private MyClass memberField;
           // ...
           @CreateProcess(definition = "my-process",
                processKey = "#{mycomponent.memberField.memberFieldMember}")
           public String tryItOut() {
                Object v = Expressions.instance().createValueExpression(
                          "#{mycomponent.memberField.memberFieldMember}").getValue();
                log.info("The process key should be [#0]", v);
                // ...
           }
      }
      


      Now, according to the log output, the EL expression evaluates to myKey and therefore is not null. However, when the tryItOut() method returns and the transaction is committed, Seam fails miserably claiming:


      12:23:48,781 ERROR [application] javax.ejb.EJBTransactionRolledbackException: process business key may not be null
      javax.faces.el.EvaluationException: javax.ejb.EJBTransactionRolledbackException: process business key may not be null
           at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:102)
      ...
      



      Since I know the processKey paramater to the @CreateProcessAnnotation is correct, why would Seam complain that it is null?