3 Replies Latest reply on Jul 15, 2007 1:48 PM by kukeltje

    Why should I create task in Task-node ?

    lyo

      Hi friends:

      In jbpm jpdl,there are many node type. Why should I create tasks in task-node other than state or node? I mean that if I create task in state ,what would happened? I don't know is there any advantage creating task in task-node. THks!

        • 1. Re: Why should I create task in Task-node ?
          kukeltje

          you can't create tasks in states... that is why you have to do it in a task-node

          • 2. Re: Why should I create task in Task-node ?
            lyo

             

            "kukeltje" wrote:
            you can't create tasks in states... that is why you have to do it in a task-node


            I could write a action class for a state.For example:
            <state name="fire employee">
             <transition to="collect badge">
             <action class="com.nomercy.hr.RemoveEmployeeUpdate" />
             </transition>
             </state>
            

            In the class RemoveEmployeeUpdate,I could invoke the following code:
            TaskMgmtInstance.createTaskInstance(...)).

            right? I mean that I could write a class to create a task in any node type?

            • 3. Re: Why should I create task in Task-node ?
              kukeltje

              There is more to a tasknode than just creation of tasks. Look at the implementation of task-node. Not that I do not agree that the border is blurred (i was in favour of not having task-nodes and just add tasks to states. There has to be a mapping to jdpl as well, and there are differences there between state and task.... so it is not that illogical