Building A Workflow - Lab #3 - SAP - CREATING MULTI-STEP Task (Workflow) Lesson Objectives
Building A Workflow - Lab #3 - SAP - CREATING MULTI-STEP Task (Workflow) Lesson Objectives
INTRODUCTION:
[NOTE: labs 1 and 2 must be completed properly before beginning this lab if they are not correct, please go back to
correct them.]
In order to create a workflow the following steps must be completed:
2. Next the workflow task (multi-step task) must be created. [note: you will be doing the following over the
next few labs]
Integrate each standard task into the workflow task
Select the workflow task to put it in
Add the object to the workflow container
Open the workflow editor
Assign your defined standard task to a step within the workflow editor
Enter data for control
Define binding for control
Assign responsibilities
Insert appropriate decisions and loops
Check and activate the workflow task
REVIEW:
A task can either be a single-step task or a multi-step task. In our example of the notification of absence, making the
application and checking the application are single-step tasks. The entire procedure involved in processing a vacation
form consists of these (and other) single steps and represents a multi-step task.
Remember:
single step tasks: T-Customer Task (defined by the customer) ; TS-Standard Task (provided by SAP) we
used TS in lab 3 (the last lab)
multistep tasks: WF-workflow task (defined by the customer); WS-workflow template (provided by SAP) we
will use WS in this lab
A workflow definition comprises a sequence of different steps (for example, all steps which are required to process a
vacation form).
An activity is a possible step in a workflow definition. It references a task, which can be a single-step or multi-step task
(subworkflow)!
When defining an activity as a step in a workflow definition, we will only reference single-step tasks. This lab does not
include incorporating a subworkflow. You can either define all single-step tasks required for the workflow definition
yourself and save them as standard tasks or you can use the standard tasks predefined by SAP. Since single-step tasks
are a central element of the entire SAP Business Workflow concept, it is advised that you do define them yourself (which
you did in lab 3)!
In this lab, you will create the workflow template (multi-step task), and integrate your previously defined standard tasks.
Page 1
Step 1: CREATING A WORKFLOW TASK
1. Log onto SAP using your workflow manager ID MGR-## (## is an assigned number given to you by your
instructor).
2. First you must create a workflow template WWF_NOA_##. You will name this multi-step task Workflow: Notification
of absence (WWF##).
- From the SAP Easy Accesss menu, open folders
- Tools Business Workflow Development Definition tools Tasks/Task groups.
- Double-click Create.
- From the Task: Maintain screen, enter the following
information:
Abbr. = WWF_NOA_##
Name = Workflow: Notification of absence - ##
Page 2
Select Extras Options under the view tab click the pull down icon next to View, select
EPC.
Click to select
. You will then see the following screen:
Display
Area
Navigation
Area
In this simple diagram, you can already see the essential structure of a workflow definition:
There is at least one event at the beginning and end of every workflow definition.
Events are represented by hexagons.
Every step in the workflow definition is followed by at least one event.
Steps in the workflow definition are represented by rounded rectangles.
Note: The workflow definition is shown in a display area and a navigation area. The entire definition is displayed in
the navigation area. You can select a section in the navigation area directly with the mouse. The section is then
shown in the display area in a magnified form. The display area is used for selecting events or steps, as well as for
manipulating entire blocks.
NOTE: the rest of this lab is based on the graphic view Event Driven Process Chains.
Page 3
You are now in the workflow editor.
1. Position the cursor on the first Undefined step that follows the event Workflow started and click the right mouse
button.
2. Select create
4. This displays the screen Workflow Builder: Create Step: Activity for defining an activity in standard mode.
-
-
- double click on your create notification task to select it.
2. Once the 8-digit TS number is displayed in the Task field, click transfer and to graphic
3. the screen Define container Elements and Binding will be displayed. Click the green arrow to accept the
binding. This inserts the container elements and bindings!
NOTE: you are not going to define binding for this lab but here is a short description for your information.
1. A container element, which can contain the reference to the object notification of absence, is created
automatically in the workflow container. The element has the name AbsenceForm and refers an
object of the type FORMABSENC.
2. A binding is defined automatically.
Page 4
You can generally define the binding between the task container and the workflow container in two directions:
Task container <== Workflow container (top part of screen)
Task container ==> Workflow container (bottom part of screen)
** you can return to this at any time by pressing the button Binding Editor.
4. You now should see the workflow builder screen again but this time the first task in your workflow should be your
Create Notification of Absence step.
Note: Your executable workflow will be started later manually. At this point, the workflow container
element &_WF_Initiator& will be filled with your user name. The assignment you specify above tells
the work item manager to whom the notification of absence form is to be addressed
2. Select the button "Syntax Check" to check your entries [icon looks like a balance scale] .
3. Click transfer and to graphic this will take you back to the Workflow Builder.
4. Notice the event after the step create does not have a name..
o Double click on the red event object [[you may see some German screens just keep going!]]
o You then can enter an event name type Form Filled Out
o Click transfer and to graphic.
Save your workflow - [note: it is a good idea to periodically save!]
1. In the display area of your workflow definition, right click on the event "Form filled out". choose create
2. Double click on Activity
Entering Basic Data for Control [note: only basic information is provided, you may need to refer to the previous
steps if you cant remember how to do this step]
Page 5
2. Accept the binding. If the binding window does not automatically appear, then click on the icon that looks like a red
and white soccer ball then it will show you the container elements and binding screen
select . The binding should not exist -
4. Check the definition (syntax check in the menu icon looks like a balance scale ) and then go
back to the workflow builder.
Question #2. What are the resulting subsequent events that you see?
1. In accordance with the three subsequent events for the step Check application, three branches were
automatically inserted into the workflow definition.
2. Now call the processing of the activity for checking the notification of absence again by double-clicking on the step
symbol. - "Check Application WT##"
4. Deselect the event New. click the green square to make this inactive [you should now have a gray diamond
].
5. click to go back to the graphical workflow editor. You will be asked if you want to save click Yes.
Question #3. How many branches are there now in your workflow? ______ What are the event names of each
branch? ___________________ and ____________________
7. Double click on the activity Check Application this will take you to the Workflow Definition for this activity.
1. From the Control Tab - Select the pull down options next to Expression under the Agent section.
4. click to return to the workflow builder. [Note: You may want to save at this point]
Description of Steps Required to Integrate the User Decision in the Workflow Definition
Creating a User Decision as a Step in the Workflow Definition
1. First enter the following text in the input field Title. It will appear at runtime as the heading of the dialog box with the
decision options. Your application was rejected by &. Revise?
The "&" symbol is a placeholder for parameters that are assigned a value at runtime.
2. Position the cursor in the input field Parameter 1 and call F4: Possible entries.
This displays the dialog box (expression for first parameter of user decision)
3. Under the Notification of Absence choice, Choose the container element Approved by..
The Decision texts which you can enter here will appear as possible decisions in the work item which the applicant can
process after his/her request for leave is rejected.
The Event descriptions are the terms that will describe your events in the workflow definition.
Page 7
Question #4. What Parameter appears in the Agent Expression Field area?
4. Your entries have now been made for the user decision.
5. Press the button "Syntax Check" if there are no errors continue
6. Go to the Workflow Builder.
Question #5. Draw the added Activities and Events that appear after the Event Rejected.
1. In the field Task, enter the ID (T <8-digit number>) of the revise standard task <WT##revise>
If you dont know the ID, use the F4 help to search via the abbreviation of the task. [If you cant remember how to
do this, look at previous sections.]
Step name : Revise notification WT##
2. Make sure you Define container elements and binding.
4. Confirm your entries with ENTER.
1. In the field Task, enter the ID (T <8-digit number>) of the send standard task. If you no longer know the ID, use
the F4 help to search via the abbreviation of the task. [WT##send]
Page 8
6. Type in the following Event name Message Sent Check and Save your workflow!
8. Choose Workflow Print Graphic This will print out a copy of a graphical version of your workflow. [note:
make sure you choose to fit to one page!!]
2. Hand on the question answers along with the print out (make sure your name is on it).
You have now started the multi-step task for the notification of absence workflow.
Logging Off
Make sure you log off appropriately.
Page 9