cassymfreeman

Re: Ability to cancel a workflow

Jump to solution

hi

yes you can specify the PO approval workflow in the terminate workflow action as you have done in the second screenshot above, that would work. 

All except current workflows will terminate all workflows running on the current item (the one where the workflow was selected in the context menu) aside from this workflow, where "this workflow" is the one I pictured; terminate other workflows and delete item.  "this workflow" is not your PO approval workflow, as that is an entirely different workflow.

If you specifically choose to terminate workflow "POReqApprovalNumber" that will cancel that workflow on the current item, not all items.  Does that make sense?

0 Kudos
Reply
cassymfreeman

Re: Ability to cancel a workflow

Jump to solution

this will not work.  End workflow terminates the current workflow on the current item (I.e. cancelling the workflow you have pictured) so it would cancel the workflow before it reaches the delete item action.

0 Kudos
Reply
cassymfreeman

Re: Ability to cancel a workflow

Jump to solution

Deleting the item will terminate the workflow but not nicely - i.e. you will have tasks for the deleted item in the workflow tasks list still as pending.

Reply
jesse_mchargue
Nintex Employee
Nintex Employee

Re: Ability to cancel a workflow

Jump to solution

Yes, I just did that test and you are correct; any tasks that are associated to the item will remain and be left as is. This is not the desired result at any time so avoid doing that

I did try your approach with creating a simple workflow to terminate all other workflows and then deleting the item and it does work.

I had to break it apart and do it step by step because the termination and deletion was happening so fast that I was not sure that everything was firing properly. This approach will terminate all other workflows that are running on the item and clean up any tasks that are associated with it (I did confirm this). It will then delete the item from the list.

I did change the start form for the "Delete" workflow to provide a warning step for users:

You can change the wording to fit what you need, but I like this simply because it adds in another step/click for them to think about and not just say they did it on accident! One click can be an accident, but two on two different pages...that is not an accident.

Cassy Freeman‌'s idea is straight to the point and works. I approached it as reuseable across multiple lists if required, but I do not think you need that.

Yet again, multiple ways of doing the same thing

Hope this helps and provides some insight! I learned some things today

Reply
cassymfreeman

Re: Ability to cancel a workflow

Jump to solution

How did you get on ‌?

Reply
sharepointsean

Re: Ability to cancel a workflow

Jump to solution

Hello ‌,

I will trying this solution later today or tomorrow. Just getting back into the swing of things after the holidays and playing catch up right now.

If this works out as planned it will be a huge help.

Thank you for following up Cassy

Reply
sharepointsean

Re: Ability to cancel a workflow

Jump to solution

Hello ‌,

I have just tried the workflow that you suggested and it worked like a charm! Thank you for your suggestion and input on this one.

But this workflow and the idea of letting the end user cancel their own PO and workflow has opened up a few other questions.

Once the workflow was created it was available from the menu by clicking on the ellipsis, as seen below:

This would be easy for the end users to get a, but then they go to another page where they have to click on the Start button to actually start the workflow to delete/cancel their PO request, as seen below:

The discouraging thing here is that some users will not do this because there are to many steps (in total there are three steps to complete this) or the will not read the screens and close the window instead of clicking on the Start button.

I thought of creating another workflow using the Start Workflow action and then having this workflow start the Cancel PO Request workflow that I created based on you suggestion

Have you seen or heard of a way to have a column in your SharePoint list with a link or a button, that when the user clicks on the item it will start the Nintex workflow for the end user. In essence the "one click" solution for the end user.

Also this "one click" link/solution would have to be created for the end user when the record is created. In other words, I would have to add this process to my existing workflow.

Thank you for your assistance on this Cassy.

Reply
cassymfreeman

Re: Ability to cancel a workflow

Jump to solution
Reply
jesse_mchargue
Nintex Employee
Nintex Employee

Re: Ability to cancel a workflow

Jump to solution

‌ - 

I would suggest to customize the start form for that workflow (something like I posted above) and use that as a "warning" screen for what they are about to do.

In terms of a link in the list itself, it can be done, you just need to figure out how to populate it. I would imagine that you can hack the URL apart for the Cancel PO Request WF and then go from there. Since it would have to be specific to the item you are running it on, I do not think there is much more to it.

Reply
jesse_mchargue
Nintex Employee
Nintex Employee

Re: Ability to cancel a workflow

Jump to solution

Just a bit of playing around, and you can create the URL. It will look something like this:

Now the Template GUID and Source List URL you can simply copy and paste from the URL on the Start Workflow page (you can copy and paste the whole this except for the ID really, but lets make this reusable ). You can grab your weburl, list id, and item id from the workflow easily. It will look like this:

Sorry it looks like a CIA report...

The only issue I have had is getting into a field within the list that is clickable. If I have more time later I will take another stab at this.

Reply