Obsolete Pages{{Obsolete}}
The official documentation is at: http://docs.alfresco.com
Please Note: This capability is available from v1.4 onwards!
Back to Workflow.
This document provides training on writing your own custom workflows.
Follows are very simple jPDL examples which may be deployed to the Alfresco Repository and stepped through via the Workflow Console.
To deploy any of the following:
<process-definition name='simplest'>
<start-state name='start'>
<transition name='' to='end' />
</start-state>
<end-state name='end' />
</process-definition>
<process-definition name='steps'>
<start-state name='start'>
<transition name='toStep1' to='step1' />
<transition name='toStep2' to='step2' />
</start-state>
<state name='step1'>
<transition name='' to='end' />
</state>
<state name='step2'>
<transition name='' to='end' />
</state>
<end-state name='end' />
</process-definition>
<process-definition name='fork'>
<start-state name='start'>
<transition name='' to='split' />
</start-state>
<fork name='split'>
<transition name='toStep1' to='step1' />
<transition name='toStep2' to='step2' />
</fork>
<state name='step1'>
<transition name='' to='end' />
</state>
<state name='step2'>
<transition name='' to='end' />
</state>
<end-state name='end' />
</process-definition>
<process-definition name='join'>
<start-state name='start'>
<transition name='' to='split' />
</start-state>
<fork name='split'>
<transition name='toStep1' to='step1' />
<transition name='toStep2' to='step2' />
</fork>
<state name='step1'>
<transition name='' to='toJoin' />
</state>
<state name='step2'>
<transition name='' to='toJoin' />
</state>
<join name='toJoin'>
<transition to='end' />
</join>
<end-state name='end' />
</process-definition>
<process-definition name='task'>
<swimlane name='initiator' />
<swimlane name='reviewer'>
<assignment actor-id='davidc' />
</swimlane>
<start-state name='start'>
<transition name='' to='review' />
</start-state>
<task-node name='review'>
<task name='reviewTask' swimlane='reviewer' />
<transition name='' to='end' />
</task-node>
<end-state name='end' />
</process-definition>
<process-definition name='events'>
<event type='process-start'>
<script>System.out.println('Workflow Started');</script>
</event>
<start-state name='start'>
<transition name='' to='end' >
<script>System.out.println('Signal');</script>
</transition>
<event type='node-leave'>
<script>System.out.println('Leaving Start');</script>
</event>
</start-state>
<end-state name='end' />
<event type='process-end'>
<script>System.out.println('Workflow Ended');</script>
</event>
</process-definition>
<process-definition name='dataflow'>
<start-state name='start'>
<transition name='' to='review'>
<script>
<expression>
process_var = 'process';
</expression>
<variable name='process_var' access='write'/>
</script>
</transition>
</start-state>
<task-node name='review'>
<task name='reviewTask'>
<event type='task-create'>
<script>
<expression>
task_var = process_var;
</expression>
<variable name='task_var' access='write'/>
</script>
</event>
</task>
<transition name='' to='end'/>
</task-node>
<end-state name='end' />
<event type='process-end'>
<script>System.out.println(process_var + ',' + task_var);</script>
</event>
</process-definition>