6 Replies Latest reply on Oct 15, 2007 1:24 PM by kukeltje

    delay task execution jpdl

    cla83

      Hi
      i'm using the eclipse plugin jpdl and i have a task that must become active after 2 minutes.
      More precisely i don't want that the user, that must execute it, see the task in his task list before 2 minutes are passed from the end of the precedent task.

      task A -->wait 2 minutes --> task b

      Please can somebody help me??

        • 1. Re: delay task execution jpdl
          kukeltje

          you can set the 'create task' attribute to no, create an action that e.g. sends a delayed message to a jms queue (separate from jbpm) which creates the task. You could also do this with quartz or so.

          • 2. Re: delay task execution jpdl
            cla83

            I'm sorry but i'm an unexperieced user of jbpm.
            There isn't a more simple way(without create an action) using some options of the visual editor of eclipse??
            Thanks

            • 3. delay task execution jpdl
              cla83

              i've tried this solution:

              ..
              <state name="wait">
              <timer duedate="60 seconds" transition="continue"/>
              <transition name="continue" to="nextstate"/>
              </state>
              ...
              

              but i'm not able to deploy the project..

              • 4. Re: delay task execution jpdl
                kukeltje

                Sure this is also a solution. Modelling an additional node in the process. But we cannot help you find the cause of the problem if you just say 'I am not able to deploy the project'. We need more info e.g. errors

                • 5. delay task execution jpdl
                  cla83

                  ok i've solved the deploy problem (wrong xml tag) and i've tried this solution:

                  ...
                  <start-state name="start">
                   <event type="node-enter">
                   <script>System.out.println("ciao mamma!!!!!!!!!!!!!!!!");</script>
                   </event>
                   ...
                   <state name="wait">
                   <event type="node-enter">
                   <create-timer duedate="60 seconds" transition="continue">
                   <script>System.out.println("ciao mamma");</script>
                   </create-timer>
                   </event>
                   <transition name="continue" to="Control"></transition>
                   </state>
                  ...
                  


                  but when the flow reach the wait state the token don't leave it.
                  How you can see i've also added 2 script but in both cases the server console don't show the message:"ciao mamma"
                  Can be a jvm probem??
                  P.S.I'm sorry for my ignorance


                  • 6. Re: delay task execution jpdl
                    kukeltje

                    see the unittest cases in the source for events/actions. You have to write an action that makes the process leave the state when the timer goes off