State Machine Workflow


Badge +3

We have developed a Nintex 2013 State Machine Workflow for Contracts with the user required to Approve/Reject the request.

The list of approvers is up to 10 people and is sequential with each approval moving it to the next State in the WF. Should someone Reject the request the WF moves the request back to the beginning State of the Workflow which happens to be the person in the Procurement team (i.e A1 = Approver1) that started the workflow. This was the original requirements and is working great but we have now been given a new requirement that will require some re-design of the workflow. The new requirement is to allow the person that is Rejecting the WF to direct the WF to go to a specific approver in the chain of A1 thru A10 so it doesn't have to go thru all of the previous approvers. For Example the CEO (i.e A10) rejects the item he then would like the flexibility to push it back to an earlier level in the Approval Chain. Please note that this WF is not in production yet which means if anyone has a better design than utilizing a State Machine we are open to other designs to provide a solution.

Does anyone have any suggestions from a High level Design viewpoint on the best way to accomplish this requirement?

Any ideas would be most appreciated.

Thanks!

Frank


12 replies

Badge +7

Hello Frank,

With having State machines, my thought on the design is as follows:

You have state machine with 10 states from A1 to A10. I'm considering the approval process is one by one.

First Approval email will be sent to 1st person - A1 so select state1 as 1st state.

Here put task action, if he approves, change the state to S2.If A1 Rejects: have one more task for him to update a field, here in this field you can have all A1toA10 people listed down. So based on choice, if A1 chooses A9 then change the state to State9.

See if it helps you!

Badge +3

Soni,

If I'm not mistaken it seems like a running 'State Machine' WF doesn't have access to check a Field within the List the WF is attached to.

I initially thought I could create a Field/Column that could be used by the State Machine WF but it didn't look like the State Machine had access to the list/fields while the WF is running. Am I correct here or did I look at it incorrectly?

Badge +11

Afaik your wrong. Using a state machine in your workflow does not remove access to your list fields. I recently had the exact same requirement with a customer and solved it using a state machine and the additional task logic Soni recommended. If you ask me, there is no better way than using a state machine. Besides, using a state machine keeps your workflow clear and maintainable!

Cheers

Philipp

Badge +3

Philipp and Soni,

Let me go back to the drawing board and revisit my State machine and let me try out your suggestions.

Do you all know of any examples you could direct me to showing how this can be done?

Thanks again!

Frank

Badge +11

Don't have some example for that but I can try to explain more precisely what i did:

  • Create an addtional State (let's call it "Redirect after Rejection")
  • In your normal approval states, you add some actions to the rejected path of your task actions:
    • set a user variable (let's call it "rejector") to store the userlogon of the "last task respondent" (you find it in the workflow context)
    • insert a change state action and configure it to switch to your new "redirect after rejection" state
  • In your "redirect after rejection" state you insert a new task action and assign the task to the "rejector"
  • Configure the task so your assignee (the rejector) can decide between all possible approval states
  • Use a "switch" to validate the choice of your rejector and insert more change state actions to switch the state accordingly to the rejectors choice

This is basically the same Soni suggested, but a little more detailed.

I would just give you my workflow, but i have customers paying gazillions of dollars, so I cant just give it away (sorry for the bad joke, it's getting quite late... I will try to provide some screenshots of my workflow, but not sure if/when I will have access to the environment again)

Cheers

Philipp

Badge +11

Here is the basic idea as a screenshot:

Capture.JPG

Cheers

Philipp

Badge +3

Philipp,

I’m sorry for the late reply but the past week I was distracted on some other issues.

Would you be able to attach your screen shot again?

I didn’t see any attachments to your email is why I ask.

Thanks!

Frank Cheney

Web/Cloud Services Administrator

IS Systems and Integration

Raleigh Durham Airport Authority

919.840.7785

Badge +11

Hey Frank,

the screenshot is embedded in my previous post. These screenshots are not included in the notification mail you get automatically by Nintex. If you can't see it here in the forum let me know, then I will send you an email with the screenshot attached and hope it gets through your corporates firewall wink.png

Greetings

Philipp

Badge +3

Philipp,

I see it in the forum, Thanks!

Frank

Userlevel 4
Badge +10

Hi Frank Cheney​,

How about the solution in my screenshot? If A1 is the initiator, just use a switch action to read the variable of what workflow state the rejection came from and send it back. You only need to set the variable in the rejection branch of each task.

178932_pastedImage_0.png

If this helps, please mark it as helpful or an answered question.

Best regards,

Patrick Kelligan

Badge +3

Patrick, Adding the Switch Action really helped us today in the re-design of our Workflow. We are still developing the WF but between you, Philipp and Soni we have made real progress on producing an elegant and useful WF. Thanks again to ALL of you as you have been a great help and we greatly appreciate all of you for taking the time to share your collective knowledge!

Thanks!

Frank

Userlevel 4
Badge +10

I am absolutely delighted that I was able to assist Frank Cheney!

Regards,

Patrick

Reply