Building Nintex Workflow in Sharepoint 2013


Badge +2

Hello, I am relatively new to Nintex and trying to get some help on the right approach/best practice for building a workflow using Nintex workflow for a list created using Sharepoint 2013.

Workflow process: Determined by 2 variables

  1. Saved or submit for approval - set up as drop down field (not sure if this is the best approach)
    1. Choosing saved does not trigger workflow
    2. Choosing submit for approval starts workflow based on value (see #2)
    3. User gets email notification
  2. Value
    1. Below a certain value routes to one approver
    2. Above a certain value routes to a different approver
    3. Approver gets email notification

Desired outcome:

  1. User should be able to submit a saved record for approval, thereby starting the workflow
  2. If an approver rejects a record, it should go back to the user who can make changes and resubmit for approval

I was able to build workflows using run if statements that fulfilled both requirements. The challenge I had was either submitted a saved record for approval or rejecting a record. In both cases, the workflow wouldn't restart.

Any guidance or suggestions would be much appreciated.  I also tried using state machine but with no success.  Thanks much.

Thomas


16 replies

Badge +16

OK so you need some starting conditions as follows:

Start on item creation conditional on status = Submitted:

Start on item modified conditional where status = Submitted and old status <> Submitted (i.e. a previously saved record has been submitted):

Badge +16

OK for the second part.  inside your workflow have a set a condition to check the value is what you need it to be - in this example I was checking was >= 100.  if it was I set the approver to you, and if not I set the approver to me (using a person type variable vPersApprover):

Then I use a state machine to move between approval and rejection as required:

The intial state is "Approval".  This assigns a flexi task to whoever we populated in the variable vPersApprover.

If rejected, an email is sent to initiator and the item status is updated to "Saved".  Then it changes the state to "Changes required".  In that state the workflow will wait for the status on the item to be updated again to "Submitted".  That means that the user accessed the item, made changes and submitted again.  Then the workflow wakes up and changes state back to "Approval".  You can do that loop as many times as you like.

If the approver approves the request the initiator gets emailed that all was fine and the state machine ends.

Does that help?

Badge +2

Hi Cassy,

First off, thanks so much for your quick response.

I created the workflow as you indicated with a few revisions to the flexi task.  I created a drop down field to capture the status of the request (Saved, Pending Approval, Approved, Rejected) based on the current state.

205935_pastedImage_3.png

Here are the scenarios when the status field is not updating correctly:

  1. A record is saved - status shows as pending approval instead of saved
  2. A rejected record is resubmitted for approval - status shows as rejected instead of pending approval. The workflow itself is working fine.

Overall, this has been a big help. If we can address the 2 minor issues above, I am good to.

Thanks,

Thomas

Badge +16

what sort of form are you using to save the item?  InfoPath?  Nintex?  SharePoint out of the box?

Sounds like your list has content approval on - is that the case?

Badge +2

I am using Sharepoint out of box to save the items.  I checked content approval and it is turned off along with item version history.

Badge +16

So how do you know if the item is saved or submitted?

Badge +2

My goal was to use the drop down field that indicates if the record is to be saved for submitted for approval and link that to the status field. If the user selects saved, then the status shows as saved whereas choosing submit which would show as pending approval.

Is there a different approach you would recommend? I also thought about having separate buttons for saving vs. submitting but not sure if that can be done using Sharepoint.

Badge +16

if you have a dropdown indicating the status then use that column on your conditional start?

Badge +2

OK, I made the changes and added another condition. Saving the record now updates the status to saved.

 

If I resubmit a saved or rejected record, the status shows as either saved or rejected instead of pending approval. Any suggestions? Thanks.

Badge +2

Hi Cassy,

I came up with a partial solution by adding an update item to the approval state. If I resubmit a saved record for approval, the status now shows as pending approval. This doesn't work for rejected records though and the status still shows as rejected when I resubmit for approval.

I added the status column to my modified conditional start as you suggested but it's not updating the status correctly. Guessing I didn't set it up right.

Any help would be much appreciated.

Thanks,

Thomas

Badge +16

Hi Thomas

i will be back on tomorrow evening I'll take a look then.

thanks

cassy 

Badge +16

Where does the "Pending Approval" come from.  Is that an option in your status?

Badge +2

Hi Cassy,

That is an option in the Request Status field which is a drop down. I'm trying to get have that field auto update to match the current status.

Thanks,

Thomas

Badge +16

I think you're going to need to customise your input form so that you can control when an item is saved and submitted without asking the user to choose it from a dropdown?

Badge +2

OK, any suggestions on how to go about that (have 2 buttons that allow user to either save or submit?  Does the form need to be customized using Infopath or can that be done using SharePoint?

Badge +16

I don't know of a way you can do it with SharePoint but you can do it with InfoPath or Nintex Forms,

I would have one button that is Save and changes status to Saved or Awaiting Submission and another button that is Submit and changes status to Submitted - this will then hook into your workflow.

Reply