2 Replies Latest reply on Jun 5, 2007 6:45 AM by Ricardo Marques

    process behavior

    Ricardo Marques Novice

      Hi

      I have this process definition:

      <?xml version="1.0" encoding="UTF-8"?>
      
      <process-definition
       xmlns="urn:jbpm.org:jpdl-3.1" name="holiday-request">
       <swimlane name="initiator">
       <assignment expression="user(grover)"></assignment>
       </swimlane>
       <start-state name="enter request">
       <task name="request entry" swimlane="initiator">
       <controller>
       <variable name="start date" access="read,write,required"></variable>
       <variable name="duration" access="read,write,required"></variable>
       </controller>
       </task>
       <transition name="" to="evaluate request"></transition>
       </start-state>
       <end-state name="end"></end-state>
       <task-node name="evaluate request">
       <task name="entry evaluation" swimlane="initiator">
       <controller>
       <variable name="start date" access="read"></variable>
       <variable name="duration" access="read"></variable>
       <variable name="info" access="read"></variable>
       <variable name="decision"></variable>
       </controller>
       </task>
       <transition name="More info needed" to="give addition info"></transition>
       <transition name="approve/disapprove" to="end"></transition>
       </task-node>
       <task-node name="give addition info">
       <task name="additional info entry" swimlane="initiator">
       <controller>
       <variable name="start date" access="read"></variable>
       <variable name="duration" access="read"></variable>
       <variable name="info"></variable>
       </controller>
       </task>
       <transition name="" to="evaluate request"></transition>
       </task-node>
      </process-definition>
      
      And... when I start a work on a instance and retrive the variables and transitions, I get 4 vars: start date, duration,info and decision. And on the transitions I get 2 transitions "More info needed" and "approve/disapprove".
      
      I guess that it should give me this results, because i'm not on the node "evaluate request" (i guess).
      
      Is the behavior ok? I'm doing somethig wrong?
      
      Thanks in advance.
      


        • 1. Re: process behavior
          Ronald van Kuijk Master

           

          I guess that it should give me this results, because i'm not on the node "evaluate request" (i guess).


          you probably meant to say: I guess that it should NOT give me this results, because i'm not on the node "evaluate request" (i guess).

          Well, don't guess, be sure... turn up the log level to debug (log4j), see what happens.... report back with your own analysis of the log, not just post the log itself without that.

          And... how do you start the instance? form a your own code? Then analyse that to, compare your code to the testcases etc... and post it. You could do several things (e.g. a 'signal' to much) that result in the behaviour you see. They are probably wrong for what you try to achieve (So an ebkac) but jBPM most likely behaves as it should be since it is such a basic error

          • 2. Re: process behavior
            Ricardo Marques Novice

            Ronald, thanks for your answer...

            "kukeltje" wrote:
            you probably meant to say: I guess that it should NOT give me this results, because i'm not on the node "evaluate request" (i guess).


            Yup you are right :)

            "kukeltje" wrote:

            Well, don't guess, be sure... turn up the log level to debug (log4j), see what happens.... report back with your own analysis of the log, not just post the log itself without that.


            Well, I'm still begining in jbpm so... my interpretation of the logs doesn't tell me much, yet on the database, the task instance for my current process instance is pointig to entry evaluation that means his bypass the first node.

            About my code:

            I'm using this code to start a instance and get it on my task lisk:

            cmd = new StartProcessInstanceCommand();
            
            cmd.setProcessId(Long.parseLong(pid));
            cmd.setActorId(userName);
            
            getCommandService().execute(cmd);
            


            To start a work on a task I use:

            Command cmd = new StartWorkOnTaskCommand(this.getTid(), false);


            where this.tid, is the task instance id, and then to get the transitions:

            this.availableTransitions = new ArrayList<Transition>();
             Iterator iter = tl.iterator();
             while (iter.hasNext()) {
             Transition transition = (Transition) iter.next();
            
             availableTransitions.add(transition);
             }


            I agree with you Ronald when u say that is a basic error, but we get lots of those when we are learning.

            Thanks in advance