6 Replies Latest reply on Jul 13, 2006 10:12 AM by falazar

    Timers Documentation and Eclipse incorrect.

    falazar Novice

      Bug:
      When defining a node timer in the Eclipse plugin according to the rules of Chapter 12, it says cvc-complex-type.2.4.b: The content of element 'timer' is not complete. One of action , script is expected.

      And it wont allow a deployment of the process.
      It does not say this is a requirement in Ch 12, and it does not appear that it is needed, I have neither an action nor a script I need to perform here, simply a timed transition.

      I added a dummy script there, and it appears to work ok.

      <task-node name="Pending CSD Key Approval">




      <![CDATA[
      System.out.println("*** TIMER FIRED !!!");
      ]]>




      </task-node>

      And it doesnt mention the various setting that can be used for timing here either.
      It looks like it is mentioned under the calendar but not here, what the duration variables can be.

      Regards,
      James Ratcliff

        • 1. Timer Splitting Token, leaving broken state
          falazar Novice

          Using a real basic test timer to go forward one transition appears to leave everything in a broken state. (using 3.1.1) with
          <?xml version="1.0" encoding="UTF-8"?>

          <process-definition
          xmlns="urn:jbpm.org:jpdl-3.1" name="Timers">

          <start-state name="start">


          </start-state>
          <end-state name="end1"></end-state>
          <task-node name="Pending CSD Admin Approval">







          <![CDATA[
          System.out.println("*** TIMER FIRED !!!");
          ]]>




          </task-node>
          <task-node name="Alternate CSD Admin Approval">




          </task-node>
          <task-node name="Notify User">


          </task-node>
          </process-definition>

          I push it to node 2, wait 3 minutes, take a look, and it shows in both dan and broccol's task list.
          Under broccol;s it has the correct header of "Alternate CSD.." but for dan it still shows "Pending CSD Admin Approval" If I click on the task for dan, the correct 3rd node is highlighted in red, but the text says we are in the wrong node.

          Regards,
          James Ratcliff

          • 2. Re: Timers Documentation and Eclipse incorrect.
            Ronald van Kuijk Master

            Can you post the xml fragment in code tags? like html but with squared brackets

            • 3. Re: Timers Documentation and Eclipse incorrect.
              falazar Novice

              Here ya go:

              [?xml version="1.0" encoding="UTF-8"?]

              [process-definition
              xmlns="urn:jbpm.org:jpdl-3.1" name="Timers"]
              [swimlane name="initiator"][/swimlane]
              [start-state name="start"]
              [task name="CSD Admin Approval" swimlane="initiator"][/task]
              [transition name="" to="Pending CSD Admin Approval"][/transition]
              [/start-state]
              [end-state name="end1"][/end-state]
              [task-node name="Pending CSD Admin Approval"]
              [task name="Pending CSD Admin Approval"]
              [assignment expression="user(dan)"][/assignment]
              [/task]
              [transition name="Timeoutpath" to="Alternate CSD Admin Approval"][/transition]
              [timer name='alternate'
              duedate='2 minutes'
              transition='Timeoutpath']
              [script]
              [expression]
              [![CDATA[
              System.out.println("*** TIMER FIRED !!!");
              ]]]
              [/expression]
              [/script]
              [/timer]
              [transition name="Approve" to="Notify User"][/transition]
              [/task-node]
              [task-node name="Alternate CSD Admin Approval"]
              [task name="Alternate CSD Admin Approval"]
              [assignment expression="user(broccol)"][/assignment]
              [/task]
              [transition name="Approve" to="Notify User"][/transition]
              [/task-node]
              [task-node name="Notify User"]
              [task name="Accept" swimlane="initiator"][/task]
              [transition name="Accept" to="end1"][/transition]
              [/task-node]
              [/process-definition]

              • 4. Re: Timers Documentation and Eclipse incorrect.
                Ronald van Kuijk Master

                ROTFLOL, Sorry.... all you had to do was do a reply where you have 'edit' buttons (try hitting the preview or the 'postreply' button. There is a code tag which puts a [ c o d e ] ........ [ / c o d e ] (remove the spaces) around your xml. That would have worked and given you

                <myxml>.....</myxml>


                You can also type these tags.

                Sorry for the misunderstanding. I hope you used search/replace and not did it manually

                • 5. Re: Timers Documentation and Eclipse incorrect.
                  Ronald van Kuijk Master

                  tasks are not cancelled by default when a token leaves a tasknode. Put a end-tasks="true" on the tasknode to achieve this (by default this is false)

                  • 6. Re: Timers Documentation and Eclipse incorrect.
                    falazar Novice

                    Ok, that worked perfectly, thanks for the tips.

                    James