Copyright 2024 - BV TallVision IT

When working out what's wrong with a certain workflow, there is a wide variety of tools available. The most common problems are listed here, with a clear hint to a solution and the tools to use. These problems or steps-to-check can be used to help identify the problem, but it is also a very good way to help understand the merits of Workflow. About 80% of all "workflow not working" problems would have been identified and resolved by following this simple steplist. 

Workflows that have been developed already

1. A sign of life - where can it be found ?

Check your inbox if you expect to be a receiver of a work item. The inbox of SAP is tucked away under a smart little button on the very first SAP screen. Would you like to find your workflows which are not in your inbox or workflows which do not actually include dialog work items (thus: in nobody's inbox), use reporting: Business Workflow > Reporting > Work Item analysis > Work Items per task.

2. Getting a closer look - the workflow log

Wherever workflows or work items are listed or reported (in the inbox or e.g. via a report: Business Workflow > Reporting > Work Item analysis > Work Items per task) a dandy little Icon brings you to the very valuable workflow log.

    The workflow log can be used to e.g.
  • find out the agents for work item (before it is executed) (button:agents)
  • find out who executed the work item (after execution) (button:agents)
  • which steps have been executed / can still be executed on the flow (graphical overview)
  • check the available variables of containers (technical details)
  • find out what went wrong in case of errors (technical details, red traffic lights)
  • determine the task number (technical view, container element workItem or Step)

3. It's not working ! - time to check the triggering of events

Without events there may be workflow, but it will never be triggered. If expected workflow is not showing up in inboxes or reporting, the event log can be used to find out more about actually throwing events. It's in the menu, but transactions SWEL and SWELC are much easier to remember. SWEL is a report on the actual log, and SWELS allows switching it on and setting restrictions.
Use the event log to (1) find out whether the expected event is thrown (created) and (2) to find out whether the event was received (or whether receivers were set up for the respective event). Also check (7) after this topic...

Newly build workflows or workflows that have undergone changes

4. Health check: business object

A business object and the components you want to use should be released before using them. In the Business Object builder (Business workflow > Development > Definition tools > Business object builder) go to the menu Edit > Change release status. Make sure all components (e.g. methods, events) are released. When this is done, generate the business object and resolve any errors it reports.

5. Health check: task - focussing on the execution of a method

To execute a method from your business object, a task needs to be set up calling the respective method. Use transaction PFTC as a starting point, choose type TS for tasks. Executing the task (or activity task) implies executing the method. Tasks can have their own triggering event (single step tasks) or be part of a workflow (or both). Tasks that don't have a triggering event and are not incorporated in a flow will never be called/executed. Triggering events need to be activated, which can be checked on the "Triggering events" tab.

6. Health check: task - dialog work item

Putting your task in an inbox. Tasks that should be presented to an end user should have the following settings:

    Single step task
  • A triggering event should be available and activated
  • Agent assignment: possible agents for the work item must be maintained. By setting the task up as a "General task" there are no restrictions to possible agents. The system will choose from possible agents who the actual agents will be. If there are no possible agents, the work items will error !
  • Default rule: if the possible agents is set to "all" (General task) the actual agents must be determined in the "default rule" - omitting this setting will send the work item to everybody on the system
    Task (activity) incorporated in a workflow
  • No triggering event needed as the workflow makes sure your task is triggered
  • Make sure the possible agents are set up (by e.g. setting your task to "general task")
  • Make sure your (actual) agent is assigned

7. Making sure your flow starts

Workflows (or single step tasks) always start from a (triggering) event, which you should be able to find (tab "Triggering events" on the task or flow). Creating this event can be simulated or actually done to see whether your task starts. In Development > Utilities > Events > Create event the details of your event can be entered and the button "Event receiver" will list the tasks that are currently set up to be triggered. Does your task show up ? If it does, you can try to create the event and check whether the workflow runs as expected. This should tell you whether the problem is the actual triggering triggering or processing (after triggering). Also check (3) after this topic...

8. The task is fine and so is the event that triggers it.

But the event is not triggered... If your event is meant to be triggered from ABAP source using function module SWE_EVENT_CREATE do check whether a COMMIT WORK is done after calling SWE_EVENT_CREATE. Triggering from change documents should be set up in transaction SWEC.

9. Test your method without putting it on a task first

Methods can be tested without workflow via the test button on the business object. If your method is not selectable, hit the "Create instance" button first. You may want to put a break-point in your code first.... Happy debugging !

10. Test your workflow without worrying about the triggering

Indeed it can: Via Business workflow > Development > Runtime tools > Test workflow a workflow can be triggered without using it´s triggering events. Good way to see things work before setting up triggering properly !?

There are some more of these available: Resolving workflow problems - 6 more steps.