5 Replies Latest reply on Feb 9, 2008 11:20 AM by kukeltje

    Token is locked by token[26]

    seanmcelroy

      Hello,

      I have created a simple example jBPM project and I can deploy it using jbpm-console. I have create a state node like this:

      <state name="GenerateLetterOfOffer">
       <event type="node-enter">
       <action class="com.sample.action.LOAActionHandler">
       </action>
       </event>
      </state>


      In the class com.sample.action.LOAActionHandler I have coded the execute method like this:

      public void execute(ExecutionContext context) throws Exception {
       System.out.println("Letter of offer generated");
       context.getToken().signal();
      }


      When the signal method is executed I get this error message:
      "org.jbpm.JbpmException" was thrown. The message is: this token is locked by token[26]

      Can you tell me what I am doing wrong. I have tried using the transiation tag and adding an action to it, but the execute method never gets call in this instance.

      Thanks.