Workflow Course: Exercise 8

From OpenKM Documentation
(Redirected from Workflow Course: Exercice 8)
Jump to: navigation, search

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.