Difference between revisions of "Examples: Simple"

From OpenKM Documentation
Jump to: navigation, search
(Process image)
Line 37: Line 37:
 
</process-definition>
 
</process-definition>
 
</source>
 
</source>
 +
 +
[[Category: Workflow Guide]]

Revision as of 11:21, 26 January 2010

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>