Вы находитесь на странице: 1из 53

Workflow Monitoring in SAP EBP 3.

5
Best Practice for Solution Management
Version Date: January 2004
The newest version of this Best Practice can be
obtained through the SAP Solution Manager

Contents
Applicability, Goals, and Requirements ....................................................................................................2
Best Practice Procedure and Verification.....................................................................................3
Preliminary Information ......................................................................................................................3
Workflow functionality...................................................................................................................4
Procedure ...........................................................................................................................................6
Monitoring Tools ...........................................................................................................................6
Workflow Monitoring...................................................................................................................42
Further Information .................................................................................................................................51
APPENDIX: Work Item Archiving ...............................................................................................52
Best Practice: Workflow Monitoring in SAP EBP 3.5 2

Applicability, Goals, and Requirements


This Best Practice gives an overview of workflow monitoring, the main tools and their functionalities.
This enable the workflow administrator to optimally maintain and manage the SRM business
processes based on workflows (WF).
In order to ensure the performance of the entire SRM system, you should take into consideration that
the creation of many workflow logs can cause extreme growth in the workflow related tables in the
database. In the Appendix you will find recommendations on how to archive work items.
This Best Practice will describe the workflow monitoring activities, which should be carried out in
particular in a productive environment and on a continuous/permanent basis. Therefore, the focus of
this Best Practice will not take into account Customizing activities that are considered already
complete. However, in the chapter Monitoring Tools, paragraph Customizing Transactions there is
an overview of the main transactions required in order to check if workflow customizing is correct,
should customizing be changed during your workflow optimization process.

Goal of Using this Service


The workflow and its functionality play a central role in the SRM (EBP) business processes. To run an
operation without errors and delays it is important that all process steps in the workflow are monitored.
Workflow monitoring ensures that the SRM business processes run in a smooth and reliable way. This
Best Practice documentation supports the implementation of workflow monitoring and the
development of the SRM workflow monitoring concept.

Staff and Skills Requirements


System and workflow administrators and other persons responsible for workflow management are the
target group of this document. It is necessary to specify an SRM workflow administrator. This
administrator monitors the business workflows and ensures undisturbed operation. The responsibilities
and different tasks must be defined in a workflow monitoring concept.

System Requirements
The information in this document refers to releases EBP 2.0/3.0, SRM 2.0 and higher. For system
access, use the SAPGUI.

Duration and Timing


Workflow monitoring should be carried out in all parts of the SRM Business Process which use
Workflow. Monitoring should be carried out at least once per day, depending on usage of Workflows.

2002 SAP AG
Best Practice: Workflow Monitoring in SAP EBP 3.5 3

Best Practice Procedure and Verification


Preliminary Information
There are several ways of defining workflows:
A workflow is the automation of a business process, during which documents, information or tasks are
passed from one participant to another for actions, according to a set of procedural rules. Workflows
links together separate business tasks into a business process. The workflow supplies the right
information at the right time to the right people, distributing the work according to business rules.
The following supplies another more common definition:
A workflow is the computer-supported modeling and performance of a business process. A Workflow
Management System is a computer system, which can define, perform and monitor workflows. These
descriptions are based on the Workflow Management Coalition (WFMC) definition. The WFMC is a
non-commercial organization, which standardizes and encourages the use of workflow systems. SAP
participates in the WFMC.
The usage of workflow within business processes returns different benefits. The Workflow
Management Systems improve the communication between processors by integration in a mailing
system. The system determines the processor of a workflow activity by specified rules (competences)
and assigns each activity to the appropriate processor. Workflows allow monitoring deadlines to
ensure that each activity is performed within its deadline and use statistical functions to analyze
processor and group workload and efficiency.
As a simple example we could use an approval procedure using a Workflow Management System for
a material requirement request. Figure 1 shows the graphical presentation of this process. The
following explains the process steps involved and the persons belonging to this workflow.

Figure 1

2002 SAP AG
Best Practice: Workflow Monitoring in SAP EBP 3.5 4

An employee creates a material requirement request, thus starting a workflow. The material
requirement request is presented electronically to the employees superior for approval. The manager
can approve or reject the request. Should approval be given, the employee is informed. There may be
subsequent steps (e.g. create a purchase order and send it to a supplier).
If the manager rejected the request, the employee is informed and can decide whether to revise or
abandon the request. The employee can abandon the request, at which point the material requirement
request is deleted in the system and the workflow ends. If the employee decides to revise the request,
the request change function is offered in the next step, and the changed material requirement request
is resubmitted to his or her manager for approval.

Workflow functionality
A workflow is a sequence of steps, which are processed either by people or by the system. Workflow
links together separate business tasks into a business process. It provides with an active flow of
information:
Supply the right information at the right time to the right people
Distribution of work according to business rules
Exception handling and deadline monitoring
Five questions for every part of an SAP Business workflow process are:
What
When
In what order
How
Who
Workflows are widely used to automate different business processes within SRM. For example, in
order to automate the routine administrative procedure of new user creation, workflow was used. It
includes creation of a new user request and changing users logon data.
Many people are involved in the business processes of the procurement scenario and have different
roles and functions (buyers, managers, sellers etc.). They deal however, with the same items
(products), which are covered by different kinds of documents created dependant upon each other. It
therefore makes sense to wrap them in one object. A common object is Workflow, of which several are
predefined in SRM. These include:
Creation and processing of shopping carts
Processing of confirmation of goods/ services
Processing of invoices
Reconciliation of procurement card purchases
Component planning for PM orders and projects
Creation of vendors and bidders
SAP Business Workflow lies on an integration level above the transaction / application level. It uses
existing application functions (for example transactions, reports and function modules). These
functions are not changed but they are linked to each other according to the requirements of the
business process.

2002 SAP AG
Best Practice: Workflow Monitoring in SAP EBP 3.5 5

Workflow terminology:

The following table describes


workflow terminology. It gives an
overview of the technical objects,
their definitions and lists an
example.
The example used is the process
of purchase requisition for
ordering a printer for an office.
Figure 2 shows a graphical
overview of the workflow
terminology and all technical
objects involved in workflow
process.

Figure 2

Terminology Definition Example


Workflow definition The set of rules which define the The method of processing a purchase
workflow paths (routes). The routes requisition. It includes the whole process,
may be linear, parallel or circular starting with the query and ending with
(loop). creation of the purchase order.
Workflow instance Mostly only referred to as the The processing of a purchase requisition
Workflow. Is a single workflow for an office printer.
execution.
Task These actions are guided by the Does a printer already exist in the office?
workflow. Tasks are carried out by
users (dialog tasks) with a defined
role in the workflow or by programs
(background tasks).
Work item A task instance processed as a Check the office for existing printers.
single workflow step.
Processor Person processes a task via a work The person with the request, the manager
item. approves the request, the member of the
IT department and member of the
purchasing department organise the
delivery
Roles These define the functions of the Requester, Approver
persons involved in the workflow.
Container This is the data collection used in A specified office, the ordered printer
the workflow.
Data flow The set of rules describes which In the purchase requisition process, the
data will be sent to which process required data are: office room number and
steps. information about the office equipment.
Data regarding the requestors cost center
are not necessary.
Object Created at runtime and the specific
instance of a previously defined
object type that has been assigned
values

2002 SAP AG
Best Practice: Workflow Monitoring in SAP EBP 3.5 6

Method (Object type The operation that can be executed


component) on an object
Attribute (Object The property or characteristic of an
type component) object
Event The status change of an object that
is "published" throughout the
system
Step The elementary module of a
workflow definition
Table 1

Procedure
The core of this Best Practice is the monitoring concept for all workflow steps within SRM. However, in
our examples we will refer only to the procurement process that takes place in SRM. In the following
diagram (Figure 3) we illustrate the procurement process classic scenario. There you can see the
importance of the workflow steps, the success of which ensures, for instance, that the follow on
document (Purchase Requisitions, Purchase Orders, Goods Receipts and Invoices) can be created in
the Backend system and that the work items can reach the correct persons for approval.

Figure3: SRM Procurement Classic Scenario

Monitoring Tools
Monitoring can be done using the standard reports that are available in the system. All these reports
allow the administrator to view a Work Item and the Workflow log in detail. They also provide the
possibility of using the general report functions, for example, sorting, filter, layout change, etc. Another
possibility is to define search criteria in order to suitably restrict the list of WF to be monitored. For

2002 SAP AG
Best Practice: Workflow Monitoring in SAP EBP 3.5 7

instance one can search for workflows that contain a particular task, component or for workflows
started in a defined period of time (today, last week, last month, last year, all).
A short overview of the main reports is provided here. In the following subsections, there is an
explanation in more detail of the transactions needed to view the above mentioned reports.
A useful step in monitoring a workflow is to check its status. The best report for carrying out such a
check is the report Work Item Selection transaction SWI1. This report allows the selection and view
of all types of work items resulting from the search criteria that have been defined.

Transaction SWI1
This report enables the selection and the view of all kinds of workflows by means of different selection
criteria. It is particularly helpful when searching for non-visible Work Items, since they are neither in
waiting nor in any workflow inbox. Moreover, using this report you can get an overview of special types
of Work Items, for instance background Work Items (Work Item type B), in order to check if they were
completed.
The selection can be carried out by means of the following criteria (please refer to Figure 4):
Type
Status
Work Item ID
Task
Creation date and time

Figure 4 SWI1 - Selection screen

2002 SAP AG
Best Practice: Workflow Monitoring in SAP EBP 3.5 8

For more detail about types and status of Work Items, please see the tables below:

Type Short Text


P Work Item that represents a remote Work Item (Proxy
WI)
E Work Item that waits for an event (Wait Step)
A Work Item that represents a Work Queue
W Dialog Work Item; represents a Single-Step Task
D Deadline Work Item; notification upon missed deadline
N Notification Item (No longer used)
B Work Item for Background Step
F Workflow (also Sub-Workflow)
C Work item that represents a Container Linkage
R Work Item that represents a Remote Work Item (http)
Table 2 Work Item Types

Status Short Text


Waiting Waiting (also Work Items in resubmission)
Ready Ready
Selected Reserved
Started In process
Error In error
Committed Executed (only if explicit End confirmation is
requested)
Completed Completed
Cancelled Logically deleted
Checked In preparation
Table 3 Work Item Status

If you execute the transaction without defined search criteria, by default all the Work Items from the
last hour will be displayed. If you enter a Work Item ID in the selection screen, the system will ignore
the other search criteria.

2002 SAP AG
Best Practice: Workflow Monitoring in SAP EBP 3.5 9

After executing the transaction, you will get a list depending on the search criteria containing
information such as Work Item number, status of the Work Item, Workflow task that created the Work
Item, etc. (see Figure 5).

Figure 5 SWI1 Work Item List

The layout of this list can be changed, for example adding or removing columns from the list. You can
define a personal layout selecting Settings -> layout -> change from the menu (see Figure 6).

Figure 6 SWI1 Layout settings of the work item list

2002 SAP AG
Best Practice: Workflow Monitoring in SAP EBP 3.5 10

You can select:


Columns to be displayed;
Sort order of the work items displayed;
Filter the list;
To specially customize the view and display of the list.

Figure 6a displays how to manage this in the system. Enter the Tab Columns (marked with the arrow
in Figure 6a) and choose the columns you want in order to modify the layout.

Figure 6a SWI1 Change layout of the work item list

2002 SAP AG
Best Practice: Workflow Monitoring in SAP EBP 3.5 11

To display the Work Item details double click on the item (see Figure 7 - marked with arrows a and
b). The details screen is different depending on the type of the work item. We want to show two
examples for the type F Sub-Workflow and type B Background Step.

Figure 7

For type F Sub workflow you will get the log of the workflow parent by double clicking on the
corresponding item marked with arrow a in Figure 7. This contains the history of the entire process,
including all sub-workflows (see Figure 8a).

Figure 8a SWI1 Workflow Log (Sub-workflow)

2002 SAP AG
Best Practice: Workflow Monitoring in SAP EBP 3.5 12

For a background type workflow step the workflow administrator will get detailed information about the
work item by double clicking on the corresponding item marked with arrow b in Figure 7 (see Figure
8b). To display the workflow log double click on the icon Log (marked with an arrow in Figure 8b).

Figure 8b SWI1 Workflow Log (Background job)

When the status of the Work Item shows an error you should look at the workflow log using the menu
EDIT -> DISPLAY WORKFLOW LOG. Here you can see errors that have occurred. The WORKFLOW
LOG is described in more detail in the corresponding section of this document.

Transaction SWI2_FREQ
This section gives an overview of the transaction SWI2_FREQ. This transaction lists work item per
task and allows determination of workflows within a specific time frame and a special work item type.
The selection criteria are as follows:
Monitoring period:
Today
Last 7 days
Last 30 days
Last 365 days
Time
Interval

2002 SAP AG
Best Practice: Workflow Monitoring in SAP EBP 3.5 13

Work item type:


Dialog
(Sub-) Workflow
Background
Task filter:
Task
Task group
Application Component
The only parameter that needs to be specified is Monitoring period (see Figure 9). Other parameters
are optional.

Figure 9 SWI2_FREQ

It is possible to select/list the work item by using a special work item type (e.g. only background types)
and additionally the filter functionality can be used (filter for a special application component). In this
screen the used selections are dialog work items today (see Figure 9).

2002 SAP AG
Best Practice: Workflow Monitoring in SAP EBP 3.5 14

The following Figure 10 shows the results of this selection. Here we see a list of work items sorted by
task types. The different tasks may be carried out more than once depending on task type.

Figure 10 SWI2_FREQ Work items per task

Per double click on a special task (marked with the arrow) you get a list of work items are related to
the chosen task type. The following figure shows the chosen task.

2002 SAP AG
Best Practice: Workflow Monitoring in SAP EBP 3.5 15

Figure 11 SWI2_FREQ Detail for a specified task

The workflow administrator gets information about the involved agents, time of creation and status of
the work items (see Figure 11).

2002 SAP AG
Best Practice: Workflow Monitoring in SAP EBP 3.5 16

The following Figure 12 shows the basic data about the chosen work item. The screen lists the work
item attributes such as status, priority, time of creation, time of processing, open requests. Further the
screen gives information about the description and attachments.

Figure 12 Work item Work item details

Choosing the Log-Button (it is marked with the arrow) the user gets the log file of the complete
workflow and can find information about this particular execution. Analysis and interpretation of the
information in the listed log file is described in the section workflow log in this document.

Transaction SWI6
Transaction SWI6 allows the user to determine workflows working with specific Business Object
instances and to analyze the status of workflow. The selection criteria are as follows:
Object Type Category- BOR Object Type
Object Type
Key
Selection variant
Task
Task group
Component
Selection Period

2002 SAP AG
Best Practice: Workflow Monitoring in SAP EBP 3.5 17

The only parameter which needs to be specified is Object Type (see Figure 13). Other parameters
are optional.

Figure 13

2002 SAP AG
Best Practice: Workflow Monitoring in SAP EBP 3.5 18

If the Key parameter is specified (see Figure 14) then only workflows using this Object instance with
the given key will be displayed in the next screen, otherwise all Objects instances will be listed.

Figure 14

2002 SAP AG
Best Practice: Workflow Monitoring in SAP EBP 3.5 19

Figure 15 shows the result of the displayed selection (see Figure 14). There are 4 workflows listed (1
two step and 3 one step approval workflows).

Figure 15

Select an item and click on Display workflow log (see green arrow in Figure 15) to display the
corresponding log of the workflow (Figure 16).

2002 SAP AG
Best Practice: Workflow Monitoring in SAP EBP 3.5 20

The corresponding log of the workflow is shown below (Figure 16)

Figure 16

The workflow logs and their analysis will be discussed in the section Workflow log of this document.

2002 SAP AG
Best Practice: Workflow Monitoring in SAP EBP 3.5 21

The field Selection variant exists in the entry screen of transaction SWI6. The Selection variant
parameter determines the type of instances to be selected (see arrow in Figure 17). There are 4
possible entries for this parameter and they could be chosen from dropdown list.
All Instances
Active Instances (Running, Ready, Committed,)
Finished Instances (Completed, Cancelled,)
Active Instances (All)

Figure 17

2002 SAP AG
Best Practice: Workflow Monitoring in SAP EBP 3.5 22

The next 3 parameters are responsible for the selection of workflows containing a specified Task, a
Task Group or a Component
The Selection Period parameter offers the possibility of selecting workflows run over a specified period
of time. In this example, all is selected as selection period (see arrow in Figure 18)

Figure 18

2002 SAP AG
Best Practice: Workflow Monitoring in SAP EBP 3.5 23

The second screen of transaction SWI6 consists of 2 parts. The upper part is a list of workflows
selected due to criteria defined in the first screen. The lower part is the detailed data for workflow
marked in the upper list. The data contains information about steps fulfilled in workflow, the status of
these steps, result of step execution; Time stamp and Agent assigned to appropriate step (see Figure
19).

Figure 19

By clicking on a step name, (see arrow in Figure 19) the workflow administrator sees a description,
and the objects and attachments associated with it.

2002 SAP AG
Best Practice: Workflow Monitoring in SAP EBP 3.5 24

This information is displayed in a small sub screen (see Figure 20).

Figure 20

2002 SAP AG
Best Practice: Workflow Monitoring in SAP EBP 3.5 25

By clicking in the second screen of transaction SWI6, the corresponding Agent for the selected
workflow opens. (See arrow in Figure 21)

Figure 21

The workflow administrator can then see a detailed description of the corresponding agent.

2002 SAP AG
Best Practice: Workflow Monitoring in SAP EBP 3.5 26

More detailed information about the agents assigned to the workflow and the different workflow steps
is displayed in a pop-up window (see Figure 22)

Figure 22

2002 SAP AG
Best Practice: Workflow Monitoring in SAP EBP 3.5 27

To see the workflow log for the item of interest, select it as shown (see Figure 23) and click on the
button Display workflow log (see arrow).

Figure 23

2002 SAP AG
Best Practice: Workflow Monitoring in SAP EBP 3.5 28

The corresponding workflow logs are displayed in Figure 24. Analysis and interpretation of the
information in the listed log file is described in the section on Workflow logs in this document.

Figure 24

2002 SAP AG
Best Practice: Workflow Monitoring in SAP EBP 3.5 29

Transaction SWI2_DIAG
This section gives an overview of the transaction SWI2_DIAG. This transaction allows you to check for
work items containing errors. SWI2_DIAG lists work items by cause of error and allows the diagnosis
of errors within a specific time frame. Optionally, the result can be filtered by specific tasks. The only
necessary parameter which needs to be specified is the Monitoring period (see in Figure 25). The
selection criteria are as follows:
Monitoring period:
Today
Last 7 days
Last 30 days
Last 365 days
Time
Interval
Task filter:
Task
Task group
Application Component

Figure 25 SWI2_DIAG - Work item containing errors

After choosing a specific time frame (in this example Today), please check the execution button
(marked by the arrow in Figure 25).

2002 SAP AG
Best Practice: Workflow Monitoring in SAP EBP 3.5 30

Figure 26, shows the results of this selection. There are 8 errors overall. This example lists 2 different
error types: one error in the cause Binding workflow to work item and 7 errors caused by
Miscellaneous.

Figure 26 SWI2_DIAG - Error list

Per click on the detail button (marked by the arrow in Figure 26) you can see the detailed explanation.
This detail list is shown in the figure 27

2002 SAP AG
Best Practice: Workflow Monitoring in SAP EBP 3.5 31

In this view you find information about the date and time of creation, the work item type, the work item
ID and the work item text.

Figure 27 SWI2_DIAG - Detail error list

For more information on a special error, double click on the item you are interested in (arrow in Figure
27). The following popup shows a detailed error explanation (see figure 28).

Figure 28 SWI2_DIAG - Error


With a double click on a specified item (see arrow in Figure 28) you can see a more technical error
description (shown in Figure 29).

2002 SAP AG
Best Practice: Workflow Monitoring in SAP EBP 3.5 32

Figure 29 Error text

In this technical description you will find an error message code (for example: Message no. WL821).
This message code is useful in searching for a SAP Note to help manage the problem.

2002 SAP AG
Best Practice: Workflow Monitoring in SAP EBP 3.5 33

Transaction SWI2_ADM1
By means of this transaction you can search for work items that are without agent assignment. This
section gives an overview of the transaction SWI2_ADM1. This transaction lists work items within a
specific time frame without agent assignment. The selection criteria are as follows:
Monitoring period:
Today
Last 7 days
Last 30 days
Last 365 days
Time
Interval
Task filter:
Task
Task group
Application Component

Figure 30

The only parameter which needs to be specified is Monitoring period. In this example, we are using
the selection for dialog work items from today (see Figure 30). Other parameters are optional. It is
possible to select/list the work item by using the task filter functionality (e.g. filter for a special
application component).

2002 SAP AG
Best Practice: Workflow Monitoring in SAP EBP 3.5 34

Figure 31

Figure 31 displays the results of the selection shown in Figure 30. To display a work item, select the
item from the list (in this example, the first one) and click on the button Display work item (marked
with an arrow in Figure 31).

2002 SAP AG
Best Practice: Workflow Monitoring in SAP EBP 3.5 35

Figure 32

Figure 32 shows the details of the selected work item as selected in Figure 31. To display the log
belonging to the work item click on the button Workflow log (marked with arrow in Figure 32).

2002 SAP AG
Best Practice: Workflow Monitoring in SAP EBP 3.5 36

The corresponding workflow log is displayed in Figure 33. Analysis and interpretation of the
information in the listed log file is described in the section Workflow log in this document.

Figure 33

2002 SAP AG
Best Practice: Workflow Monitoring in SAP EBP 3.5 37

Transaction SWUD
This transaction is the so-called Workflow Diagnosis transaction, which can be very useful should you
discover that a particular workflow is not working correctly. It is a sort of check list that contains the
tests you can run in order to find the errors in the workflow you are analyzing.
The checklist order is determined dynamically according to:

a) Your workflow definition and


b) The statistics of the most common mistakes made when creating/activating a workflow.

When you call the transaction SWUD, you get the screen shown in Figure 34.

Figure 34

2002 SAP AG
Best Practice: Workflow Monitoring in SAP EBP 3.5 38

It is subdivided in three areas (indicated with circles in Figure 35):


1. The first circle shows the workflow definition currently being analyzed;
2. In the center, a list with the test options is displayed;
3. At the bottom is a list of the last ten workflow definitions which were analyzed.

Any workflow accessed through this transaction is added to the last-used list. The workflow can be
recalled at a later date by clicking on the reuse icon in the left-hand column of the last-used list
(see arrow a in Figure 35).

As can be seen in Figure 35, you have to enter the task type (Standard task (TS), Customer task (T),
Workflow template (WS) or Workflow task (WF)) and the task (this is the ID that identifies the particular
workflow or task) that you want to analyze. You can also use the search help for a selection based on
standard search criteria (see arrow b in Figure 35).

Figure 35

In the following paragraphs, we will give you an overview of the four test options offered in the list and,
in order to accustom you to this transaction, we will illustrate the test options, by means of screen
shots. As an example the workflow WS10000129 One Step approval of shopping cart will be used.
For more details please see SAP Note 322526 Analysis for workflow problems and read the
documentation by clicking on the button

2002 SAP AG
Best Practice: Workflow Monitoring in SAP EBP 3.5 39

Verify Automatic Customizing


If a workflow which has already been tested does not work properly, then customizing settings should
be checked for any changes. If this is the case, the workflow administrator can check these settings by
means of this check tool.
Executing this test springs into the transaction SWU3 Automatic Workflow Customizing (please refer
to Figure 36). If any errors are found here, read the documentation for the error.

Figure 36

2002 SAP AG
Best Practice: Workflow Monitoring in SAP EBP 3.5 40

Problem: task not started


This functionality can help you to find why the workflow or task did not start or could not be found. By
means of this option, you get a list of checks as displayed in Figure 37.

Figure 37

In this screen the workflow administrator can start different checks (for example, Determine instances
for task, etc.). For more background information click on the Icons marked with the arrow in Figure 37.

2002 SAP AG
Best Practice: Workflow Monitoring in SAP EBP 3.5 41

Problem: Workflow hangs


This is used to determine why the selected workflow does not continue and is not correctly terminated.
This option allows you to run the tests shown in Figure 38. For more background information click on
the Icons marked with the arrow in Figure 38.

Figure 38

2002 SAP AG
Best Practice: Workflow Monitoring in SAP EBP 3.5 42

Test Environment
This is used to test the selected task (please refer to Figure 39). You can start the task and monitor
further processing in the workflow log. If you set the flags to include task type (see Figure 35), the
tasks and business object types that are components of the task to be tested are also displayed in the
test.
Tasks that have a red background do not have an agent assignment. You can also display the tasks
and business objects types directly.

Figure 39

Workflow Monitoring
To ensure the smooth and reliable flow of the SRM processes, it is very important to define a person
(e.g. workflow administrator) to take care of management and monitoring the workflows. There are
some activities that should be carried out, in order to check if the processes based on workflows have
run completely without errors and in case of errors, to figure out the causes of them and try to solve
them.
For example, if in your SRM system a one step approval workflow (WS100000129) is used, it is
possible that somehow, the agent assignment does not take place and that the work item is not placed
in any managers inbox for approval. The consequence is that the shopping cart cannot be further
processed and remains without follow on documents until the dialog step shopping cart approval
takes place. This situation can only be found out through monitoring, since neither the creator of the
shopping cart, nor the manager can be aware of something going wrong in the approval process. Only
after some time can the creator of the shopping cart become aware that his request still remains with

2002 SAP AG
Best Practice: Workflow Monitoring in SAP EBP 3.5 43

the status in approval process and this by looking at the history of the shopping cart in the
transaction check status.
Therefore, should some workflow instances have not run correctly, the workflow administrator should
analyze them, in order to find what generated the uncorrected flow. This analysis can be carried out
thanks to a central too called the Workflow log. In the chapter on Monitoring Tools we illustrate the
main transactions that can help to find out which workflow instances are affected by problems and
how to analyze them.

Workflow log
This section gives an overview of the Workflow log. The Workflow log contains all the important data
for administration and monitoring of a workflow. The Workflow log is the best tool available for getting
an overview of a workflow instance and analyzing it. It is very important to keep in mind that a
Workflow log is automatically created by the system for every workflow instance, so that you do not
have to switch on or customize anything in order to see it. Once a workflow starts, different workflow
logs are created. The Workflow log puts together all information that is created or used during the
execution of the business process in a central place, the latter being identified by the workflow
instance. These logs can also be displayed whilst a workflow is running and until it is completed. By
means of these logs you can see which steps have been already processed and which steps have still
to be processed.
The workflow log can be accessed by means of the reports shown in the upper section of this
document or directly from the work item inbox and outbox (transaction SBWP). In Figure 40, the inbox
for manager1 is displayed. On the right side of the Figure all work items with status ready are listed.
By clicking on the button Display workflow log (see arrow in Figure 40) the system shows the
Workflow log for the selected work item.

Figure 40

2002 SAP AG
Best Practice: Workflow Monitoring in SAP EBP 3.5 44

A Workflow log can be displayed through different views: Technical View and Standard View. The
difference depends on the information displayed.
In the logs, all details regarding the workflows are saved, however they can only be completely
displayed in the technical view (Figure 41 shows the Technical View).

Figure 41 Workflow Log Technical View

The technical view was designed for the developers and workflow administrators, since it contains
the history of a workflow instance with all its steps (including all technical information) and therefore it
is the most useful tool for searching for possible errors.
As our purpose is to describe the monitoring activities for a workflow administrator, we will now
describe only the Technical View in more detail.

Now we will briefly explain what this view shows. In the upper part of the screen (see Figure 41) the
general information about the workflow instance is shown: the workflow name, the workflow instance,
the instance number or work item-ID, the start date and time, started by and the current status. In the
body of the technical view (the lower part of Figure 41) you find the chronicle of the workflow instance.
It appears as a graphical table with two levels and shows all the steps of the workflow instance in a
chronological order.

2002 SAP AG
Best Practice: Workflow Monitoring in SAP EBP 3.5 45

Here is a short introduction on how to interpret this table. The first level of the graphical table
corresponds to the first header line of the table (marked in Figure 42 with arrow a). Line items which
belong to the first level of the table are marked with arrows b in Figure 42. The first line item
represents the start of the workflow instance, the line items that follow represent its tasks - they may
be steps of the same workflow or steps of sub-workflows. In order to see all of this information it may
be necessary to scroll left/right on the screen. On the first level of the table, for each line item the table
shows:
- An overall error status in the column named error. A green traffic light appears if no errors
occurred in the step;
- A status indicator (column status) that shows the status of the work item;
- The work item-ID (column ID);
- The workflow step number (column Node Number);
- The description of the steps (column Task);
- The result of the tasks (column Result);
- The execution date (column Date);
- The execution time (column Time);
- The current processing time (column Processing time).

Figure 42

2002 SAP AG
Best Practice: Workflow Monitoring in SAP EBP 3.5 46

The second level of the graphical table corresponds to the second header line of the table (marked in
Figure 43 with arrow a). Line items which belong to this second level of the table are marked with
arrows b in Figure 43. The line items on the second table level are only visible after expanding the

second level by clicking on the icon in the first column of the graphical table (see Figure 42).
For each line item on the second level of the table, the table shows:
- An overall error status in the column named error. A green traffic light appears if no errors
occurred in the step;
- The assigned agent (column Agent);
- The executed action within this step (column Executed Action)
- The execution date (column Date);
- The execution time (column Time);
- The processed object (column Object);
- The name of the processed object (column Object name);
- The processed object 2 (column Object 2)
- The name of the processed object 2 (column Object name 2);
- The corresponding context of the user (column User Context).

Figure 43

If a workflow has an error status, you can see, by means of the technical view, in which step the error
occurred and all the error messages that were created. For this property, the technical view is the
most suitable view for the investigation of the workflow run.
The technical view shows technical knots and control structures and offers additional data for
example, Container elements , Agents data , workflow data and graphical workflow logs .
The Status of the single work item is also displayed. To display this additional data, you must click
on the symbols shown above.

2002 SAP AG
Best Practice: Workflow Monitoring in SAP EBP 3.5 47

Graphical workflow log


The Graphical workflow log shows the already processed steps within the graph of the workflow
definition. This is very useful, since you can see the direction of a particular workflow instance at a
glance (the system shows the process of the workflow instance by means of a green line; please refer
to Figure 44; In printed versions, the process line is fatter than the other lines related to the workflow
definition).

Figure 44

2002 SAP AG
Best Practice: Workflow Monitoring in SAP EBP 3.5 48

There are three possibilities of viewing the graphical workflow log if you are in the technical view (see
the arrows in Figure 45):

By clicking on the button (marked with arrow a);

By clicking on the symbol directly in the log (marked with arrow b);
By selecting GOTO -> Graphical Workflow Log (marked with arrow c) or pressing F9.

However you will get the highest hierarchy level if you choose point (a) or (b) of the workflow instance.
By clicking on symbol you will get the graphical log of the (sub)-workflow represented in the step
you want to analyze.

Figure 45

It is important to underline, that you must select the view with error indicators in the menu (Path:
Views > Other views > View with error indicators, in order to display the errors, which are indicated
in the log with the symbol .

2002 SAP AG
Best Practice: Workflow Monitoring in SAP EBP 3.5 49

Figure 46

By clicking on the error symbol (see Figure 46), the system displays an analysis of the error which
may describe the cause of the error (see Figure 47). You can access the information contained in this
analysis.

Figure 47

By double clicking on a specified item (see arrow in Figure 47) you can view the full, more technical
error description. In this technical description you find an error message code (for example: Message
no. BBP_WFL052). This message code is useful for searching for SAP Notes in order to manage the
problem.

2002 SAP AG
Best Practice: Workflow Monitoring in SAP EBP 3.5 50

Roadmap
The chapter Monitoring Tools describes the procedure of workflow monitoring. It gives an overview of
the monitoring tools, their functionalities, and their usage. For a quick analysis of problems and
sufficient workflow monitoring, it could be helpful to use a roadmap.
The following Figure 48 shows a roadmap, which can be used for workflow monitoring in productive
operations. This roadmap gives a graphical overview of how to analyze and monitor the major
problems corresponding to workflow processing. Which tool the workflow administrator uses depends
on the available information about the problems which occurred.
For example, a special problem has occurred (one workflow instance does not function) and the
workflow administrator only has information about creation time of the business transaction (e.g.
Create shopping cart). In this case, use transaction SWI2_FREQ for monitoring the problem and
navigate to the workflow log for analyzing the issue. For monitoring of workflows and their processes
on regular basis the workflow administrator should use transaction SWI1.

Figure 48 Analysis Roadmap

2002 SAP AG
Further Information
Troubleshooting
If executing this Best Practice did not produce the desired results,
Search for related notes in SAPNet.
Open an SAP Customer Message describing your problem.

Literature
Practical Workflow for SAP (Effective Business Processes using SAPs WebFlow Engine),
Alan Rickayzen et al, Galileo Press, 2002

Background Information and References

In the following table are listed some of the relevant notes for workflow monitoring.

Description SAP Notes


Event creation for workflow 38968
Deleting work items no longer required 49545
Special features in date monitoring 69470
Performance 72873, 72923, 95857, 98407
Transport of workflow and PD objects 73318, 77607
Views and substitutions 73992, 74000
Workflow interfaces 77099
Collective restart of workflows 116412
Analysis for workflow problems 322526
Create shopping basket: Error in workflow 396779
Problems with start conditions 304834
Table 4

1. Workflow monitoring plays a central role in business processes within SRM. It connects the
system monitoring and the business process monitoring. For further information we
recommended the Best Practice Documents Manage Procurement in mySAP EBP and
mySAP SRM 2.0 System Landscape Monitoring, available on the Service Marketplace.
You can find these documents in the Service Marketplace at
http://service.sap.com/bestpractices >> Solution Management >> Availability >> By Topic
Area

Feedback and Questions


Send any feedback by formulating an SAP customer message to component SV-GST-SMC. You can
do this at http://service.sap.com/message.
APPENDIX: Work Item Archiving
Transaction SWW_SARA
Short text
Archiving Program for Work Items
Description
The archiving program reads work items for archiving and writes them into an archive. The deletion
program RSWWARCD deletes these work items from the database.
You can specify whether or not the deletion program is to be started within Customizing for the
archiving object WORKITEM .
The archiving program offers various selection parameters with which you can select which work items
are to be archived. The selection parameters are:
Work item ID
Task ID
Actual agent of work item
Creation date of work item
End date of work item
The archiving program compiles the list of work items defined with the selection criteria, and passes it
to the function module SWW_WI_LIST_ARCHIVE. The latter then archives the intermediate
documents using the function modules and FORM routines from the function group SWWX in
conjunction with the FORM routines from the Archive Development Kit (ADK).
Only work items with an end status (COMPLETED or CANCELLED) can be archived. In addition,
archiving can only be initiated for work items that are not dependent on other work items ("top-level
work items"). This ensures that work items that are still being processed are not archived.
Work items dependent on the selected work items are also archived automatically (for example work
items that are part of a workflow). This recursion is performed internally by the FORM routine
READ_WORKITEM_DATA_FROM_DB. If you set the indicator Output work items as list, the
selected work items are output in a list.
Copyright 2001 SAP AG. All rights reserved.
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission
of SAP AG. The information contained herein may be changed without prior notice.
Some software products marketed by SAP AG and its distributors contain proprietary software components of other software
vendors.
Microsoft, WINDOWS, NT, EXCEL, Word, PowerPoint and SQL Server are registered trademarks of
Microsoft Corporation.
IBM, DB2, OS/2, DB2/6000, Parallel Sysplex, MVS/ESA, RS/6000, AIX, S/390, AS/400, OS/390, and
OS/400 are registered trademarks of IBM Corporation.
ORACLE is a registered trademark of ORACLE Corporation.
TM
INFORMIX-OnLine for SAP and Informix Dynamic Server are registered trademarks of Informix Software
Incorporated.
UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group.
HTML, DHTML, XML, XHTML are trademarks or registered trademarks of W3C, World Wide Web Consortium,
Massachusetts Institute of Technology.
JAVA is a registered trademark of Sun Microsystems, Inc. JAVASCRIPT is a registered trademark of Sun Microsystems,
Inc., used under license for technology invented and implemented by Netscape.
SAP, SAP Logo, R/2, RIVA, R/3, ABAP, SAP ArchiveLink, SAP Business Workflow, WebFlow, SAP EarlyWatch, BAPI,
SAPPHIRE, Management Cockpit, mySAP.com Logo and mySAP.com are trademarks or registered trademarks of SAP AG
in Germany and in several other countries all over the world. All other products mentioned are trademarks or registered
trademarks of their respective companies.
Disclaimer: SAP AG assumes no responsibility for errors or omissions in these materials. These materials are provided as
is without a warranty of any kind, either express or implied, including but not limited to, the implied warranties of
merchantability, fitness for a particular purpose, or non-infringement.
SAP shall not be liable for damages of any kind including without limitation direct, special, indirect, or consequential
damages that may result from the use of these materials. SAP does not warrant the accuracy or completeness of the
information, text, graphics, links or other items contained within these materials. SAP has no control over the information
that you may access through the use of hot links contained in these materials and does not endorse your use of third party
Web pages nor provide any warranty whatsoever relating to third party Web pages.

Вам также может понравиться