You are viewing limited content. For full access, please sign in.

Question

Question

String Was Not Recognized as a Valid Boolean

asked on December 4, 2015

I have a workflow that is setup as follows:

When a document is processed and has a SSN it goes down the SSN path. When it then hits the "Employee Found?" section, it processes through correctly because a result was found from the "Query Employee Name in Skyward by SSN".

However, when a document is processed and has a District ID, it goes down the District ID path, but when it hits the "Employee Found?" section to see if a result was found from the "Query Employee Name in Skyward by District ID" it gives an error message of "String was not recognized as a valid Boolean." It doesn't make sense because the "Employee Found by District ID" path has a single condition as follows:

Does anyone have any ideas why I am getting this error message?

1 0

Answer

SELECTED ANSWER
replied on December 7, 2015

Hello Blake,

 

I was able to reproduce your problem. For me, it is due to the "queryemployeenameinskywardbyssn_results found" not being created since the first branch in the first conditional doesn't run. Then, the "Employee Found by SSN" will try to evaluate a non existent token as a Boolean which results in the error for me at least.

One way to check if this is the case is to see if there is a warning from workflow stating that the token stated previously was not created.

0 0
replied on December 7, 2015

Winston, that was indeed the problem. I tried a test by adding a conditional sequence into each the SSN and District ID paths in the SSN or District ID? decision. After doing that, the workflow worked correctly.

I would have expected the Conditional Decision to see that there was not a value for the token and to move onto the next branch instead of terminating.

0 0
replied on December 7, 2015

Yeah, I will be sure to bring that issue up. Thank you.

Also instead of a conditional sequence, you could duplicate the original conditions in "SSN or District ID" into the conditions for "Employee Found?" which would check if there was an SSN or District ID.

0 0
replied on December 7, 2015

Blake - In this case the logic performed as expected and threw the error _because_ the determining token was not initialized.  I think you would have a difficult time troubleshooting a conditional sequence if you had it ignore the leg if any determining tokens were uninitialized. 

Going back to the earlier post; one way to avoid an uninitialized token is to explicitly initialize the determining tokens at the top of the workflow and change their value as necessary later in the workflow.

1 0

Replies

replied on December 4, 2015

For one of the problematic instances, view its details and check the tokens to see what value is returned by %(QueryEmployeeNameinSkywardbyDistrictID_Results Found). If the token doesn't exist, then can you confirm it's going down the correct branch in the "SSN or District ID" activity?

0 0
replied on December 4, 2015

So that's the interesting thing, the result comes back as true, but when it hits the "Employee Found?" section, it just stops. It does not even go down one of the paths within it.

0 0
replied on December 7, 2015

Here is a screenshot of the workflow process for one of the instances that is failing and also a screenshot showing that results found comes back as true.

0 0
replied on December 4, 2015 Show version history

Blake - As another option what about creating a token in the 'Create Employee Tokens' activity called 'FoundStatus' and set it to an empty string.  When the workflow runs through the 'SSN' leg and a record is returned then assign a value of 'BySSN' to the 'FoundStatus' token, if the workflow runs through the 'DistrictID' leg and finds a record then assign it a value of 'ByDistrictID'. 

Then in the 'Employee Found?' conditional sequence just evaluate the contents of the 'FoundStatus' token to determine your next response.  The token is either going to contain the value 'BySSN', 'ByDistrictID', or it is empty (no record found).

If you use the token as a sort of global workflow value then you don't need to worry about the correct token being initialized in later legs of multiple conditional sequences.

 

0 0
replied on December 4, 2015

Cliff, that is a great idea and I might take your advice. I just want to make sure if it's a bug that someone knows that it needs fixed.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.