Examples: Simple

From OpenKM Documentation
Revision as of 10:21, 26 January 2010 by Pavila (talk | contribs)

Jump to: navigation, search

Process image

Workflow example simple.png

Process definition

<?xml version="1.0" encoding="UTF-8"?>

<process-definition xmlns="urn:jbpm.org:jpdl-3.2" name="simple">
  <start-state name="start">
    <transition name="to_state" to="state"></transition>
    <event type="node-leave">
      <script>
        print(&quot;Node start&quot;);
      </script>
    </event>
  </start-state>
  <state name="state">
    <event type="node-enter">
      <script>
        print(&quot;Node state&quot;);
        executionContext.leaveNode();
      </script>
    </event>
    <transition name="to_end" to="end">
      <action name="action" class="com.openkm.MessageActionHandler">
        <message>About to finish!</message>
      </action>
    </transition>
  </state>
  <end-state name="end">
    <event type="node-enter">
      <script>
        print(&quot;Node end (&quot;+executionContext.getVariable(&quot;message&quot;)+&quot;)&quot;);
      </script>
    </event>
  </end-state>
</process-definition>