All of those who have been developing workflows must have experience the problem workflow is hanging or remains in process state even after it is completed. I can not explain you in my last project we had face this issue and it took us so many days to understand what the reason was and how we resolve it. I would like explain it step by step the approach we followed. It was basically a parking workflow whose purpose was to post the document once it is approved. This functionality was tested successfully in Development, Quality and UAT but in production all of sudden the workflow is not able to post anything all the workflow remain in process when they were suppose to be completed and posted. This is how we started looking into the issue.
- SWPC is the transaction where we can see all hanged workflows. It shows all the workflows which are in process status and can be restarted from here.
- First idea was to continue the workflow again as sometime because of ongoing basis activities execution can get interrupted. Tried it but was not able to succeed.
- So next thing to look was for some dumps in ST22. Sometimes because of RFC authorizations the workflow hangs but surprisingly there was no dump. So have to move on next step of research.
- Next step was to look into SM21 log after continuing the workflow. So here we found something strange. Some authorization issue for WF-BATCH user to execute the program. We got excited and asked our security team to provide the authorization for the same. It took 2 days to get the authorization and we were like pretty sure that it will work now. Surprisingly the issue still did not get resolved even after the authorization.
- Next approach was to look into SMQ1 to look if something is struck in the Queue or something but surprising it seems ok. Then we googled it and found some hit and trick sort of solution which was, as we have created a subtype for our business object some people suggested to regenerate it. We tried but end result was the same.
- Then the place where our last hope was to check the TRFC log in SM58 which WF-BATCH uses. We found one surprisingly red entry as soon as we continued the workflow a connection closed error was issued there. We tried it 3-4 times and it was happening. We were somewhat confident now that it’s related to Workflow basic configuration.
- To resolve the issue we again perform the workflow customizing and to our amazement it posted.
That was the party day for us because after days of R&D the issue was ultimately resolved. The idea to write this was to share with you the various possibilities’ for workflows which hang. I have taken my first step by sharing what i learnt in last few weeks and i hope it will help someone out there. Please feel free to add your comments or enhance this blog.
“When knowledge gets divided it automatically gets multiplied.”