You are on page 1of 18

Business Process Engine Overview

& Runtime Cache

Andrea Schmieden

1
Lesson Objectives

After completing this session, you will be able to:

„ Understand the relationship between integration processes in XI


and workflows in SAP Business Workflow
„ Check the runtime version of an integration process in the XI
runtime cache
„ Perform process and message monitoring
„ Perform basic troubleshooting

© SAP AG 2004, BPM@BSGs / Andrea Schmieden / Monitoring & Troubleshooting/


Business Process Engine Overview and Runtime Cache

2
Agenda

„ Business Process Engine Overview

„ Runtime Cache

„ Process Execution Monitoring

„ Message Monitoring

„ Message Monitoring Examples

„ Event Trace

„ Troubleshooting

© SAP AG 2004, BPM@BSGs / Andrea Schmieden / Monitoring & Troubleshooting/


Business Process Engine Overview and Runtime Cache

3
What is the Business Process Engine?

Business Process Engine (BPE)


z Provides runtime support for XI Integration Processes
z Uses the WAS 6.40 Business Workflow runtime engine
z Supports all Integration Processes defined in the Integration
Builder

© SAP AG 2004, BPM@BSGs / Andrea Schmieden / Monitoring & Troubleshooting/


Business Process Engine Overview and Runtime Cache

„ The Business Process Engine provides runtime support Integration (Business)


Processes defined in the Integration Builder.
„ The Business Process Engine is part of the Integration Server. You monitor the
execution of integration (business) processes by using the monitoring functions of
the Integration Engine.

4
Business Process Engine vs. Business Workflow

z Both ccBPM and business workflow use the same engine


z All integration processes defined in XI generate workflows
z There are unique step types in XI that do not exist in the
normal workflow definition environment (Transform, Send)
z Most of these unique step types use ABAP Classes at
execution time
z The XI workflows are triggered by events (user WF-BATCH
logs in)
z Most of the workflows are generated with start conditions
tied to the integration process

© SAP AG 2004, BPM@BSGs / Andrea Schmieden / Monitoring & Troubleshooting/


Business Process Engine Overview and Runtime Cache

„ The Business Process Engine is the same as the Workflow Engine. The XI
version of workflow works just the same as the normal workflow component in
WAS 6.40.
„ However, in XI there are unique step types that are not normally apart of the
workflow definition environment. Even though the design layer of workflow has
unique features for XI, the runtime layer is the same as the normal workflow
runtime layer.
„ Most XI workflows are triggered by events (which is the way most workflows start,
via an event). When a workflow starts from an event, WF-BATCH logs in to start
the workflow. So, if you have a workflow that could start 5,000 times a day, then
you will have 5,000 logons by WF-BATCH. If the workflow will start 5,000 times a
minute, then you will have 5,000 logins by WF-BATCH in a minute. In this lesson
we will discuss some tuning and performance considerations for WF-BATCH.
IMPORTANT: When designing an integration (business) process in the
Integration Repository, you should try to determine approximately how often the
process will run.
„ Most of the generated workflows have start conditions associated with them. Start
conditions ensure a workflow only executes if it really should execute. They are
very common in workflow and improve performance.

5
Integration (Business) Process defined in Integration
Repository

© SAP AG 2004, BPM@BSGs / Andrea Schmieden / Monitoring & Troubleshooting/


Business Process Engine Overview and Runtime Cache

„ This graphic shows an example of an Integration (Business) Process defined in


the Integration Repository.
„ The first “start” step becomes the triggering event.
„ The second “receive” step enables us to wait for a specific message to arrive.
„ The third “mapping” enables us to transform from one message to another.
„ The fourth “send” step enables us to send the message out.
„ This process is built in the Integration Repository and generates a workflow.

6
Workflow Generated from the Integration Process

Triggering Event

Wait for Event

Activity (Task)
Step that calls
another
workflow

Transaction code: SWDD


© SAP AG 2004, BPM@BSGs / Andrea Schmieden / Monitoring & Troubleshooting/
Business Process Engine Overview and Runtime Cache

„ This is the workflow generated from the Integration (Business) Process shown on
the previous slide.
„ The actual generated workflow can be seen in transaction code SWDD. This
transaction code is used in the exercises for this lesson.
„ When a workflow gets created it is stored on the database as WS (workflow
template) and a number. For example, WS74900023. In the configuration section
we will discuss required configuration for the number ranges.
„ You can see that some icons are the same as in the Integration Repository;
others are different.
„ The first “start” step becomes the triggering event step.
„ The second “receive” step becomes a wait for event step.
„ The third “mapping” step becomes an activity step. This is the most common type
of step in a workflow. Behind this step type is normally a call to a business object
or an ABAP class.
„ The fourth “send” step calls another workflow.

7
Agenda

„ Business Process Engine Overview

„ Runtime Cache

„ Process Execution Monitoring

„ Message Monitoring

„ Message Monitoring Examples

„ Event Trace

„ Troubleshooting

© SAP AG 2004, BPM@BSGs / Andrea Schmieden / Monitoring & Troubleshooting/


Business Process Engine Overview and Runtime Cache

8
Access Runtime Cache

Only proceed when


the green status traffic
light is displayed
(cache content is up-
If status is to-date)
green, double
click

Transaction code: SXI_CACHE


© SAP AG 2004, BPM@BSGs / Andrea Schmieden / Monitoring & Troubleshooting/
Business Process Engine Overview and Runtime Cache

„ You can display and analyze the runtime version of an integration process in the
runtime cache. This can be useful in an error situation, for example, when an
integration process could not be started. If you want to analyze the runtime
version, you can display it either as an XML representation or in the Process
Builder.
„ The runtime version of an integration process is created automatically from the
definition of the integration process in the Integration Repository and the entries
for service and party in the Integration Directory. The runtime version is created as
soon as you have activated the change list in the Integration Directory. If the
runtime version was created without errors, it is processed by the Business
Process Engine.
„ In the user menu, choose Exchange Infrastructure → Configuration → XI Cache
Refresh (transaction SXI_CACHE).
„ If the contents of the cache is currently being updated (amber status traffic light),
wait until the cache update is complete. If you do not, you may accidentally lock a
business process.
„ Prerequisites
„ Automatic Customizing of the Business Process Engine (transaction
SWF_XI_CUSTOMIZING) was executed without errors. This normally takes place
during installation.

9
Runtime Cache Overview

Runtime cache viewer knows


integration processes

Display

Workflow Builder uses same


look and feel as the Process
Builder in IB (tiles and other
concepts)

Business Workflow tools in a


special profile

© SAP AG 2004, BPM@BSGs / Andrea Schmieden / Monitoring & Troubleshooting/


Business Process Engine Overview and Runtime Cache

„ Integration in Monitoring Infrastructure


‹Process Engine ‘is-alive’-check
‹Alerts in CCMS

10
Find the Workflow Number in Runtime Cache

Generated
workflow

© SAP AG 2004, BPM@BSGs / Andrea Schmieden / Monitoring & Troubleshooting/


Business Process Engine Overview and Runtime Cache

„ Double-click on Business Processes (remember, this screen could say Integration


Process since the name is being changed at the time of writing this unit).
„ You will then see all the workflows that have been generated. Workflows are
generated whenever the change lists are activated in the Integration Directory
(Configuration).
„ Notice that you can see the actual WS number that is assigned to the new
workflow.

11
IR Activation Updates Runtime Cache

Integration Builder: Design (Integration Repository)

Integration Builder: Configuration (Integration Directory)

© SAP AG 2004, BPM@BSGs / Andrea Schmieden / Monitoring & Troubleshooting/


Business Process Engine Overview and Runtime Cache

„ In the Integration Repository the Integration (Business) Process is created. The


changes are then activated.
„ Afterwards the Integration (Business) Process is used in the Integration Directory.
Once these changes are activated, then the workflow is generated.
„ The workflow is then updated anytime the Integration (Business) Process is
changed in the Integration Repository. The workflow could be updated, or a new
version may be generated.
„ A new version is always generated after the current version is migrated to
production.

12
Runtime Cache Information

Return code 0:
runtime
version was
created
without errors

Other return
code: Errors
occurred.
You can update
the runtime
version and
then analyze the
error messages

© SAP AG 2004, BPM@BSGs / Andrea Schmieden / Monitoring & Troubleshooting/


Business Process Engine Overview and Runtime Cache

„ The screen area on the right displays the following information for each runtime
version:
„ Partner and service from the Integration Directory
„ Workflow task: During processing by the Business Process Engine, the runtime
version of the integration process is represented by a Workflow task. You do not
normally need to know the number of the task. However, you can use the number
to search for a task, for example.
„ Release: SAP Web AS release that was being used when the cache was updated.
„ Return Code: Return code for the creation of the runtime version:
‹0: The runtime version was created without errors.
‹Not equal to 0: Errors occurred. You can update the runtime version and then analyze the error
messages. When you do so, the system displays detailed messages about the problems that
occurred. You can also save the XML output as a file, which you can then pass on to SAP
Support for further analysis.
„ Date and time of last update
„ XML: XML representation of the runtime version of the business process. To
display the XML representation in a clearer, more structured way, double-click a
line.

13
Display Process Definition in the Process Builder

© SAP AG 2004, BPM@BSGs / Andrea Schmieden / Monitoring & Troubleshooting/


Business Process Engine Overview and Runtime Cache

„ To display the process definition, select the runtime version and click the icon with
the quick info Display Active Version.
„ The process definition is displayed in the Process Builder. The Process Builder
has a similar structure to the SAP Business Workflow Workflow Builder; however it
is specially designed for displaying business processes. You cannot make any
changes to the process definition in the Process Builder.
„ To display the process definition graphically, in the menu in the title line of the
screen area on the right, choose Graphical Modeling.

14
Runtime Cache Error and Syntax Check
2. Display the workflow definition

1. Check return code

3. Do a syntax
check in the
workflow
definition

4. Analyze the errors

© SAP AG 2004, BPM@BSGs / Andrea Schmieden / Monitoring & Troubleshooting/


Business Process Engine Overview and Runtime Cache

„ Whenever you have a bad return code, such as the return code of 99 in the
graphic, you can do a syntax check on the generated workflow.
„ In the workflow definition, there is a Syntax check icon. You can also check the
syntax by selecting the menu path Workflow->Check Syntax from transaction code
SWDD.
„ After the syntax check you will receive any existing errors.
„ In the example on the graphic, there is an error on a condition statement. The two
values cannot be compared. This is an error related to the actual definition of the
workflow. Since this workflow was created in the Integration Repository, the error
must be fixed by the developer in the IR. You cannot make changes to workflows
that are generated from the Integration Builder activities.
„ Once the change is fixed in the IR and the changes are activated, the workflow
should no longer have syntax errors and transaction code SXI_CACHE should no
longer have a bad return code.
„ The workflow is not generated when the integration (business) process is created
in the Integration Repository. The workflow is generated when it is used in the
Integration Directory. That means the workflow is physically generated after the
integration (business) process has been built. That means the developer may not
have errors at the time the process was built in the IR, but there could still be
definition errors when the workflow is generated.
„ The developer should check the contents of SXI_CACHE after activating changes
in the Integration Directory. They should then verify that the workflow was
generated without problems.

15
Update the Runtime Version

Repeat
Activation

© SAP AG 2004, BPM@BSGs / Andrea Schmieden / Monitoring & Troubleshooting/


Business Process Engine Overview and Runtime Cache

„ If a return code other than 0 is displayed in the runtime cache for a runtime
version, update the cache. To do so, click the icon with the quick info Repeat
Activation.

16
Process Activation Results

To export XML To delete runtime


representation as version
file Don‘t delete in a
productive To display
system! process definition
for current
runtime version in
Process Builder

Messages:
S: Success message after a step has
been created
I: Information, e. g. about default settings
used
W: Warning, indicates logical errors and
problems
E: Error which stops a functional runtime
version from being created

© SAP AG 2004, BPM@BSGs / Andrea Schmieden / Monitoring & Troubleshooting/


Business Process Engine Overview and Runtime Cache

„ To update the runtime version, click Activate.


„ You can save the XML output as a file, which you can then pass on to SAP
Support for further analysis. To export the XML representation as a file, click the
icon with the quick info Save XML Document.
„ To display the process definition for the current runtime version in the Process
Builder, click the icon with the quick info Start Process Builder.
„ When you delete a runtime version, the corresponding Workflow task is also
deleted. Problems will occur if you delete a runtime version of a process instance
for a task that is running. The system does not perform any checks.
„ You must not delete any runtime versions in a productive system. Even in a
test system, only delete a runtime version if there are no process instances
running at the time.

17
Error Analysis

If error code is displayed in the Runtime Cache, check the following


in the Integration Repository:

Conditions
„ Are the defined conditions valid?
‹ At present, the condition editor cannot ensure that a condition does not
contain invalid comparisons, for example:
z Comparisons between different data types, for example xsd:date and xsd:time
z Comparisons between single and multiple expressions

Correlations
„ Is every activated correlation actually used?

Customizing
„ Incomplete customizing (transaction SWF_XI_CUSTOMIZING)
‹ Every customizing item must have status green

© SAP AG 2004, BPM@BSGs / Andrea Schmieden / Monitoring & Troubleshooting/


Business Process Engine Overview and Runtime Cache

18

You might also like