Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Introduction to Advanced Workflows                                !  Gavin Cornwell, Development Manager, Services Team, Al...
Agenda!•    UI•    Process Definition•    Task Definition•    Deployment•    Configuration     • UI!     • Form!     • Eng...
UI !
My Tasks!
Edit Task!
Workflows Iʼve Started!
Workflow Details!
Admin Console!
Workflow Console!
Process Definition!
Example Process Definition!
Start Task!<process id="presentationReview” name="DevCon Presentation Review"> <startEvent id="start”             activiti...
Review Task!<userTask id="reviewTask" name="Review Presentation" activiti:formKey="dcwkflw:presentationReviewTask"> <exten...
Decision!<sequenceFlow id=flow2 sourceRef=reviewTask targetRef=reviewDecision /><exclusiveGateway id="reviewDecision" name...
Approved Task!<userTask id="approved" name="Presentation Approved"  activiti:formKey="wf:approvedTask" > <extensionElement...
Rejected Task!<userTask id=”rejected" name="Presentation Rejected"  activiti:formKey="wf:rejectedTask" > <extensionElement...
Task Definition!
Based on Alfresco Content Modelling!•  bpmModel.xml    • bpm:task!    • bpm:workflowTask!    • bpm:startTask!    • bpm:acti...
Start Task!<type name="dcwkflw:submitPresentationReviewTask">  <parent>wf:submitReviewTask</parent>  <mandatory-aspects>  ...
Task Definition – Start Task cont.!<aspect name="dcwkflw:details">!  <properties>!    <property name="dcwkflw:abstract">!    ...
Task Definition – Review Task!<type name="dcwkflw:presentationReviewTask">  <parent>bpm:activitiOutcomeTask</parent>  <prop...
Task Definition – Review Task cont.!<constraint name="dcwkflw:choices" type="LIST">  <parameter name="allowedValues">    <l...
Deployment         !
Spring: your-context.xml!<bean id="devconWorkflowBootstrap" parent="workflowDeployer">  <property name="workflowDefinition...
Workflow Console!
Configuration!
UI – Hiding Workflows!<config evaluator="string-compare" condition="Workflow">  <hidden-workflows>    <!-- Hide all WCM rel...
UI – Hiding Tasks!<config evaluator="string-compare" condition="Workflow">  <hidden-tasks>    <!-- Hide all WCM related ta...
Start Workflow Form!<config evaluator="string-compare" condition="activiti$presentationReview">  <forms>    <form>      <fi...
Task Form!<config evaluator="task-type" condition="dcwkflw:presentationReviewTask">  <forms>    <form>      <field-visibil...
Workflow Details Form!
Workflow Details Form!<config evaluator="task-type”         condition="dcwkflw:submitPresentationReviewTask">  <forms>    <...
Engine!•  Disabling     • system.workflow.engine.jbpm.enabled=true!     • system.workflow.engine.activiti.enabled=true!•  De...
Demo!•  Start ‘DevCon Presentation Review’ Workflow•  Manage Task•  Monitor Progress • Workflow Details! • Workflow Console!
Questions ?!
http://wiki.alfresco.com/wiki/Workflowhttp://wiki.alfresco.com/wiki/Formshttp://www.activiti.org                      Lear...
Upcoming SlideShare
Loading in …5
×

BPM-2 Introduction to Advanced Workflows

3,533 views

Published on

This session will introduce the audience to the workflow capabilities available in Alfresco. We will discuss the workflow UI in Share and the configuration options available. A working example will also show how custom Activiti workflows can be implemented, deployed, configured and monitored.

Published in: Technology
  • Be the first to comment

BPM-2 Introduction to Advanced Workflows

  1. 1. Introduction to Advanced Workflows ! Gavin Cornwell, Development Manager, Services Team, Alfresco!
  2. 2. Agenda!•  UI•  Process Definition•  Task Definition•  Deployment•  Configuration • UI! • Form! • Engine!•  Demo•  Q & A
  3. 3. UI !
  4. 4. My Tasks!
  5. 5. Edit Task!
  6. 6. Workflows Iʼve Started!
  7. 7. Workflow Details!
  8. 8. Admin Console!
  9. 9. Workflow Console!
  10. 10. Process Definition!
  11. 11. Example Process Definition!
  12. 12. Start Task!<process id="presentationReview” name="DevCon Presentation Review"> <startEvent id="start” activiti:formKey="dcwkflw:submitPresentationReviewTask" /> <sequenceFlow id=flow1 sourceRef=start targetRef=reviewTask />
  13. 13. Review Task!<userTask id="reviewTask" name="Review Presentation" activiti:formKey="dcwkflw:presentationReviewTask"> <extensionElements> <activiti:taskListener event="create" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener"> … </activiti:taskListener> <activiti:taskListener event="complete" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener"> <activiti:field name="script"> <activiti:string> execution.setVariable(dcwkflw_reviewOutcome, task.getVariable(dcwkflw_reviewOutcome)); </activiti:string> </activiti:field> </activiti:taskListener> </extensionElements> <humanPerformer> <resourceAssignmentExpression> <formalExpression>${bpm_assignee.properties.userName}</formalExpression> </resourceAssignmentExpression> </humanPerformer></userTask>
  14. 14. Decision!<sequenceFlow id=flow2 sourceRef=reviewTask targetRef=reviewDecision /><exclusiveGateway id="reviewDecision" name="Review Decision" /><sequenceFlow id=flow3 sourceRef=reviewDecision targetRef=approved > <conditionExpression xsi:type="tFormalExpression"> ${dcwkflw_reviewOutcome == Publish} </conditionExpression></sequenceFlow><sequenceFlow id=flow4 sourceRef=reviewDecision targetRef=rejected />
  15. 15. Approved Task!<userTask id="approved" name="Presentation Approved" activiti:formKey="wf:approvedTask" > <extensionElements> <activiti:taskListener event="create” class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener"> … </activiti:taskListener> </extensionElements> <humanPerformer> <resourceAssignmentExpression> <formalExpression>${initiator.properties.userName}</formalExpression> </resourceAssignmentExpression> </humanPerformer></userTask>
  16. 16. Rejected Task!<userTask id=”rejected" name="Presentation Rejected" activiti:formKey="wf:rejectedTask" > <extensionElements> <activiti:taskListener event="create” class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener"> … </activiti:taskListener> </extensionElements> <humanPerformer> <resourceAssignmentExpression> <formalExpression>${initiator.properties.userName}</formalExpression> </resourceAssignmentExpression> </humanPerformer></userTask>
  17. 17. Task Definition!
  18. 18. Based on Alfresco Content Modelling!•  bpmModel.xml • bpm:task! • bpm:workflowTask! • bpm:startTask! • bpm:activitiStartTask! • bpm:activitiOutcomeTask!•  workflowModel.xml • wf:submitAdhocTask! • wf:reviewTask! • wf:activitiReviewTask! • wf:approvedTask!
  19. 19. Start Task!<type name="dcwkflw:submitPresentationReviewTask"> <parent>wf:submitReviewTask</parent> <mandatory-aspects> <aspect>dcwkflw:details</aspect> </mandatory-aspects></type>
  20. 20. Task Definition – Start Task cont.!<aspect name="dcwkflw:details">! <properties>! <property name="dcwkflw:abstract">! <type>d:text</type>! </property>! <property name="dcwkflw:duration">! <type>d:int</type>! </property>! </properties>! <associations>! <association name="dcwkflw:presenter”>! <source>…</source>! <target>! <class>cm:person</class>! <mandatory>true</mandatory>! <many>false</many>! </target>! </association>! </associations>!</aspect>!
  21. 21. Task Definition – Review Task!<type name="dcwkflw:presentationReviewTask"> <parent>bpm:activitiOutcomeTask</parent> <properties> <property name="dcwkflw:reviewOutcome"> <type>d:text</type> <default>Reject</default> <constraints> <constraint ref="dcwkflw:choices" /> </constraints> </property> </properties> <overrides> <property name="bpm:outcomePropertyName"> <default> {http://www.alfresco.org/model/dcworkflow/1.0}reviewOutcome </default> </property> </overrides> <mandatory-aspects><aspect>dcwkflw:details</aspect></mandatory- aspects></type>
  22. 22. Task Definition – Review Task cont.!<constraint name="dcwkflw:choices" type="LIST"> <parameter name="allowedValues"> <list> <value>Publish</value> <value>Reject</value> </list> </parameter></constraint>
  23. 23. Deployment !
  24. 24. Spring: your-context.xml!<bean id="devconWorkflowBootstrap" parent="workflowDeployer"> <property name="workflowDefinitions"> <list> <props> <prop key="engineId">activiti</prop> <prop key="location">alfresco/extension/devcon-workflow.bpmn20.xml</prop> <prop key="mimetype">text/xml</prop> <prop key="redeploy">false</prop> </props> </list> </property> <property name="models"> <list><value>alfresco/extension/devcon-workflow-model.xml</value></list> </property> <property name="labels"> <list><value>alfresco/extension/devcon-workflow-model</value></list> </property></bean>
  25. 25. Workflow Console!
  26. 26. Configuration!
  27. 27. UI – Hiding Workflows!<config evaluator="string-compare" condition="Workflow"> <hidden-workflows> <!-- Hide all WCM related workflows --> <workflow name="jbpm$wcmwf:*"/> <workflow name="jbpm$wf:articleapproval"/></hidden-workflows></config>
  28. 28. UI – Hiding Tasks!<config evaluator="string-compare" condition="Workflow"> <hidden-tasks> <!-- Hide all WCM related tasks --> <task type="wcmwf:*"/> </hidden-tasks></config>
  29. 29. Start Workflow Form!<config evaluator="string-compare" condition="activiti$presentationReview"> <forms> <form> <field-visibility> <show id="bpm:workflowDescription" /> <show id="bpm:workflowDueDate" /> <show id="bpm:workflowPriority" /> <show id="bpm:assignee" /> <show id="dcwkflw:abstract" /> <show id="dcwkflw:duration" /> <show id="dcwkflw:presenter" /> <show id="packageItems" /> <show id="bpm:sendEMailNotifications" /> </field-visibility> <appearance>…</appearance> </form> </forms></config>
  30. 30. Task Form!<config evaluator="task-type" condition="dcwkflw:presentationReviewTask"> <forms> <form> <field-visibility> … <show id="dcwkflw:abstract" /> <show id="dcwkflw:duration" /> <show id="dcwkflw:presenter" /> <show id="dcwkflw:reviewOutcome" /> </field-visibility> <appearance> … <field id="dcwkflw:reviewOutcome”> <control template="/org/.../workflow/activiti-transitions.ftl" /> </field> … </appearance> </form> </forms></config>
  31. 31. Workflow Details Form!
  32. 32. Workflow Details Form!<config evaluator="task-type” condition="dcwkflw:submitPresentationReviewTask"> <forms> <form id="workflow-details"> <field-visibility> <show id="bpm:sendEMailNotifications" /> <show id="dcwkflw:abstract" /> <show id="dcwkflw:duration" /> <show id="dcwkflw:presenter" /> <show id="packageItems" /> </field-visibility> <appearance>…</appearance> </form> </forms></config>
  33. 33. Engine!•  Disabling • system.workflow.engine.jbpm.enabled=true! • system.workflow.engine.activiti.enabled=true!•  Definition Visibility • system.workflow.engine.jbpm.definitions.visible=false! • system.workflow.engine.activiti.definitions.visible=true!•  Override in alfresco-global.properties•  Values shown in Admin Console or JMX Dump
  34. 34. Demo!•  Start ‘DevCon Presentation Review’ Workflow•  Manage Task•  Monitor Progress • Workflow Details! • Workflow Console!
  35. 35. Questions ?!
  36. 36. http://wiki.alfresco.com/wiki/Workflowhttp://wiki.alfresco.com/wiki/Formshttp://www.activiti.org Learn More!

×