Here is my Business Process for which I am authoring this workflow.
Approach Followed (please suggest a better way to do this, if what I did below doesn't make sense).
I used State Machine and Change State Machine actions for what I want to achieve. Please see the swim lane below and the steps for my workflow are as follows.
1) I defined two states: "Task Assignment" and "Initiator".
2) The task is assigned in the first state of the state machine action i.e "Task Assignment".
3) There are couple of variables that are calculated prior to Assign Flexi task assignment (due Date and Assignee Display name).
4) There are two possible outcomes for the Assign Flexi Task (Complete and Rejected).
5) If the outcome is "Complete", then the status field of the list item that initiated workflow should be updated to "Complete" and send a notification to the initiator and ends the state machine followed by "End Workflow" action.
6) If the workflow outcome is "Rejected", then the status field of the list item that initiated workflow should be updated to "Rejected" and Change the state to "Initiator" (on the right side in the below swim lane).
7) once the state is changed to the initiator, a notification should be sent to the initiator that the task has been rejected.
8) Then, it should wait until an Item is updated and Status field of the list item is changed to "Reassigned" and then Change the state to Task Assignment and assign the task again.
The issues am having with this approach is:
Please advise why this is happening or is there a better way to achieve this?
Solved! Go to Solution.
the way you are designing you're workflow for this use case looks good. Using a state machine is the right approach and I don't see any obvious mistakes in your flow.
But I have some questions:
Thank you for response. please see my answers below.
Here is some additional information:
The Workflow History when the Outcome is Complete: Everything proceeds fine, the initiator is sent a notification that the workflow is completed and the list item is updated.
The Workflow History when the Outcome is Rejected: The entire logic under "Rejected" branch is ignored and no change of state happens.
You can check the database by connecting to your database server, connect to your database using whatever tool you like (e. g. SQL Mgt Studio or Visual Studio) and look up the dbo.ConfiguredOutcomes table. It should store your custom defined outcomes.