1 Reply Latest reply on Jul 17, 2008 2:36 PM by Pete Muir

    Help me to grab the jBPM ProcessId !

    fmarchioni fmarchioni Newbie

      Hi all Seam users !
      I'm developing a trouble ticket system and I started from the example found in the Seam distribution named TodoList.
      That's a good starting point: the problem is that I need to retreive the processId once I have called @CreateProcess method, because I need to insert the processId in a EJB which hosts Ticket information.

      I have tried Injecting the processInstance in the class, yet still I get a null when I reference the processInstance.
      What can I do ? should I turn it in a Stateful Bean ?
      Thanks for your help

      public class TodoList 
        @In private Actor actor;
        @In(value="processInstance", required=false, scope=ScopeType.BUSINESS_PROCESS) 
        @Out(value="processInstance", required=false)
        ProcessInstance processInstance;
         private String description;
         public String getDescription()
            return description;
         public void setDescription(String description) {
            this.description = description;
         public void createTodo() {}
         @StartTask @EndTask
         public void done() {}
         public void showProcessId()
         try {
           System.out.println("Actual ProcessID: " + processInstance);
         catch (Exception e) {