How can my workflow be completed and still running at the same time?


Badge +2

I have a UDA for our basic approvals that includes an End Workflow if the item is rejected:

Nintex_approval_UDA.png

 

It runs fine and completes all the rejected actions. But, on the SharePoint history list, it shows that the workflow is Completed:

SP_library.png

SP_history.png

 

And, on the Nintex history list, it is under Running Workflows and shows the UDA in yellow:

Nintex_history.png

 

Has anyone run across this problem before? How can I make the workflow complete on both?


4 replies

Userlevel 5
Badge +12

Hello,

 

I believe this is happening because you are ending the workflow abruptly from inside of the UDA, so the workflow itself doesn't know that it completed gracefully.   Can you run the scenario where the "End Workflow" action does not take place within the UDA and test to see if all lights are green?

 

  As a workaround, would recommend using a variable that is output from your UDA to let the host workflow know that as soon as it exits the UDA that you want to End Workflow.   You may have to change a bit of your logic inside of the UDA to pull this offer, but it should work.  Your alternative is to use a Snippet which can be reused throughout your workflows (of course the logic is viewable by all).

 

Thanks,

Mike

Badge +2

Thanks so much for the reply Mike! I thought about using the variable too so I will give that a try. Just wanted to make sure I wasn't missing something.

Amy

Badge +2

Mark,

Just to follow up, I used a variable in the UDA to end the workflow when it got back to the main workflow and it worked great. My gut told me ending the workflow in the UDA wouldn't work...I should have listened! happy.png

Thanks again!

Amy

Userlevel 5
Badge +12

No problem Amy, glad to have helped! happy.png

-Mike

Reply