Skip to Content
avatar image
Former Member

Workflow error handling

Hi Workflow experts,

We have a custom FIORI request approval application and needs to track down the error requests seperately.

For that, We are creating 'Workflow system error monitoring report'. Basically the core requirement is, when error occurs like Email ID missing, Agent not determined, method cannot be executed,TRFC connectivity issue, dump issue Or network issue, these issues should be updated as 'System error' in that monitoring report. After displaying the error entries into report, Our IT local team will have an authority to resolve that and redirect to corresponding approval by using button.

Point 1. For tracking the workflow error, we can run a report in background every 2 min for tracking workflow error request and update into monitoring report. Will this be good idea to follow this process?

Point 2. Is it feasible to redirect to previous/ next approval once system error resolved?. Actually once workflow gets into error we are having feature to re trigger from SWPR/SWPC tcode that will help to continue the flow from where it got struck and not help to redirect to previous/next approval. In this case, how to achieve this? Kindly provide your expertise on this. Thanks.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • May 21 at 03:22 PM

    Let me put it a different way:

    What is more efficient: Scanning for a status every 2 minutes or reading it when you need the information?

    If you're writing code to duplicate workflow statuses and trying to model system errors I would suggest rethinking your approach.

    System errors should be rare, any expected errors should be modelled if you have specific requirements on how to handle those. So something like: determine agent -> if fail, route to someone else to correct and approve.

    Add comment
    10|10000 characters needed characters exceeded

    • I've been building custom workflows for well over 10 years and have never replicated a workflow status into another table. Data modelling 101. Rather focus your efforts in building a robust application that minimizes failure.

      Workflow errors should be technical in nature and for exceptional situations that should be handled centrally. SAP already provide you the tools you need: ST22, mails to the WF administrator, SWI2_DIAG, SM58, Solution Manager, CCMS, etc.

      Why write a report that duplicates all that? How are you planning to catch all these scenarios? Remember your WF won't go into error in many scenarios. And think about the test effort. Just make sure you have processes in place for dealing with these situations for all applications, not just for one.

      To 2: Pushing a status to the application is always a bad idea. You can read the WF status when needed and publish that in your application. There are many ways to recover a failed workflow, how will you deal with resetting the status in each case?

      Good luck.

  • May 21 at 08:22 AM

    To Point 1: No I don't think it's a good idea. SAP already provide good error monitoring capabilities, why do you want to redevelop the same thing?

    To Point 2: Model this in your process, that's what workflow is for!

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Mike,

      Thanks for your response.

      Point 1 : Yes. There are error monitoring program to restart from error state. But, My UI5 application is a custom app which has custom table and fields. This has to be updated for respective requests which particularly goes into error. For every error request, my custom table has to be updated with 'Error status'.

      Point 2 : Yes. If workflow gets system error, where do we have to apply our custom logic program?. Basically if workflow gets into error, even if we resolve the error, we can't redirect the same error workflow to previous /next level approval rite because the status will be 'Error... (Or else), Is it possible to trigger an event when error occurs right away?. So that with an error event triggering we can write custom logic to redirect the approval process? Please correct me if i am wrong. Thanks.

  • May 22 at 02:33 PM

    Hi,

    You can also take help of the fm SWP_WORKFLOW_LOG_READ read workflow log.

    Thanks

    Add comment
    10|10000 characters needed characters exceeded