I have a requirement where i need to change the workflow for emergency creation/updating.
Suppose i have a workflow X associated with creation/updating of a specific type of component. Workflow X has 2 step review process which takes Y days amount of time. Clients want to publish the component on an emergency basis for a special offer immediately, and at that time we need to trigger the emergency workflow Z.
How can i change the workflow from X to Z ?
I have one solution in mind which is as follows :
- Associate the Workflow X in the component and add a additional field in Component metadata to which says "Trigger Emergency Workflow".Check the metadata field value to "Yes" for emergency workflow component and save it.
- Capture the field value in event system . If the value is "Yes" change the workflow from X to Z .
Now my questions are :-
- Is it possible to change workflow in event system from X to Z?
- Can i get all workflows in event system ?
- Once the metadata value is checked, i need to uncheck it after triggering emergency workflow. Can i do that i event system.
- If i change the value of metadata to uncheck will it again trigger the normal workflow(X) . Can i stop it now?
Please give your suggestions