2 Replies Latest reply on Mar 16, 2010 6:18 AM by Karthikeyan Mohan

    How to differentiate State and Task

    Karthikeyan Mohan Newbie

      Hi,

      I am new to JBPM. Iam using JBPM 4.3. I have read userguide and tried some of your test cases examples given.

      But still i have some doubts regarding Jbpm State and Task.

      1. Can a process definition contains both state and task.

       

      <process name="TaskAssignee" xmlns="http://jbpm.org/4.3/jpdl">

       

        <start>
          <transition to="review" />
        </start>

       

        <task name="review"
              assignee="#{order.owner}">
           <transition to="wait" />
        </task>
       
        <state name="wait for response">
          <transition name="accept" to="Submit Document"/>
          <transition name="reject" to="Try Again"/>
        </state>
       
        <state name="Submit Document"/>
        <state name="Try Again"/>

       

      </process>

       

       

      2. If so, how can i know that the current execution is in state or task so that

      i'll call their corresponding api's(ExecutionService's signalByExecution or TaskService's completeTask) to perform transition.

       

      Please guide me if anything is wrong here.

       

      Thanks & Regards