Sie sind auf Seite 1von 6

This article appeared in the Jul Aug Sep 2001 issue of SAP Insider and appears here with

■ ■

permission from the publisher, Wellesley Information Services (WIS), www.WISpubs.com.

Create Custom Workflows


with SAP’s Workflow Builder

by Alan Rickayzen, SAP AG

This article provides a brief introduction sends an e-mail enquiry. This triggers a A manual dispatcher decides who
to the Workflow Builder, a graphical tool workflow to ensure that the e-mail is would best process this e-mail, and
by SAP designed specifically for creating processed properly, quickly, and with a dispatches it accordingly (Step 3).
workflow processes. We’ll look at a simple minimum of effort. After first looking at If it is a sales or support issue, an
workflow built specifically for this article. the process definition, we’ll run through operator drafts a reply (Steps 4 and 6)
But first, a few words of warning: the creation of this workflow using the and this is sent by the system
Workflow Builder. (Steps 5 and 7).

For the purposes of this article, I use
This is, of course, a deliberately
an example that highlights a CRM
Workflow Process Definition simple example, and could definitely
business scenario. However, this work-
The process runs as shown in Figure 1: be improved. In fact, all sorts of refine-
flow can be built in any SAP system,
After the e-mail has been received ments are possible — loops, quality
since it only uses components available
(Step 1), an automatic reply is gener- checks by a supervisor, or automatic
in the technology basis.1
ated as a courtesy to the customer parsing of the e-mail, to give just a

One of the great advantages of the (Step 2). few examples.
Workflow Builder is its graphical
features. Although the screenshots
are taken from a 4.6C system, the
graphical elements are available from
Release 3.0a and up — those of you
using earlier releases will notice the
difference. The functionality described
in this article is available in all
releases, even if it is not always as
user-friendly as in later releases.

This article offers a basic overview
of the Workflow Builder. For more
details and background, see the “For
Further Information” section at the
end of this article.

In this article, I’ll look at a simple


business scenario in which a customer
1
The mySAP CRM solution also provides its own
standard workflow, which simply needs to be activated Figure 1 Workflow Process Definition for a Customer Enquiry Scenario
to be used in the production environment.

Subscribe today. Visit www.SAPinsider.com.


Overview of the
Workflow Builder
The Workflow Builder screen is divided
into several frames, as shown in the
completed workflow in Figure 2.
The central portion of the builder, the
Workflow frame, displays a flow diagram
that is very similar to the process defini-
tion in Figure 1. This is one of the biggest
benefits of the Workflow Builder: you can
see at a glance what the process is about.
To the right of the Workflow frame, you
can see the complete process — the
Overview frame. You can zoom in and
out on the portion of the workflow shown
in the Workflow frame by resizing the
cursor in the Overview frame. By sliding
the cursor around, you choose which
section of the flow you want to display.
With some workflows containing dozens
Figure 2 Workflow Builder Display
of steps, this method of navigating is
extremely fast and convenient.
The Navigation frame lists, in tree and variables (such as a product or orative scenarios over the Internet, loops,
format, all the steps in the workflow. distributor name) can be referenced conditions, branches, etc. These can be
Clicking on one of the entries in the list and filled in automatically as the work- selected one by one and dropped into
has the same effect as double-clicking flow progresses. the workflow. If you prefer not to work
on a step in the graphical Workflow with icons, you can select the task from
frame — it zooms in to show the

The related-tasks list. When you
a list of step types by pressing the “New
detailed information about that partic- click on the “My Workflow and Tasks” step” button.
ular workflow step. bar, the Tasks frame appears, listing The Information frame at the bottom
Below the navigation tree is the the last workflow that you worked on, of the screen displays information and
Objects frame, which includes: together with all the workflows, sub- error messages during workflow creation.
workflows, and tasks that you have So if you try to create a loop without an

The “Workflow container.” The subscribed to. A subscription can be end condition, a warning is displayed at
Workflow container allows you to view made to your favorite workflows and the bottom of the screen. Clicking on
and edit all the data that is passed tasks, to a development class, or to the warning takes you to the offending
through the workflow. I’ve added two a Business Object. So, if you have section of the workflow definition.
elements to this workflow container: subscribed to the Business Object
“enquiry” and “reply.” The Workflow “Purchase Order,” you will see all the
Builder can automatically generate Workflow Data
tasks and workflows related to purchase
container elements based on the steps “Workflow data” can be defined either
orders. Later when you edit your own
you add to the workflow. as simple data elements and structures,
workflow, you can pull workflows and
or as references to SAP Business Objects.
tasks from this frame directly into

The “Document templates” view. These Business Objects are defined by
the process definition displayed in
This section of the Objects frame lists SAP and maintained in the Business
the Workflow frame.
the PC document templates that will Object Repository (BOR). Their attrib-
be used in the workflow. For example, On the far right of the Workflow utes are the information that you use in
if the e-mail reply is to include an Builder screen, the Step Types frame the workflow to end loops, to automati-
MS Word document as an attachment, shows all the types of workflow steps or cally branch, or to simply display the
the document is defined as a template, iterations — tasks, XML steps for collab- information to the work item recipient.

Subscribe today. Visit www.SAPinsider.com.


The BOR is key to this process. By
using it, you avoid any worries about
how the attributes are defined — this
has been taken care of by SAP. Any
internal changes in application tables
or function modules that take place
from release to release are hidden from
you by the BOR, making the repository
very stable and easy to use. Because
attributes themselves can be references
to Business Objects, too, you can drill
down into the BOR for as much detail
as you like. For example, you can
drill down from workflow data to
the dispatcher, and from there to the
dispatcher’s telephone number.
The workflow I am creating here
references two Business Objects: the
enquiry (type MESSAGE) and the reply
(also type MESSAGE).
Figure 3 An Undefined Workflow, with “New Step” and “New Workflow” Buttons
Building a Workflow
Figure 2 showed you what this workflow
looks like at the completion of the
Workflow Builder process. This workflow
began as a new, undefined workflow,
starting at the Workflow Builder screen
(Transaction SWDD) with a blank
workflow, as shown in Figure 3. The
following sections give you a basic
overview of the steps you will take to
create the new workflow specified in
our workflow process definition.

Transmitting the Auto Reply (Step 2)


The first step in our new workflow is
actually the second step in the original
process description — the “Auto Reply.”
This step sends an e-mail that gives the
customer a case number to use for future
reference. In Figure 4, you see the
workflow step detail obtained by double-
clicking on an individual step in the
Workflow frame.
For example, in the description,
you can see the e-mail address of the
message’s sender (&ENQUIRY.
Figure 4 Workflow Step Detail with Auto Reply
SENDER.ADDRESSSTRING&) and

Subscribe today. Visit www.SAPinsider.com.


the case number (#&_WORKITEM.
WORKITEMFATHER.WORKITEMID&),
which is an attribute of the workflow
itself.
The resulting message is shown in
the reply shown in Figure 4.
Because this reply is sent automati-
cally, with no human intervention, the
task is configured as a background task.
(It is possible to create entire workflows
that consist only of background tasks,
but this would not take full advantage
of workflow technology, which is mainly
about improving team cooperation in
a business process.) In our process
description in Figure 1, Steps 5, 7, and
8 are also background steps.

Deciding How to Process


the Enquiry (Step 3)
The “Dispatch” operation (Step 3) is
handled by a “user decision” step, which
allows you to type in a question (including
variables) to be put to the user receiving Figure 5 Generic User Decision Detail in the Workflow Builder
this work item, along with possible
responses (see Figure 5).
It is up to you how many responses
you create (in our example, there are
three: “Brochures requested,” “Sales
request,” and “Technical support issue”).
The Workflow Builder automatically
generates one branch in the workflow
for each possible response.
As you can see, user decisions are not
only very easy to create, but they also
have the advantage that they can be
used without displaying the SAP GUI
— they can appear in a user’s Web
browser inbox (either mySAP Workplace
or the Easy Web Transaction) and can
be integrated with Microsoft Outlook
and Lotus Notes.

Drafting the Reply (Step 4)


This “Edit Reply” task (Step 4) is
performed manually by an operator, so it
is important to include a clear descrip-
tion of the task the user is to perform,
as shown in Figure 6. A good descrip-
tion will explain exactly what has to be Figure 6 Workflow Task Description for Users
done (and why) and may also include

Subscribe today. Visit www.SAPinsider.com.


Figure 7 Deadline Handling

links to the company’s intranet site for There are other methods of assigning
FAQs and background information. The users to the step: office distribution
operator will see this description when lists, direct agent assignments, etc. But
he or she receives the work item. using organizational management (e.g.,
By making the workflow as user- mySAP.com roles) is the most common
friendly as possible, you ensure that the and the most powerful. With this approach,
operator will execute the work item you can take advantage of features such
promptly and diligently — the signature as a sophisticated substitution mechanism.
of a good workflow. However, for simplicity’s sake in this
Because this task is a “dialog” particular flow, I’ve taken the easy way
(rather than “background”) task, you out by directly assigning a single user
must specify who is to perform it (the to the step.
same applies to the user decision
described above). At the task level, Ensuring the Work Is
you assign a job (such as hotline support, Completed On Time
engineer, or purchasing agent) to the Deadlines can be defined for any dialog
task, so that any assigned user can step, as you can see in Figure 7.
perform this task. There are many ways of handling a
At the Workflow Step level, you can missed deadline. One of the simplest is
additionally define a role resolution, to send a message to the workflow
which limits the number of users further, administrator. The Workflow Builder
according to criteria such as product, also gives you the option of creating
division, or sales group. Only this subset a text to accompany this e-mail.
of users then receives the work item. As The workflow engine monitors the
soon as the work item is processed by deadlines automatically, and the dead-
one user, it disappears from the other line is defined at the step level. The time
users’ inboxes. allowed for deadlines can vary from step

Subscribe today. Visit www.SAPinsider.com.


to step, and some steps may not have the reference section, you will find a
deadlines at all. complete section dedicated to tutorials.
A direct URL to these tutorials is available
Wrapping Up at http://service.sap.com/webflow.
The workflow described in this article
was built in under an hour without any For additional information,
programming. It can be configured to including a detailed step-by-step
trigger automatically whenever an e-mail description of how this workflow
arrives in the system (Transaction SO28, was built, see my article
SAP Office Customizing). “A Beginner’s Guide to Building
Bear in mind that this uses SAPoffice Workflows with the Workflow
or the mySAP Workplace (rather than Builder” in the March/April 2001
Lotus Notes or Microsoft Outlook) as issue of the SAP Professional
the processing center. This is justifiable Journal (www.SAPpro.com).
because we are dealing here with a busi-
ness function rather than ad hoc e-mails.
Alan Rickayzen is the product manager of
The tracking and monitoring of the mails
WebFlow. He has been with SAP since 1992
(and replies) is critical to the success of
and in data processing since 1988. In 1995,
the interaction center.
he joined the SAP Business Workflow group,
Of course, you would need to spend
performing development work as well as
additional time verifying the workflow
consulting for various major U.S. customers, and
with operational users and improving
as a result amassed a good technical knowledge
the descriptions accompanying the
of the product. In 1998, he moved to the area
tasks. You would also have to spend
of workflow product management. The author
some time checking that your company
may be contacted at alan.rickayzen@sap.com.
has the resources to answer e-mails in
For more information about SAP Workflow,
the first place — and determine who
please visit http://service.sap.com/webflow.
will do the replying.
This short overview gives you an idea
of how easy it is to automate a simple
process using the Workflow Builder. And
the additional benefits, such as the work-
flow logs, generic object services, and
process reporting, are automatically
enabled with no further development work.
Remember, the purpose of the article
is to show how simple it is to create your
own workflow from scratch. If you are
already using the SAP CRM Interaction
Center, then you are obviously better off
using the out-of-the-box CRM workflow,
which is far more sophisticated and very
simple to set up.

For Further Information


There is an excellent online tutorial at
http://help.sap.com that is well worth
following for more detailed background
information. After choosing your release,
follow the path through Basis to the
online workflow documentation. Under

Subscribe today. Visit www.SAPinsider.com.

Das könnte Ihnen auch gefallen