Run if error - cannot determine the condition


Badge +9

I have a workflow that uses a query action that queries items from an external content type and stores the ids in a collection variable.

After that I have another query action that queries from my second list that stores ids in another collection variable.

197029_pastedImage_1.png

The next action is a ForEach that goes through the first collection variable and then a collection operation that checks to see if the id number exsits. I have a runif action that that runs if the item does not exist. If the id doesn't exists then the item gets created in my second list.

The issue is the runif action is showing an error of "cannot determine the condition" , yet it still runs the condition. The workflow is not failing however intermittenly the item doesn't get created in my second list.

197051_pastedImage_1.png

The run if is configured as follows:

197052_pastedImage_2.png

I don't know why the condition isn't working at times. Any help would be greatly appreciated.

Thanks!!


12 replies

Userlevel 6
Badge +12

Hello ‌ - 

Where are you setting yesno in the workflow? My suspicion is that it cannot evaluate the value of the workflow variable, but not 100% since there may be more I am unaware of.

Let us know.

Badge +9

Hi Jesse

Thanks for the response. Well, the yesno variable is being evaluated in the collection variable. So after the foreach action, I have the collection variable that contains the yesno variable:

197031_pastedImage_1.png

Here is my Foreach

197058_pastedImage_1.png

After that comes my collection variable

197032_pastedImage_2.png

Badge +11

Hi Rency,

did you try to log the value of your "yesno" variable directly before evaluating it? Maybe it isn't what we would expect. I have seen Nintex Workflow having issues evaluating true/false before. Solution for me was to switch from true/false to 1/0, which works more stable. But I'm not sure if this is applicable for you.

Cheers

Philipp

Userlevel 6
Badge +12

Rency Gonzalez‌ - 

Along the lines of what Philipp Lucas‌ stated; check to ensure that the results are what you are expecting. I would use a Log to history action or even email to yourself so you can check to see what is in the variable yesno and step through it that way. It could be as simple as syntax such as Yes/No vs yes/no.

Have you tried to change your Run If action to be Exists = No not no (uppercase vs lowercase)? 

Check those and let us know how things workout!

Hope this helps!

Badge +9

Hi Philipp

I ended up rebuilding the run if again and republished my workflow now I am getting this new error. I also used the log in history to see if yes/no was being evaluated. It is crazy because this workflow was running fine before and it randomly stopped working.

197099_pastedImage_1.png

Badge +11

Do you know what action inside your workflow is causing this error? Could you provide us a screenshot of this actions configuration please?

Badge +9

So I ended up reconfiguring an action and adding a step to the workflow and that seemed to work! So this workflow is to run every hour to bring new items into my list. It worked fine at first but now I am getting the following errors:

197109_pastedImage_1.png

197110_pastedImage_2.png

Userlevel 7
Badge +17

This may not be your issue because of the way the scheduler starts up from a timer job, but, I try to always remind myself to not be logged in as the system account or farm admin when building or configuring workflows. It will lead to issues. 

But again, the scheduler may be injecting the system account into the workflow history and this not be your problem.

A Shim execution is a new error to me. On the CMS Scheduled WF failed to start. Is this truly from a scheduled workflow or is that the name of the wf? Is it started from a start workflow action? I ask because it looks like other actions are running before this mark.

Badge +9

Hi Andrew

I am not logged in as the system account, I am actually logged into my own account however it is showing as System Account which is very odd. I ended up doing the following in hopes to capture the errror. After implementing this my workflow has been working and hasn't failed.

http://vadimtabakman.com/nintex-workflow-restart-a-child-workflow.aspx

Userlevel 7
Badge +17

Error Handling is a great step to enhancing workflows. So after setting this up you haven't had any issues to test against?

Badge +9

Hi Andrew sorry for the late reply but correct after setting it up I haven't had any issues.

Userlevel 7
Badge +17

Ok, let's mark this assumed answered believing we changed how we initiate workflows or while changing the error handling we affected something else. Keep us posted though.:) 

Reply