0 Replies Latest reply on Mar 29, 2011 5:10 AM by René Zoller

    How to get the taskinstance id of a task created by CreateProcess

    René Zoller Newbie

      Hello Forum,

      I want to create a wizard which starts a jBPM-Process. After starting the process a task is directly created. If the user likes to start the task at the end of the wizard I need to know the taskinstance id.

      My Process looks like this:

          <start-state name="casearrives">
              <transition to="getCaseData" name="create"/>
          <task-node name="getCaseData" >
               <task name="createNewCase" > 
                    <assignment actor-id="admin" />
              <transition to="addriskstocase" name="addRisk" />
              <transition to="canceled" name="cancel" />

      So when I start the process:

           @CreateProcess(definition = "handleCase" )
           public void startProcess(){
                log.info("--> BPM process started");

      The process creats a taskinstance of createNewCase type. My question is how I can get the id of this task, so I can start it. I don't want to show the user a hole list of tasks where he can choose which to start. I want to give him right away the posibillity to start the task created by creating the process.

      I am using Seam 2.2.1 with JBoss 5.1 and jBPM 3.2.2

      Thank you for your help!