Difference between revisions of "Workflow Course: Exercise 8"

From OpenKM Documentation
Jump to: navigation, search
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
{{TOCright}} __TOC__
 +
 
== Step 1 - Create real life example ==
 
== Step 1 - Create real life example ==
 
 
The idea of this exercise is create a real life approve workflow.
 
The idea of this exercise is create a real life approve workflow.
  
For doing it you should:
+
To do it you should:
  
* Start node with slimlane initiator.
+
* Start node with '''swimlane initiator'''.
 
* Create metadata with status select ( take a look here )
 
* Create metadata with status select ( take a look here )
* Create a form to creator, reviewer and approver task.
+
* Create a form to '''creator''', '''reviewer''' and '''approver''' task.
* Assign slimlane initiator to task creator.
+
* Assign '''swimlane initiator''' to task creator.
 
* Assign actor reviewer to reviewer task.
 
* Assign actor reviewer to reviewer task.
 
* Assign actor approver to approver task.
 
* Assign actor approver to approver task.
* In node metadata_created change document metadata status to created.
+
* In node '''metadata_created''' change document metadata status to '''created'''.
* In node metadata_reviewed change document metadata status to reviewed.
+
* In node '''metadata_reviewed''' change document metadata status to '''reviewed'''.
* In node metadata_approved change document metadata status to approved.
+
* In node '''metadata_approved''' change document metadata status to '''approved'''.
* In node cancellation change document metadata status to canceled and send mail to approver and reviewer users.
+
* In node cancellation change document metadata status to cancelled and send mail to approver and reviewer users.
  
[[File:Wf10.png]]
+
== Diagram ==
 +
 
 +
[[File:Wf real example.png|center]]
 +
 
 +
== Notes ==
 +
For changing metadata property group use the code:
  
'''Notes:'''
 
For changing metadata property group use the class
 
 
<source lang="java">
 
<source lang="java">
String sysToken = JcrSessionManager.getInstance().getSystemToken();
+
String sysToken = DbSessionManager.getInstance().getSystemToken();
 
OKMPropertyGroup.getInstance().setProperties(sysToken, path, grpName, properties);
 
OKMPropertyGroup.getInstance().setProperties(sysToken, path, grpName, properties);
 
</source>
 
</source>
Line 27: Line 31:
 
In this case we have created nodes to make the actions. We made it with the idea to be more clear, but in real case we suggest using transactions for doing this kind of logic ( updating metadata ), because workflow will have less boxes.
 
In this case we have created nodes to make the actions. We made it with the idea to be more clear, but in real case we suggest using transactions for doing this kind of logic ( updating metadata ), because workflow will have less boxes.
  
At [[Workflow_Course:_Resources]] can be found the complete solution.
+
[[Category: Workflow Guide]]
 
 
 
[[Category: Workflow Course]]
 
[[Category: Workflow Course]]

Latest revision as of 11:23, 20 February 2015

Step 1 - Create real life example

The idea of this exercise is create a real life approve workflow.

To do it you should:

  • Start node with swimlane initiator.
  • Create metadata with status select ( take a look here )
  • Create a form to creator, reviewer and approver task.
  • Assign swimlane initiator to task creator.
  • Assign actor reviewer to reviewer task.
  • Assign actor approver to approver task.
  • In node metadata_created change document metadata status to created.
  • In node metadata_reviewed change document metadata status to reviewed.
  • In node metadata_approved change document metadata status to approved.
  • In node cancellation change document metadata status to cancelled and send mail to approver and reviewer users.

Diagram

Wf real example.png

Notes

For changing metadata property group use the code:

String sysToken = DbSessionManager.getInstance().getSystemToken();
OKMPropertyGroup.getInstance().setProperties(sysToken, path, grpName, properties);

In this case we have created nodes to make the actions. We made it with the idea to be more clear, but in real case we suggest using transactions for doing this kind of logic ( updating metadata ), because workflow will have less boxes.