Workflow Hung on Switch Statement

jmiskey
Kilo Sage

I have a somewhat complex workflow tied to a Service Portal request form that appears to be hanging inexplicably under certain situations.

When completing the request from on the Service Portal, the user first selects the type of request (Add/Modify/Delete), then selects the affected Applications.  This Application field is a multi-select variable based on a table we created.  So what my workflow does is it closes the original RITM that is created, then creates indviduals RITMs for each of the Applications that they select.  So if they enter three Applications, four RITMs will be created; the original, which is closed, and then the three new ones for each of the three selected Applications.

So the workflow fine works most of the time.  However, it does not seem to like one particular combination of Applications, particularly if I choose Application9 and Application16.  The workflow just "hangs" at my Switch statement, like this:

find_real_file.png

As you can see, there is no error.  It just doesn't progress to the next action.

My first thought was it is a data issue.  However, if I do a request for Application9 alone, it works fine.  Likewise, if I do a request for Application16 alone, it also works fine.  So that seems to suggest it probably isn't a data issue, if each one works by itself.

So, I next thought maybe it doesn't like doing multiple ones together.  So I tried a combination of Application3 and Application9 together, and it worked fine.  Then I tried a combination of Application3 and Application16 together, and that worked fine too.  So it doesn't seem like doing multiple ones together is an issue either.  It just doesn't seem to like this one particular combination.  I am at a loss at what the issue might be.

I don't expect anyone here to be able to tell me exactly what the problem is (without having access to my data and workflow, it would probably be very difficult to figure that out).  What I am hoping is that someone can tell me some techniques I can use to discover why my workflow is hanging.  Without any error messages, how can I figure out what the problem is?

Thanks

 

1 ACCEPTED SOLUTION

sachin_namjoshi
Kilo Patron
Kilo Patron

I will suggest you to add log statement using run script activity to print values of applications before switch activity.

This will help you to determine issues with any particular combination before switch activity.

 

Also, please check below useful KB article for troubleshooting stuck workflows

 

https://hi.service-now.com/kb_view.do?sysparm_article=KB0541991

 

Regards,

Sachin

View solution in original post

6 REPLIES 6

sachin_namjoshi
Kilo Patron
Kilo Patron

I will suggest you to add log statement using run script activity to print values of applications before switch activity.

This will help you to determine issues with any particular combination before switch activity.

 

Also, please check below useful KB article for troubleshooting stuck workflows

 

https://hi.service-now.com/kb_view.do?sysparm_article=KB0541991

 

Regards,

Sachin

jmiskey
Kilo Sage

OK, I will take a look at those things.

One more detail I should have mentioned.  It successfully creates the two new RITMs, it just seems to hang up on the workflow of the first one that is created (oddly enough, it is the first one that is hung up, not the last). 

So, if the original RITM that gets created is number "1", it then creates RITMs "2" and "3" for the two applications.  It is number "2" that is hung up, not number "3".  Number "3" works as it should.

jmiskey
Kilo Sage

I have been going through those trouble-shooting tips, and haven't figured it out yet.

But further testing has revealed something else -- sometimes it works!  So, I cannot consistently reporduce this error with these two values.  Sometimes it works, sometimes it does not.  

I did notice that it happens most often in the afternoons, when our sub environments seem to "lag" a little.  I wonder if it is a timing issue, and I need to increase my one second timer to make sure that variable has a value when that part of the workflow is hit?

Very odd...

What do you mean by your sub environments.  Is this doing some sort of integration thought the workflow with these apps?