Most Powerful Open Source ERP

Guideline A Validation Workflow Must Have A Delete State And Action

Deleting a document is part of the document life cycle.
  • Last Update:2017-04-07
  • Version:001
  • Language:en

A Validation Workflow Must Have A Delete State And Action

All "validation" workflows must define "Deleted" state and "delete_action" transition.

In ERP5, deleting a document is part of the life cycle of the document. Security should be configured so that only managers can view documents in "Deleted" state. That means, for a common end user, deletion of documents in ERP5 should be seen as "physical" deletion. The "delete_action" must be configured as follow: "Trigger type" must be set to "Initiated by user action", "Name (formatted)" must remain empty, so that this workflow action is not shown in view mode actions. You can specify a guard if needed.As usual, delete_action transition should not have a destination state ("remain in state") and have the "delete" transition as "script after". This "delete" action will have "Trigger Type" "Initiated by WorkflowMethod" and destination state "deleted".

Good Example:

Bad Example: