cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding work flows

Former Member
0 Kudos

hi can any one tell me what is workflow? where is it used ? how a workflow is created in SAP XI

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

hi suneetha reddy

If your new SAP XI , then its better to read TIBIT. Below are the links of TBIT

which are very helpful in understanding the End-to-end process of XI. And you can even do some exercies here which very helpful.

TBIT 44 is specially for answer to your so long document

no one can help anyone until one does not want to help one's.

So read TBIT 44 throughly then you will get a knowledge of business process monitoring and you will be able to answer your question by yourself.

Take my words in a constructive manner.

TBIT40:

https://websmp109.sap-ag.de/~form/ehandler?_APP=00200682500000001337&_EVENT=DISPLAY&COURSE=TBIT40

TBIT41:

https://websmp201.sap-ag.de/~form/ehandler?_APP=00200682500000001337&_EVENT=DISPLAY&COURSE=TBIT41&LA...

TBIT42:

https://websmp206.sap-ag.de/~form/ehandler?_APP=00200682500000001337&_EVENT=DISPLAY&COURSE=TBIT42&LA...

TBIT43:

http://www50.sap.com/useducation/curriculum/course.asp?cid=60161651

TBIT44:

https://websmp102.sap-ag.de/~form/ehandler?_APP=00200682500000001337&_EVENT=DISPLAY&COURSE=TBIT44

for any queries you can revert with your questions

Thanks

sandeep sharma

PS ; if helpful kindly reward points

Former Member
0 Kudos

Hi Sunetha,

A workflow is a complete Business process from Sender to Recevier.........It is used in a situation where u require a "sync-async" bridge is used ....Generally it is used Business process Engine and transaction code for this "SXMB_MONI_BPE"............You can create a workflow here ..

Below mentioned links will help u in understanding further:

<b>Sync-async Bridge</b>

http://help.sap.com/search/highlightContent.jsp

<b>Business Process Engine</b>

http://help.sap.com/search/highlightContent.jsp

And for complete XI Process :

http://help.sap.com/saphelp_nw04/helpdata/en/14/80243b4a66ae0ce10000000a11402f/frameset.htm

Reward with ponits if helpfull

Regards

Sai Ganesh

Former Member
0 Kudos

HI Suneetha,

WorkFlow in general could be any process that takes place in real life.It could be the generation of pay slips by HR.Leave approval by him.Any thing the Step by step procedure of things that happens in real Business Scenario can be called as Workflow.

The following link can Help in understanding the Workflows in the case study.

http://iris.tennessee.edu/Blueprint/Workflow/Workflow.doc

Thanks,

Ramakrishna.

Former Member
0 Kudos

its is useful link:

<a href="http://searchsap.techtarget.com/featuredTopic/0,290042,sid21_gci1030357,00.html">http://searchsap.techtarget.com/featuredTopic/0,290042,sid21_gci1030357,00.html</a>

<a href="http://help.sap.com/saphelp_nw04/helpdata/en/a1/172437130e0d09e10000009b38f839/frameset.htm">http://help.sap.com/saphelp_nw04/helpdata/en/a1/172437130e0d09e10000009b38f839/frameset.htm</a>

if u like the post plz reward me.

Former Member
0 Kudos

This is a document which was sent !!!!!!!!!!!!! hope this will be helpful to you guys

Former Member
0 Kudos

Work Flow

Unit 1: Organizational Structure

Use

In order for the workflow system to establish the relationship between the requester and their superior, you must create an organizational plan in the system.

For this tutorial, of course, this organizational plan does not have to be complete and valid across the enterprise. To keep the test as simple as possible initially, define an organizational plan that only contains one administrator and one head of department.

Assign both items to yourself. As a result, all work items will appear in your own Business Workplace. Later you will modify the organizational plan such that you will have to work through the scenario with two users.

Procedure

The organizational plan required for this tutorial consists, when complete, of one organizational unit (= "department"), which contains two positions: a head of department and an administrator.

Each position is described by one job and each position is assigned one user as holder. The head of department position is also designated as chief position of the organizational unit.

Of course, a "real" organizational plan is created by arranging several organizational units with their positions in a hierarchy. Usually several positions are described by one job.

For further information, refer to the documentation Organizational Plan.

The procedure in this unit is divided into four parts:

1. You create an organizational unit.

2. Enter necessary jobs as required.

3. You create a position for the head of department in the new organizational unit.

You define a position in three steps:

i. You create a position that is assigned your organizational unit.

ii. You assign a holder to the position.

iii. You assign a job to the position.

3. You create a position for the administrator in the organizational unit.

Creating an organizational unit

1. Choose Tools &#61614; SAP Business Workflow &#61614; Development &#61614;&#61472;Definition tools &#61614; Organizational Management &#61614; Organizational plan &#61614; Create (T.Code: PPOCW).

2. Confirm the validity period proposed in the dialog box Creating a Root Organizational Unit.

This takes you to the Create Organization and Staffing (Workflow) screen. This user interface is divided into four screen areas:

3. On the Basic Data tab in the details area, enter an abbreviation and a name in the Organizational unit input fields.

Abbreviation: <ini_sales>

Name: <OrgUnit: Sales (ini)>

4. Choose .

You can now create the position for a head of department and one administrator.

Create jobs

When enhancing an organizational unit, the necessary jobs are usually already available. For this tutorial however, you create the necessary jobs for head of department and administrator yourself.

1. Choose Edit &#61614; Create jobs.

You go to the dialog box Create jobs. The lower area contains a list of existing jobs and the upper area contains an input table in which you can create new jobs by entering abbreviations and names.

2. In the input table, enter an abbreviation and a name for each of the new jobs.

Job - head of department:

Object abbreviation: < ini_dhead_C >

Name: < job: head of department (ini) >

Job administrator:

Object abbreviation: < ini_admi_C >

Name: < job: administrator (ini) >

3. Choose .

Creating Position for Head of Department

1. Change to the overview area in the staff assignments of the organizational unit, in order to assign positions, jobs and holders. Choose the arrow on the right next to the and then the staff assignments (list).

2. Choose .

A new position is then created in the staff assignments and is displayed in a new line in the table. The position is vacant and no job is assigned to it.

3. Open the details view for the new position in the details area by double-clicking on the entry in the table.

4. On the Basic Data tab, enter a code and a description in the Position input fields. Overwrite the previous contents.

Abbreviation: < ini_dhead_S >

Description: < position: head of department ( ini ) >

Assigning a holder to the position

You now assign R/3 users to the positions. The staff assignments for your organizational unit are displayed and you see the vacant position in the table.

5. Select User in the search area and enter the search criteria in order to find your user names.

All of the user names that match your search criterion are listed in the selection screen.

6. Select your user name in the selection area and drag it to the Person/User column of the position in the overview area.

Confirm the message that the relationship period of the validity has been changed.

7. Set the Head of own organizational unit indicator in the details area.

Assigning a job to the position

Assign the job of the head of department you created earlier to the position.

8. Select Job in the search area and enter the search criteria in order to find the job of the head of department.

All jobs that match your search criterion are listed in the selection screen.

9. Select job: head of department ( ini) in the selection area and drag it to the Job column of the position in the overview area.

10. Choose .

The job is assigned the position. Check this by switching to the staff assignments of the organizational unit. Select the organizational unit in the overview area, choose the arrow on the right next to the and then the staff assignments (list). The newly created job is displayed in the job column.

Create position for administrator and assign holder and job

You are now in the staff assignments of the organizational unit.

1. Choose .

A new position is then created in the staff assignments and is displayed in a new line in the table. The position is vacant and no job is assigned to it.

2. On the Basic Data tab in the details area, enter an abbreviation and a name in the Position input fields. Overwrite the previous contents.

ID: <ini admiS >

Description: < position: administrator ( ini ) >

3. Choose .

4. Select User in the search area and enter the search criteria in order to find your user names.

5. Select your user name in the selection area and drag it to the Person/User column of the position in the overview area.

Confirm the message that the relationship period of the validity has been changed.

6. Select Job in the search area and enter the search criteria in order to find the job of the administrator.

7. Select job: administrator ( ini) in the selection area and drag it to the Job column of the position in the overview area.

8. Choose .

Result

Display your entire staffing schedule again and make sure that all the information listed is correct.

You can display a detailed view of jobs, users, and positions. Choose the relevant cell in the table by double-clicking it.

In the details view of a position or job, all of the assigned tasks are displayed on the Tasks tab.

You have now completed the first unit (defining the organizational plan). You can now start on the next unit. To exit processing of the organizational structure, choose Back.

Unit 2: Creating a Workflow

Use

To define the flow of the approval process in the system, you first create a multistep task workflow template.

For further information, refer to Definition of Multistep Tasks in the SAP Business Workflow documentation.

Procedure: Creating a workflow template

1. Choose Tools &#61614; Business Workflow &#61614; Development &#61614;&#61472;Definition Tools &#61614; Tasks/Task Groups &#61614; Create (T.Code PFTC_INS)

This takes you to the Task: Maintain screen.

2. In the Task type field, choose the Workflow template entry.

3. Choose .

The Workflow Template: Add screen is then displayed.

Entering the basic data for the workflow template

1. Enter an abbreviation (of your choice) and a name (of your choice) for the workflow template to be created.

Abbreviation: < ini _ws>

Name: <Workflow: notification of absence ( ini )>

2. Choose .

3. In the Create Object Directory Entry dialog box, choose Local object.

The system has now allocated an 8-digit number for your workflow template. This number is made up of the 3-digit prefix number (Customizing setting) and a 5-digit number taken from a number range. This number together with the letters WS forms the workflow ID. Make a note of the ID so that you can later call the workflow more quickly.

Entering a workflow description

4. Go to the Description tab.

5. Choose the text type Task description and then .

The SAPscript text editor is then launched.

6. Enter a text that describes the task. You can use the following proposal:

<You can use this workflow to create a notification of absence. This will then be sent to your superior for review. You will be notified of the result of this review.

If your request is rejected, you can revise it and resubmit it for review or withdraw it completely.>

7. Choose to return to the workflow template and then save the workflow template.

Determining agents

To enable the workflow template to be started in dialog, the workflow template must be assigned to its possible agents.

8. Select Additional data &#61614;&#61472;Agent assignment &#61614; Maintain

The workflow template: agent assignment screen is displayed.

9. Position the cursor on the name of your workflow template.

10. Choose Properties…

The dialog box Task: <Workflow: Notification of absence (ini)> is displayed.

11. Set the General task flag.

12. Choose Copy and then .

Designating your workflow template as a general task means that every user in the system is authorized to start this workflow template in dialog.

Result

You have now created a workflow template as a "framework" for a workflow definition.

To create a workflow definition, you need tasks that are used as steps in the workflow definition.

Additional information: Tasks

A task can either be a single-step task or a multistep 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 leave request consists of these (and other) single steps, and is therefore a multistep task.

In this tutorial, a single step task is generally described as a task. The difference between the task types is only explicitly explained if there is a risk of confusion over multistep tasks. The term workflow is used as the umbrella term for the workflow template (and thus the multistep task) and the workflow definition. More precise differentiation only takes place if there is a risk of confusion.

On a technical level, the main difference between single-step tasks and multistep tasks is that:

• Every single-step task refers to an object method

• Every multistep task refers to a workflow definition

A workflow definition is made up of a sequence of different steps (for example, all steps required to process a leave request).

Standard tasks and workflow templates are client-independent. Customer and workflow tasks are client-dependent. Customer and workflow tasks are no longer supported and are therefore no longer used in this tutorial.

An Activity is a possible step type in a workflow definition. An activity refers to a task. It references a task, which can be a single-step or multistep task (subworkflow).

For further information, refer to Tasks and Task Groups in the SAP Business Workflow documentation.

Unit 4: Defining and Inserting Task "Create Notification of Absence"

Use

The notification of absence is created in the first step of the workflow. You will also need a task that executes this function. You can create the task separately from the workflow definition or directly from the Workflow Builder. This unit describes how you create the task from the Workflow Builder.

For further information on creating an individual task, refer to Definition of Single-Step Tasks in the SAP Business Workflow documentation.

Prerequisites

This task is a single-step task and it references one object method. The object type used (FORMABSENC (notification of absence)) and the required method (Create) are already defined and implemented in the Business Object Repository.

You are in the Workflow Builder and the initial workflow definition is displayed.

Procedure

Creating an Activity as a Step in the Workflow Definition

Add a first step of the type Activity to the workflow definition.

1. Choose under step type. The cursor changes shape.

2. Position the cursor on the Undefined step and click.

By doing so, you add an activity to your workflow definition. The step definition is shown in the right-hand part of the screen. You are on the tab page Control.

Defining a Task "Create Notification of Absence"

You now create a new task, with which a notification of absence can be created.

1. Choose the arrow on the right next to the and then Create task.

The Basic data tab in the Standard task: Create screen is then displayed.

Entering the basic data

2. Enter an abbreviation (of your choice) and a name (of your choice) for the standard task to be created.

Abbreviation: < ini _creat>

Name :<Create notification of absence (ini)>

Work item text

The work item text appears as an information text in the Business Workplace as soon as there is a work item for the step with this task.

3. Enter Create notification of absence in the Work item text field.

Object type and method

4. Enter an object type and a method:

Object type: FORMABSENC

Method: CREATE

You can also use the F4 input help to select the method. Additional indicators associated with this method are set automatically.

You can view the definition of the object type entered by double-clicking on it. Information about its components is provided.

5. Save your task as a local object.

The system has now allocated an 8-digit number for your task. This number is made up of the 3-digit prefix number (Customizing setting) and a 5-digit number taken from a number range. The identification of this task consists of TS and the eight digit number.

Determining agents

Selecting the possible agents for this task determines who is to be authorized to make leave requests. For this task, this should be all employees in your enterprise. Define the task as a general task.

1. Select Additional data &#61614;&#61472;Agent assignment &#61614; Maintain

This takes you to the Standard task: Maintain Agent Assignment screen.

2. Position the cursor on the name of your task.

3. Choose Properties…

The dialog box Task: <Notification of absence (ini)> is displayed.

4. Set the General task indicator.

5. Choose Copy and then .

6. Exit the task definition with .

Interim result

You have now defined your first task in full. This task is used in the activity that you created in the Workflow Builder.

Completing Activity

The Define Container Elements and Binding dialog box is then displayed in which the system proposes a change to the workflow container and a binding definition.

• Upper part of the dialog box: Proposal for new container elements in the workflow container.

The system proposes that you create a local container element in the workflow container, which can store the reference to the notification of absence created in this step. The element has the technical name AbsenceForm .

• Lower part of dialog box: Proposed binding definition

The system proposes that you define a binding from the task container to the workflow container. This binding transports the reference to the generated object (i.e. the created notification of absence) from the task (from the WIObject_ID element in the task container) to the workflow (to the AbsenceForm element in the workflow container).

Further information on automatic binding definition proposals is available under Binding Definitions from the Workflow Container and Binding Definitions from the Task Container in the documentation on SAP Business Workflow.

1. Confirm the proposal with .

The new AbsenceForm container element is displayed in the workflow container. Local container elements are marked . The remaining elements in the workflow container are workflow system elements. For further information, please refer to Workflow System Elements in the Workflow Container.

2. Enter a text to describe the step.

You can, of course, leave the description of the task that is proposed by the system.

(The current step in your workflow definition appears here.)

3. Go to the Outcomes tab.

All of the outcomes for this step are displayed here.

4. Enter a text for the description.

The description (proposal: < Application filled out> ) in the Task executed synchronously line.

Each step has at least one subsequent event (in this case: Task executed synchronously). The description is the text with which the outcome is labeled in the workflow definition.

The Form does not exist and Form could not be generated outcomes are the possible exceptions that could occur in the method execution. You "run the risk" of not intercepting these exceptions and not modeling any exception handling in your workflow definition. If one of the exceptions actually occurs at runtime, the workflow will assume the error status.

Checking the binding definition (optional)

1. Go to the Control tab.

2. Choose Binding (present).

The WF Builder: Binding for Step ‘<Create notification of absence>’ dialog box is then displayed.

o In the upper part of the screen, the binding defined from the workflow container to the task container is displayed. The system executes this binding before providing the task for execution.

This binding direction is not relevant for this step since no information is to be transported from the workflow to the task.

o In the lower part of the screen, the binding defined from the task container to the workflow container is displayed. This system executes this binding after the user has processed the task.

Here, the binding is WIObjectId. &ABSENCEFORM& has been automatically defined here by the system. This binding ensures that the reference to the notification of absence created is not only known in the single-step task, but also in the workflow.

You can view the contents of both containers by choosing Workflow container or Task container.

(The element of the task container WIObject_ID is called Notif. of absence .)

3. Choose .

You then return to the step definition.

Entering the agents responsible

On the tab page Control, choose the entry Workflow initiator (expression) in the area agent as the agent responsible.

The system enters the expression &_WF_INITIATOR& in the Expression field and in the input field beside the checkbox.

You start your executable workflow later manually. At this point in time, the system fills the workflow container element WFInitiator automatically with your user name.

The above assignment informs the workflow system that the first work item for creating the notification of absence should be addressed as the "starter" as the workflow.

You return to the screen Workflow definition: Create step: Activity

Concluding step definition

1. Choose to check the step definition.

2. Choose to exit the step definition.

3. Choose to view the entire workflow definition in the workflow area on the screen.

You will notice that your workflow definition now contains a new step (the activity just created). The undefined step is also still there.

4. Choose .

The workflow definition is checked, saved, and, provided it does not contain any errors, activated. The system displays a message if problems are encountered during the test.

5. Exit the Workflow Builder.

Result

You have now completed this unit and can start the next unit.

Unit 3: Starting the Workflow Builder

Use

A workflow definition is created with the help of the Workflow Builder.

Prerequisites

You have now created a workflow template ( Unit 2: Creating a Workflow).

Procedure

Calling the Workflow Builder

1. Choose Tools &#61614; Business Workflow &#61614; Development &#61614; Definition Tools &#61614; Workflow Builder.

The Workflow Builder is then launched with the workflow definition that was processed last. If the Workflow Builder has not yet been called, then an initial workflow definition is displayed.

The Workflow Builder screen is divided into the following areas.

The workflow definition is displayed in the Workflow area on the screen. If the workflow is shown in display mode, the step type area is not displayed. For further information, refer to Workflow Builder in the SAP Business Workflow documentation.

2. Choose and enter the abbreviation of your workflow template (< WSeight digit number >) .

You can use the F4 input help. Enter the start of the abbreviation for your workflow (for example: < ini*> ) and choose All of the workflows that match are displayed. Select your workflow and choose .

Result

The workflow definition is displayed and if necessary can be processed. If the Workflow Builder is called for the first processing of a newly created initial workflow definition, the following graphic is displayed:

If the graphic displayed differs from that above, check the graphic settings in the Workflow Builder. Choose Extras &#61614; Options, and click the Graphic tab. Choose the Without event-driven process chains view.

• The start of the workflow definition is indicated by Start Workflow. If the new workflow definition has been called from the definition of a multistep task for which triggering events are defined, these are represented by the symbol and their description.

• The end of the workflow definition is indicated by Workflow terminated.

• The area in which the new workflow definition can be added is indicated by an undefined step with an outcome. Steps are displayed in the form of symbols. The description of an outcome is illustrated in the standard view with an arrow.

This unit is now complete. In the following unit you create the first step in your workflow and define a task for this purpose at the same time.

Creating an Activity as a Step in the Workflow Definition

Add a first step of the type Activity to the workflow definition.

1. Choose under step type. The cursor changes shape.

2. Position the cursor on the Undefined step and click.

By doing so, you add an activity to your workflow definition. The step definition is shown in the right-hand part of the screen. You are on the tab page Control.

Entering basic data for control

3. Enter the abbreviation ( TS<8-digit number> ) of the standard task Create Notification of Absence in the Task field and choose .

If you no longer know the full abbreviation, you can use different methods to search for it:

o Use the F4 input help to search via the object type and method of the single-step task.

This brings you to the Search and Find: Tasks dialog box.

On the tab page Obj. type and method, enter the object type FORMABSENC and the method CREATE .

Then double-click your single-step task in the list. You should recognize your single-step task from your initials in the abbreviation. Choose .

o Enter a character string in the abbreviation or description and choose .

A list of tasks is then displayed in which you can double-click the desired task.

Every activity, as a step in a workflow definition, refers to a task.

At this point, the unique reference to this task is entered. The identification is made up of an abbreviation (T, TS, WF, or WS) followed by an 8-digit number.

If you select a workflow task (WF) or workflow template (WS) as your task, your activity is a subworkflow. If you select a customer task (T) or standard task (TS), your activity is a single step.

The Define Container Elements and Binding dialog box is then displayed in which the system proposes a change to the workflow container and a binding definition.

o Upper part of the dialog box: Proposal for new container elements in the workflow container.

The system proposes that you create a local container element in the workflow container, which can store the reference to the notification of absence created in this step. The element has the technical name AbsenceForm .

o Lower part of dialog box: Proposed binding definition

The system proposes that you define a binding from the task container to the workflow container. This binding transports the reference to the generated object (i.e. the created notification of absence) from the task (from the WIObject_ID element in the task container) to the workflow (to the AbsenceForm element in the workflow container).

Further information on automatic binding definition proposals is available under Binding Definitions from the Workflow Container and Binding Definitions from the Task Container in the documentation on SAP Business Workflow.

4. Confirm the proposal with .

The new AbsenceForm container element is displayed in the object area of the workflow container folder. Local container elements are marked . The remaining elements in the workflow container are workflow system variables. For further information, please refer to Workflow System Variables in the Workflow Container.

5. Enter a text to describe the step.

You can, of course, leave the description of the single-step task that is proposed by the system.

(The current step in your workflow definition appears here.)

6. Go to the Events tab.

All of the outcomes for this step are displayed here.

7. Enter a text for the description.

The description (proposal: < Application filled out> ) in the Task executed synchronously line.

Each step has at least one subsequent event (in this case: Task executed synchronously). The description is the text with which the outcome is labeled in the workflow definition.

The Form does not exist and Form could not be generated outcomes are the possible exceptions that could occur in the method execution. You "run the risk" of not intercepting these exceptions and not modeling any exception handling in your workflow definition. If one of the exceptions actually occurs at runtime, the workflow will assume the error status.

Checking the binding definition (optional)

1. Go to the Control tab.

2. Choose Binding (present).

The WF Builder: Binding for Step ‘<Create notification of absence>’ dialog box is then displayed.

o In the upper part of the screen, the binding defined from the workflow container to the task container is displayed. The system executes this binding before providing the task for execution.

This binding direction is not relevant for this step since no information is to be transported from the workflow to the task.

o In the lower part of the screen, the binding defined from the task container to the workflow container is displayed. This system executes this binding after the user has processed the task.

Here, the binding is WIObjectId. &ABSENCEFORM& has been automatically defined here by the system. This binding ensures that the reference to the notification of absence created is not only known in the single-step task, but also in the workflow.

You can view the contents of both containers by choosing Workflow container or Task container.

(The element of the task container WIObject_ID is called Notif. of absence .)

3. Choose .

You then return to the step definition.

Entering the agents responsible

Choose Workflow initiator (expression) under Agents.

The system enters the expression &_WF_INITIATOR& in the Expression field and in the input field beside the checkbox.

By doing so, you choose the agent responsible.

You start your executable workflow later manually. At this point in time, the system fills the workflow container element WFInitiator automatically with your user name.

The above assignment informs the workflow system that the first work item for creating the notification of absence should be addressed as the "starter" as the workflow.

You return to the screen Workflow definition: Create step: Activity

Concluding step definition

1. Choose to check the step definition.

2. Choose to exit the step definition.

3. Choose to view the entire workflow definition in the workflow area on the screen.

You will notice that your workflow definition now contains a new step (the activity just created). The undefined step is also still there.

4. Choose .

The workflow definition is checked, saved, and, provided it does not contain any errors, activated. The system displays a message if problems are encountered during the test.

5. Exit the Workflow Builder.

Result

You have now completed this unit and can start the next unit.

Unit 5: First Test

Use

You are now going to start a workflow in dialog for the first time, which will run according to your workflow definition. This workflow definition only contains a step for creating a notification of absence so far.

For further information on starting workflows, refer to Starting Workflows (Test Environment) in the SAP Business Workflow documentation.

Prerequisites

The creation of a notification of absence, which you carry out within your workflow, is reported on a system-wide basis by an event. Other workflows entered as event receivers for this event may therefore be started. The notification of absence created by you (and published by the event) is then also processed with these workflows.

This event is not used in connection with this tutorial.

To ensure that only you work exclusively with the notification of absence, you can deactivate any existing linkages between the event and its receivers. Proceed as follows:

If you carry out the following steps, you prevent other workflows being started unintentionally by your notification of absence.

However, you may interrupt other workflow demonstrations. Therefore, be careful and speak to the colleagues involved if necessary.

1. Choose Tools &#61614; Business Workflow &#61614; Development &#61614; Utilities &#61614; Events &#61614; Simulate Event.

2. Enter FORMABSENC in the Object type field.

3. Enter created in the Event field.

4. Choose .

The system simulates the event FORMABSENC.Created and establishes which workflows would be started.

5. If you find one or more entries in the list under the branch Tasks without syntax errors to be started, position the cursor on an entry and choose Event linkage.

The dialog box Event linkage: Triggering events is displayed.

6. Position the cursor on the entry with the red background for the event and choose .

The linkage between workflow and event is deactivated.

7. Choose .

8. Repeat steps 5 to 7 or repeat the whole simulation as applicable.

Procedure

Starting the workflow and filling out the form

1. If you are still in the Workflow Builder, choose .

The Start Workflow (Test Environment) screen is then displayed. The number of your workflow template is entered.

If you are no longer in the Workflow Builder, choose Tools &#61614; Business Workflow &#61614; Development &#61614; Runtime Tools &#61614; Start Workflow (Test Environment). Enter the identification of your workflow or use the F4 input help.

2. Choose .

To handle work processes more quickly, SAP Business Workflow supports Advancing with Immediate Dialog. When a workflow is started in dialog, this means that the first work item of the workflow is made available for processing immediately provided that the user who starts the workflow is also one of the recipients of this first work item. This is the case here because you entered the container element WFInitiator as the agent in the step definition.

The Create notification of absence screen, therefore, is displayed immediately where you can see the notification of absence form. It is the method Create that is executed with the first work item.

3. Fill out the form with entries of your choice.

4. Choose .

The Start Workflow (Test Environment) screen is then displayed again.

5. Choose and exit the Workflow Builder if necessary.

Starting a workflow / Business Workplace

Before you extend your workflow definition, carry out the following test. It will familiarize you with the Business Workplace.

1. Start your workflow in dialog again. Choose Tools &#61614; Business Workflow &#61614; Development &#61614; Runtime Tools &#61614; Start Workflow. (T.Code SWUI)

You go to the screen Start task.

2. Choose your workflow in the table on the left.

3. Choose Start on the right-hand side of the screen.

The notification of absence form is displayed.

4. Do not make any entries and do not save. Instead, choose .

You have now started the workflow but canceled the processing of its first step. But the processing of the work item is not yet completed. You have only broken the processing chain of advancing with immediate dialog.

5. Choose .

6. Choose Tools &#61614; Business Workflow &#61614; Development &#61614; Runtime Tools &#61614; Business Workplace.

7. Open the Inbox node and choose the Workflow folder.

Your workflow inbox now contains (at least) one work item for processing. This is the work item for creating a notification of absence, the processing of which you canceled previously.

8. Select the work item, if necessary, and choose .

You return to the Create notification of absence screen where the notification of absence form is displayed.

9. Fill out the form and choose .

The work item disappears from your workflow inbox.

Result

You have now completed this unit and can start the next unit.

Reporting and analysis

In this first test, you will take a look at the work item analysis function.

1. Choose Tools &#61614; Business Workflow &#61614; Development &#61614; Reporting &#61614; Work Item Analysis &#61614; Work Items Per Task

The Work Items Per Task screen is then displayed.

2. Select the monitoring period Today.

3. Select the work item type (Sub-)Workflow only.

4. Choose .

The system then determines all of the workflows that were started today. These are then listed on the Work Items Per Task from <Date> to <Date> screen. The number of work items in each workflow is also shown here.

Make sure that you only ever analyze the work items for your workflow and your absence notification.

5. Display the list of associated work items by double-clicking the workflow ID.

Both the workflows you just started for this workflow identification are displayed with status Completed.

6. Display the workflow log by double-clicking a work item ID.

The Workflow Log screen is then displayed.

For information on the workflow log, see Workflow Log in the SAP Business Workflow documentation.

7. Exit the work item analysis function.

Unit 6: Creating a Task "Check Notification of Absence"

Use

You define the task Check notification of absence. This task is incorporated into your workflow definition as the second step.

As this is not the first task you have defined, many steps will doubtless be familiar to you. (Refer to Unit 4: Defining and Inserting Task "Create Notification of Absence.)

Prerequisites

The object type used (here: FORMABSENC (notification of absence)) and the required method (here: Approve) are already defined and implemented in the Business Object Repository.

Procedure

1. Choose Tools &#61614; Business Workflow &#61614; Development &#61614;&#61472;Definition Tools &#61614; Tasks/Task Groups &#61614; Create.

The screen Task: Maintain is displayed.

2. In the Task type field, choose the Standard task entry.

3. Choose .

The Basic data tab in the Standard task: Create screen is then displayed.

Entering the basic data

1. Enter an abbreviation (of your choice) and a name (of your choice) for the task to be created.

Abbreviation: < ini _check>

Name: <Check notification of absence (ini)>

Object type and method

2. Enter an object type and a method:

Object type: FORMABSENC

Method: APPROVE

You can also use the F4 input help to select the method.

Work item text

3. In the Work item text field, enter the text Check notification of absence from .

4. Choose . Save your standard task as a local object.

5. You can include variables in your work item text to be filled with values from the task container at runtime..

The name of the creator of the notification of absence is to be included into the work item text. As soon as the work item appears in the superior’s Business Workplace, the name of the creator appears in the work item information text.

Position the cursor in the work item text after the word of .

6. Choose .

The Please choose an expression dialog box is then displayed.

7. Choose the expression Notif. of absence by double-clicking the Container node. &#61614; Issuer object ref. &#61614; Name.

If WIObject_ID is displayed instead of Notif. of absence, choose . The system then displays the description of the expressions instead of their technical names.

The variable &_WI_Object_ID.Creator.Name& has been added to the work item text automatically. The variable name displayed here is the technical name of the expression.

You can integrate all of the elements in the task container in your work item text. This enables you to include information into the work item text, which is not available until runtime.

Entering the description text

1. Go to the Description tab.

2. Choose Task description in the Test type field.

The current task description is then displayed. This text is intended to inform future recipients of a work item in which this task is referenced and help them in their work.

The text will often be similar to the work item text or may supplement it.

3. Choose .

4. Enter the following text:

Please check notification of absence no. &_WI_OBJECT_ID.NUMBER& from &_WI_OBJECT_ID.CREATEDATE& of employee &_WI_OBJECT_ID.CREATOR.NAME& .

Decide whether to approve the request.

If you want to insert an expression from the task container as a text variable, choose Include &#61614; Expression. Then choose the relevant expression in the Please choose an expression dialog box by double-clicking the Container node.

5. Choose .

6. Choose .

Determining possible agents

1. Select Additional data &#61614;&#61472;Agent assignment &#61614; Maintain

This takes you to the Standard task: Maintain Agent Assignment screen.

2. Position the cursor on the name of your task.

3. Choose .

You go to the dialog box Choose agent type.

4. Double-click Job.

The dialog box Choose Job is displayed.

5. Enter either part of or the full abbreviation of the job that you created for the head of department in Unit 1: Organizational Plan.

You return to the screen Standard task: Maintain agent assignment.

6. Choose .

You have linked the task to the job of a head of department. In the organizational plan, you use this job to describe a position. The holder of the position is also displayed.

7. Choose .

8. Choose .

Result

The task for checking the notification of absence is defined in full. You can now exit the screen for defining a task.

In the next unit, you will incorporate this task into the workflow definition.

Display your organizational plan again.

a. Choose Tools &#61614; Business Workflow &#61614; Development &#61614; Definition Tools &#61614; Organizational Management &#61614; Organizational Plan &#61614; Display.

b. Choose your organizational unit in the search area. Display it by double-clicking the entry in the table.

c. In the overview screen, choose the arrow on the right next to the and then Staff assignments (list).

d. Display a detailed view of the position of the head of department by double-clicking the entry in the list.

Here, you can see that this position is assigned to the job and, on the Tasks tab, that it is also assigned to the task Check notification of absence.

Unit 7: Including "Check Notification of Absence" in the Workflow Definition

Use

The task with which an employee can check a notification of absence is ready to be included into your workflow definition as the next step.

Prerequisites

You have defined a workflow with a step ( Unit 4: Task Defining and Inserting "Create Notification of Absence") and created the task Check Notification of Absence ( Unit 6: Create Task "Notification of Absence").

Procedure

Calling the Workflow Builder

1. Choose Tools &#61614; SAP Business Workflow &#61614; Development &#61614; Definition Tools &#61614; Workflow Builder.

The Workflow Builder is then launched in display mode with the workflow that was processed last.

2. Work through the following steps to display your workflow for this tutorial in change mode.

i. If the workflow you created for this tutorial is already displayed, choose . Go to step 3.

ii. If a different workflow is displayed, check whether the workflow you created is listed in the My available tasks area. Double-click it and choose . Go to step 3.

iii. Choose . Enter the complete abbreviation in the Task field on the Open other workflow definition dialog box and press RETURN. You can now also enter the workflow abbreviation. Enter either the full abbreviation or just the first characters (for example: < i*> ). Press F4 . The search result is then displayed. Choose your workflow by double-clicking it. When you enter the abbreviation in the Task field on the Open other workflow definition dialog box, all of the available versions are displayed. Since you have not created any versions, select version 0000 and choose . The workflow is then loaded in display mode. To switch to change mode, choose .

1. Choose to display the entire workflow in the workflow area on the screen.

Creating a container element in the workflow container

You need an additional container element in the workflow container to store the name of the user who will execute this step. This user name is to be used later in the notification text that is sent to the requester.

1. Choose the entry <Double-click to create> by double-clicking in the Workflow Container.

The dialog box for entering a container element is displayed.

2. Make the following entries:

Element: Approver

Name: Approver

Description: Approver of the absence request

Reference table: WFSYST

Reference field: AGENT

3. Choose .

You have now added a local container element to the workflow container, which is ready to take an agent name, based on its data type reference. However, you have not yet determined a value for this container element.

Creating an Activity as a Step in the Workflow Definition

1. Choose under step type. The cursor changes shape.

2. Position the cursor on the Undefined step that follows the outcome Request completed and click.

By doing so, you add an activity to your workflow definition. The step definition is shown in the right-hand part of the screen. You are on the tab page Control.

Entering basic data for control

3. In the Task field, enter the abbreviation ( TS<8-digit number> ) of the task Check Notification of Absence that you defined in the previous unit. Choose .

If you no longer know the full abbreviation, you can use different methods to search for it:

o Use the F4 input help to search via the object type and method of the task.

This brings you to the Search and Find: Tasks dialog box.

On the tab page Obj. type and method, enter the object type FORMABSENC and the method CREATE .

Then double-click your task in the list. You should recognize your task from your initials in the abbreviation. Choose .

o Enter a character string in the abbreviation or description and choose .

A list of tasks is then displayed in which you can double-click the desired task.

Every activity, as a step in a workflow definition, refers to a task.

At this point, the unique reference to this task is entered. The identification is made up of an abbreviation (T, TS, WF, or WS) followed by an 8-digit number.

If you select a workflow (WS or WS) as your task, your activity is a subworkflow. If you select a task (TS or T), your activity is a single step.

You go to a dialog box in which the system proposes binding from the workflow container to the task container.

Here, the object reference to the notification of absence is transported from the workflow container (container element AbsenceForm ) to the task container (to the container element WIObject_ID ).

1. Choose to confirm the proposal.

Extending the binding definition

Now define another binding via which the current agent of the work item (the superior) is stored in a container element of the workflow container.

2. Choose Binding (present).

The Binding for Step 'Check notification of absence' dialog box is then displayed. If the first column is entitled Element, choose to display the element description.

The system has created the following binding definition from the workflow container to the task container:

Notif. of absence &AbsenceForm&

This binding ensures that the correct notification of absence is checked in the task.

3. Choose .

All of the container elements in the task container are now displayed on the left-hand side. You can define a binding from these container elements to the workflow container.

4. Position the cursor in the lower half of the screen, in the empty input field beside the container element Actual agent and call the F4 input help.

5. Double-click Approver.

In addition to the bindings already existing, the following binding is now defined:

Actual Agent &Approver&

6. Choose .

Determining outcomes

The method APPROVE of the object type FORMABSENC, to which you refer in the standard task definition, is defined with a result. The three possible values of this result are offered on the tab page Outcomes as outcomes of this step:

• Approved

• rejected

• New

The indicates that these outcomes have already been transferred to the workflow definition. The outcome New is not really appropriate at this point. At this stage of processing, the notification of absence cannot be "new" any more. It should therefore not be incorporated in the definition.

1. Click on the symbol in front of the outcome New.

The symbol changes to .

The outcome Processing obsolete is processed if the relevant work item is set to obsolete via a process control step. This functionality is not used in this tutorial.

The outcome Form not available results from the exception defined for the method APPROVE. You could include this outcome into the workflow definition and would then have to model appropriate subsequent steps. However, you do not model anything for the purposes of this tutorial and accept that your workflow will have an error at runtime if this exception is raised.

2. Choose .

Two branches are now inserted in your workflow definition for the two marked outcomes Approved and Rejected.

Inputs for the agent

If you are working through this tutorial alone, do not specify anything for responsibility at this point. If it is processed when the workflow is executed, therefore, this step will be "offered" for processing to all employees declared as possible agents of the single-step task Check notification of absence. This means all user whose positions are described with the job head of department.

In your organizational plan, there is only one users who is a possible agent -> you.

• You have maintained the organizational plan with jobs, positions, and user assignments in Unit 1: Organizational Plan.

• You have defined the single-step task "Check notification of absence" and have assigned the possible agents in Unit 6: Definition of the Standard Task "Check Notification of Absence".

Concluding step definition

Choose .

The workflow definition is checked, saved, and, provided it does not contain any errors, activated. The system displays a message if problems are encountered during the test.

Result

You can subject your workflow definition to a second test.

Unit 8: Second Test

Use

You start your workflow in dialog and two steps are executed. The notification of absence is created in the first step and then checked in the second.

Procedure

Starting the workflow and filling out the form

1. If you are still in the Workflow Builder, choose .

The Start Workflow (Test Environment) screen is then displayed. The number of your workflow is entered.

If you are no longer in the Workflow Builder, choose Tools &#61614; Business Workflow &#61614; Development &#61614; Runtime Tools &#61614; Start Workflow (Test Environment). Enter the number of your workflow or use the F4 input help.

2. Choose .

You go to the screen Create Notification of Absence.

From the requester’s perspective

When the workflow is started, the work item for creating the notification of absence is provided to you directly for processing. This is because of advancing with immediate dialog. You were introduced to this in the first test.

3. Fill out the form and choose .

From the head of department's perspective

You created the step for checking the notification of absence in your workflow definition without specifying the agents responsible. This means that all of the possible agents of the single-step task are recipients of the work item. Since you occupy the position of both requester and head of department, you are automatically and immediately presented with the work item for approving the application. This is again because of advancing with immediate dialog.

As the superior, you have several options:

• Approve the request

• Reject the request

• Cancel processing of the request.

4. Choose to cancel processing.

The Start Workflow (Test Environment) screen is then displayed again.

Exit this dialog and, if necessary, the Workflow Builder.

Reporting and analysis: Workflow outbox

In the first test of your workflow, you were introduced at this point to work item analysis. Now, you will be introduced to the workflow outbox.

Amongst other things, the work items which you started in dialog along with date, time and current status are displayed in the workflow outbox.

1. Choose Tools &#61614; Business Workflow &#61614; Development &#61614; Runtime Tools &#61614; Business Workplace.

2. In the tree displayed, choose Outbox &#61614; Started workflows.

3. Choose the arrow on the right next to the and then Today only.

The work items for all the workflows you started today are then displayed. Note the statuses of the work items displayed in the Status column of the Business Workplace. Read the F1 help for the Status column.

4. Position the cursor on the work item for the workflow just started. This work item has the status in process.

From the current workflow data, you can see that the step Create notification of absence has been completed successfully, when that was, and who processed it. The work item has the status completed.

You can also see that the work item representing the task for checking the request still has status ready and can therefore still be seen in the superior’s Business Workplace.

Business Workplace - check notification of absence

You now once again occupy the position of the superior who canceled processing earlier when the application was to be checked.

5. In the tree, choose Inbox &#61614; Workflow.

The work items for you to process are displayed with their work item texts and certain other attributes.

A preview of the selected work item is displayed below the list and contains the description of the work item.

6. Select the work item for checking the notification of absence and choose .

You go to the work item display. There you find amongst other things the description text, also with replaced text variables.

7. Choose to return to the Business Workplace.

8. Choose or start execution by double-clicking the entry.

9. Either reject or approve the request. You should start the workflow twice and test each variant.

To check whether the workflow was completed correctly, go to your workflow outbox. The procedure is described above.

Result

Your workflow definition has now been tested and you can continue with the next unit.

Unit 9: Adding a User Decision

Use

In the previous units, you created a workflow whose definition contains two activities. These activities are based on two standard tasks that you created.

In this unit, you will add a user decision to your workflow definition.

With the user decision, the requester can decide to revise and resubmit the notification of absence if the head of department rejects it.

For further information, refer to Maintaining a User Decision in the SAP Business Workflow documentation.

Procedure

You start the Workflow Builder and open your workflow definition in Change mode. Proceed as described in Unit 7: Including "Check Notification of Absence" in the Workflow Definition.

Creating a user decision as a step in the workflow definition

1. Choose under step type. The cursor changes shape.

2. Position the cursor on the Undefined step that follows the outcome Rejected and click.

By doing so, you add a user decision to your workflow definition. The step definition is shown in the right-hand part of the screen. The Decision tab is displayed.

Entering basic data for user decision

3. Enter Your request was rejected by &. Revise? in the Title field.

This text is used as the title for the alternative decisions when the workflow is executed. The variable & is a placeholder for a parameter that is filled from the task container at runtime.

4. Choose the F4 input help in the Parameter 1 field.

The Expression for first parameter of user decision dialog box is then displayed.

5. Choose the Approver container element by double-clicking it.

Entering alternative decisions

6. Define the alternative decisions. Enter the following texts:

Decision texts Name

Decision: Revise request? Revise

Decision: Withdraw request? Withdraw

7. The decision texts you enter here appear as decision options on the screen that can be processed by the requester after their leave request has been rejected.

8. The descriptions are the terms used to describe the outcomes in the workflow definition.

9. Entering the agents responsible

10. Choose Workflow initiator (expression) under Agents.

The system enters the expression &_WF_INITIATOR& in the Expression field and in the input field beside the checkbox.

Concluding step definition

1. Choose to check the step definition.

2. Choose to exit the step definition.

3. Choose to view the entire workflow definition in the workflow area on the screen.

You can see that your workflow definition contains a user decision in the rejected branch. This has two outcomes whose branches converge again in the rejected branch. Each new branch contains an undefined step.

4. Choose .

The workflow definition is checked, saved, and, provided it does not contain any errors, activated. The system displays a message if problems are encountered during the test.

Result

You can now subject your workflow definition to another test.

Unit 10: 3rd Test

Use

You start your workflow in dialog and three steps are executed: Two activities, for creating and checking a notification of absence, and one user decision.

Procedure

Starting the workflow and filling out the form, checking the notification of absence, user decision

1. If you are still in the Workflow Builder, choose .

The Start Workflow (Test Environment) screen is then displayed. The number of your workflow is entered.

If you are no longer in the Workflow Builder, choose Tools &#61614; SAP Business Workflow &#61614; Development &#61614; Runtime tools &#61614; Start workflow (test environment). Enter the number of your workflow or use the F4 input help.

2. Choose .

You go to the screen Create Notification of Absence.

From the requester’s perspective

3. Fill out the form and choose .

When you save the form, you (as superior) can immediately approve or reject the application (reason: advancing with immediate dialog).

From the superior’s perspective

4. Do not approve the application.

5. Choose .

If the request is not approved, the next step in the workflow definition is the user decision. The requester was entered as the agent for the step. The decision is therefore offered to you again as the requester (reason: advancing with immediate dialog).

From the requester’s perspective

You are given three options:

• Revise request?

• Withdraw request?

• Cancel

It is irrelevant which option you choose since you have not defined any follow-up steps. You should start the workflow several times and try out the different options. The complete process flow can be checked each time in the work item analysis or workflow outbox.

Unit 11: Define and Include "Revise Notification of Absence" in the Workflow Definition

Use

You will now add the activity Revise notification of absence to your workflow definition. You will create the necessary task within the workflow definition as in unit 4.

Procedure

You start the Workflow Builder and open your workflow definition in Change mode. Proceed as described in Unit 7: Including "Check Notification of Absence" in the Workflow Definition.

Creating an activity as a step in the workflow definition

1. Choose under step type. The cursor changes shape.

2. Position the cursor on the Undefined step that follows the outcome Revise after the user decision, and click.

By doing so, you add an activity to your workflow definition. The step definition is shown in the right-hand part of the screen. You are on the tab page Control.

Creating a standard task for use in this step

1. Choose the arrow on the right next to the and then Create task.

The Basic data tab in the Standard task: Create screen is then displayed.

2. Enter the following data.

Abbreviation: <ini_revis>

Name: <Revise notif. of absence (ini)>

Work item text: Revise notification of absence

Object type: FORMABSENC

Method: UPDATE

You can also use the F4 input help to select the method.

3. Save your standard task as a local object.

4. Select Additional data &#61614;&#61472;Agent assignment &#61614; Maintain

5. Position the cursor on the name of your standard task.

6. Choose Properties…

7. Set the General task indicator.

8. Choose Copy and then .

The screen for editing the standard task is then displayed.

9. Choose and then .

You then return to the step definition in the Workflow Builder. For this task, a binding must be defined between the workflow and task containers. The system proposes a binding and displays it for you to check in the Define container elements and binding dialog box. This proposal defines that the object reference to the notification of absence is transported from the workflow container (container element AbsenceForm ) to the task container (container element WIObject_ID ).

10. Confirm the proposal with .

The system has entered the abbreviation for the new standard task in the Task field. The Step description field contains a description of the standard task. You can change this entry if necessary.

11. Switch to the Outcomes tab and enter a description (for example request revised ) for the Task executed synchronously outcome.

Entering the agents responsible

12. Choose Workflow initiator (expression) under Agents.

The system enters the expression &_WF_INITIATOR& in the Expression field and in the input field beside the checkbox.

By doing so, you choose the agent responsible.

Concluding step definition

1. Choose to check the step definition.

2. Choose to exit the step definition.

3. Choose to view the entire workflow definition in the workflow area on the screen.

You will notice that your workflow definition now contains a new step (the activity just created). The undefined step is also still there.

4. Choose .

The workflow definition is checked, saved, and, provided it does not contain any errors, activated. The system displays a message if problems are encountered during the test.

Result

You can now subject your workflow definition to another test. Carry out the test as described in Unit 10: Third Test.

Test proposal

To test the new step, proceed in the following order:

1. Create notification of absence.

2. Reject application

3. Revise user decision.

4. Revise request (the new step)

Since you are both the requester and approver and because advancing with immediate dialog is activated, all of the steps are presented to you directly.

Unit 12: Integrating the UNTIL Loop for Reapproval

Use

If the requester decides to revise and resubmit the notification of absence to their superior, the step Check notification of absence must be executed again.

There are different ways of solving this problem. The solution outlined here is only one example.

• You create a container element in the workflow container that you use as a flag. This flag contains different values, depending on the status of the notification of absence:

o Approved

o Not approved and revised

o Not approved and not revised

To assign values to the container element, container operations must be executed on the workflow container.

For information on the workflow log, see Definition of the Workflow Container in the SAP Business Workflow documentation.

• You use this container element to define the condition in the UNTIL loop.

For further information, refer to Maintaining an UNTIL loop in the SAP Business Workflow documentation.

Procedure

You start the Workflow Builder and open your workflow definition in Change mode. Proceed as described in Unit 7: Including "Check Notification of Absence" in the Workflow Definition.

Create container element in the workflow container

1. Choose the entry Double-click to create by double-clicking in the Workflow Container.

The dialog box for entering a container element is displayed.

2. Make the following entries:

Element: Flag

Name: Flag

Description: Flag for approval status

Reference table: SYST

Reference field: INPUT

3. Choose .

You have now added a local container element to the workflow container, which is ready to store a flag, based on its data type reference. However, you have not yet determined a value for this container element.

Integrating the UNTIL loop as a step

1. Choose under step type. The cursor changes shape.

2. Move the cursor to the Undefined step before the event workflow end and click.

By doing so, you add an UNTIL loop to your workflow definition. The step definition is shown in the right-hand part of the screen.

Entering the basic data

3. Enter Resubmission required? in the Step description field.

4. Click on the condition area to open the condition editor.

The bottom half of the screen contains the empty condition, whereas the top half shows the system fields as well as the content of the workflow container. The field in the Expression 1 column is ready for input and marked .

5. Choose the Flag container element as the first expression by double-clicking it.

The first expression is now entered in the condition in the lower part of the screen. The Expression 2 field is now ready for input and marked .

6. Choose as the operator.

7. Enter the constant X in the field for Expression 2 and confirm by pressing Enter .

8. Choose .

You have now defined the condition Flag = X .

For further information, see Condition Editor.

The comparison between the container element Flag and the constant X returns either the result true or the result false. Two outcomes are therefore possible.

9. Enter the following texts for the outcomes:

True: Flag equal to X - no resubmission

False: Flag not equal to X - resubmission

If the result of the evaluated condition is false, the loop is processed again. If the notification of absence is to be resubmitted to the superior, the container element flag must not have the value X . For this purpose, you will insert container operations in the workflow definition in the next unit.

10. Choose .

You have now inserted an isolated UNTIL loop into the workflow definition, which does not yet contain any steps. You must change the workflow definition so that all of the steps that are required to check and resubmit the notification of absence are within the UNTIL loop.

In order to understand the steps required, you must familiarize yourself with block operations.

Block operations

1. Choose to display the entire workflow definition in the workflow area on the screen.

2. Display the block structure of your workflow definition. Choose Graphic &#61614; Blocks &#61614; Show.

The workflow definition is block-oriented. Every block represents a basic structural element that is a self-contained and consistent arrangement of steps and outcomes.

If you, for example, create a new step that has one outcome, this pair (step, outcome) represents a block. Operations that are performed on one step (delete, cut,..) always affect the entire block associated with that step.

In the above example, in which the block consists of the pair (step, outcome), using the delete function will also delete the corresponding outcome as well.

You should test the operations listed under Edit &#61614; Block on blocks:

o First save your workflow definition.

o Test the various block operations.

You can undo changes at any time by choosing . Another possibility is to exit the Workflow Builder without saving your work and to call it again.

For further information, refer to Block Orientation in the Workflow Definition.

Copying steps to the UNTIL loop

The step Check notification of absence, which follows the outcome Request completed, is the first step in a new block. To implement the resubmission, the workflow must send the notification of absence to this step after it has been revised by the requester. You have used an UNTIL loop for this purpose. The step Check notification of absence must be located within this loop. In order to do so, first cut the block that begins with this step. Then paste the cut block in the UNTIL loop.

1. Select the step Check notification of absence.

2. Choose to cut the block.

3. Select the Undefined outcome in the UNTIL loop and choose .

4. Choose to align the graphic.

5. Choose to view the entire workflow definition in the workflow area on the screen.

You will notice that your workflow definition now contains steps within the UNTIL loop.

6. Choose .

The workflow definition is checked, saved, and, provided it does not contain any errors, activated. The system displays a message if problems are encountered during the test.

Result

The integration of the UNTIL loop is now complete. The workflow up to this point, however, delivers an incorrect result, since the Flag container element is not assigned a value during execution. The result of the evaluated condition in the UNTIL loop is always false and the workflow can never be completed. To ensure that the workflow is executed correctly, you will add further container operations to the workflow definition in the next unit.

Unit 13: Inserting Container Operations

Use

You have added an UNTIL loop to your workflow definition. To ensure that this loop condition is executed correctly, you have to add container operations to your workflow definition that change the value of the flag container element in accordance with how the workflow is executed.

Prerequisites

You have added an UNTIL loop to your workflow definition.

Procedure

You start the Workflow Builder and open your workflow definition in Change mode. Proceed as described in Unit 7: Including "Check Notification of Absence" in the Workflow Definition.

Integrating container operations as a step

You can manipulate the individual elements of the workflow container using a container operation type step.

You need to insert a container operation at three different points in your workflow definition.

• After the outcome Request revised

At this point, you assign the workflow container element Flag the value Z. The comparison in the UNTIL loop then returns the result false. In this case, the workflow continues via the outcome Flag does not have value X and the request is resubmitted to the superior’s Business Workplace.

• After the outcome Withdraw

At this point, you assign the workflow container element Flag the value X. The comparison in the UNTIL loop returns the result true. The loop is exited.

• After the outcome Approved:

You assign the container element Flag the value X. The comparison in the UNTIL loop returns the result true. The loop is exited.

Container operation after the outcome revised event

1. Choose under step type. The cursor changes shape.

2. Position the cursor on the Undefined step that follows the outcome Request revised and click.

By doing so, you add a container operation to your workflow definition. The step definition is shown in the right-hand part of the screen.

3. Enter the following basic data:

Step name: Set flag to Z

Outcome name: Flag = Z

4. Specify the following for the operation:

Result element: Flag (select using F4 input help)

Expression: Z

The input fields for the operator and second expression must be empty.

When this step is executed, the Flag container element in the workflow container receives the value Z. This value remains as long is it is not changed explicitly.

5. Choose .

Container operation after the Withdraw outcome

1. Choose under step type. The cursor changes shape.

2. Position the cursor on the Undefined step that follows the outcome Withdraw and click.

By doing so, you add a container operation to your workflow definition. The step definition is shown in the right-hand part of the screen.

3. Enter the following basic data:

Step name: Set flag to X

Outcome name: Flag = X

4. Specify the following for the operation:

Result element: Flag (select using F4 input help)

Expression: X

The input fields for the operator and second expression must be empty.

5. Choose .

Container operation after the Approved outcome

Since this container operation is identical to the one created above, you can simply copy it.

1. Select the container operation Set flag to X after the Withdraw outcome and choose .

2. Select the Undefined step that follows the Approved event and choose .

Concluding step definition

Choose .

The workflow definition is checked, saved, and, provided it does not contain any errors, activated. The system displays a message if problems are encountered during the test.

Result

You have now extended the workflow definition in such a way that the results of the condition evaluated in the UNTIL loop are meaningful. You can now subject your workflow definition to another test. Carry out the test as described in Unit 10: Third Test.

Unit 14: Changing Staff Assignments

Use

In the tests you have carried out so far you acted both as the requester and as the superior.

In this unit, you will change the organizational plan in such a way that the requester and superior are two different R/3 users.

You can change the organizational plan without modifying the workflow definition.

Procedure

You enter a different user as the superior in the staff assignments of your organizational plan. Ask a colleague whether they would like to take part in this test. Or have yourself a second user created.

1. Choose Tools &#61614; SAP Business Workflow &#61614; Development &#61614; Definition tools &#61614; Organizational Management &#61614; Organizational plan &#61614; Change.

This takes you to the Change Organization and Staffing (Workflow) screen.

2. Search for your head of department position in the search area. The positions that were found are displayed in the selection area. Open yours by double-clicking on the entry in the change mode.

Deleting position holders

3. Select the row in the overview area in which the assignment to the user is entered.

4. Choose the arrow on the right next to the and then Assignment.

The position of the department head is no longer occupied.

Reassigning position holders

5. Choose User in the search area and search for the user whom you want to assign to the position.

All of the users that match the search criteria are displayed in the selection area.

6. Select the user whom you want to assign to the position and drag him or her to the line position: head of department (ini) in the overview area. Confirm the adaptations of the relationship period.

7. Choose .

This completes the changes to the staff assignments. The two positions are held by different persons.

Result

You have changed the staff assignments by changing the assignment of users to a position. You can check this by displaying the staff assignments. Proceed as described in Unit 1: Organizational Plan.

You can also start with Unit 16: Fourth Test directly after this unit. The recipients of the work item for the step Check notification of absence are then determined from the possible agents for the single-step task. You assigned the job of the head of department as the possible agents of this task in Unit 6: Create task "Check Notification of Absence".

Unit 15: Using a Role

Use

In the organizational plan you have created up to now, there are two positions, each of which is described by a job. Each position must be linked to a different user.

The job of department manager is linked to the department manager position. The job of department manager, in turn, is linked to the task Check notification of absence. In a more extensive organizational plan containing several positions for department managers, each position can be linked to the job of department manager.

These links ensure that each user who is assigned to a position as department manager is one of the possible agents of the task Check notification of absence. If you want to assign all of the department managers as possible agents of a different task, all you have to do is link this task to the job of department manager. You do not need to make any detailed changes.

You can add a further organizational unit to your organizational plan by creating a new position as department manager and linking it to a third user. When you link this new position to the existing job of department manager, the third user is automatically added to the list of possible agents for the task Check notification absence.

If you then create a notification of absence, it is offered to all of the possible agents for processing. This is clearly undesirable, since the notification of absence should only be presented to your own superior. This superior is the head of department who has the chief position in the organizational unit to which you too belong.

To ensure that the notification of absence is not submitted to all of the possible agents, you must define agents responsible in your step definition. All of the agents responsible who are also possible agents for this task then become recipients of the work item for the task. In this example, the agents responsible must be defined dynamically, since the relevant agent depends on the requester (person initiating the workflow). To do so, you use a role.

The role Superior of is shipped as standard with the R/3 System. This role first establishes a user's position and the relevant organizational unit, and then finds the chief position in this organizational unit.

This role only works correctly if you are not your own superior. You should only work through this unit if you have completed Unit 14: Changing Staff Assignments and adapted your organizational plan accordingly.

By using roles to assign responsibilities, you do not need to have any specific knowledge of the organizational plan when you define a workflow definition. When the role is resolved at runtime, all of the necessary information is provided via the binding definition from the workflow container to the role container.

Procedure

You start the Workflow Builder and open your workflow definition in Change mode. Proceed as described in Unit 7: Including "Check Notification of Absence" in the Workflow Definition.

Selecting a role

1. Open the step definition for the activity Check notification of absence by double-clicking the activity icon in the workflow area on the screen.

2. Choose Superior of workflow initiator under Agents.

The system then enters the role ID ( 00000168 ) in the Role selection field and in the input field.

The binding between the workflow container and the role container is created automatically here. If you choose Role in the checkbox and enter the role in the input field using the F4 input help, you must define the binding manually.

Concluding step definition

1. Choose to check the step definition.

2. Choose to exit the step definition.

3. Choose .

The workflow definition is checked, saved, and, provided it does not contain any errors, activated. The system displays a message if problems are encountered during the test.

Result

You can now subject your workflow definition to another test.

Unit 16: Fourth Test

Use

In the organizational plan that you changed in Unit 14: Adjusting the Staff Assignments, your colleague has now assumed the tasks of the superior. As the requester, you must start the workflow. The work item for checking the request will then be sent to the Business Workplace of the superior.

Procedure

Procedure as requester

1. Choose Tools &#61614; Business Workflow &#61614; Development &#61614; Runtime Tools &#61614; Start Workflow.

All of the workflows that you are allowed to start are listed on the left-hand side of the screen. A description of the selected workflow is shown on the right.

2. Select your workflow and choose Start.

The work item for creating the notification of absence is proposed to you immediately for processing.

3. Fill out the form and choose .

You have now submitted your request and your superior must decide whether to approve it. Since you are not now the recipient of the next work item, advancing with immediate dialog does not have any effect.

Procedure as superior

1. Choose Office &#61614; Workplace to start the Business Workplace.

2. Open the folder Inbox &#61614; Workflow.

The request awaiting approval is displayed as a work item in this folder.

3. Select the work item.

The task description of the single-step task is displayed in the work item preview. As you can see, the expressions used in the task description have been replaced with the current content.

4. Choose but do not approve the request.

5. Choose .

You are now in your Business Workplace. The work item you have just executed is no longer displayed in the list.

Procedure as requester

6. Choose Office &#61614; Workplace to start the Business Workplace.

1. Open the folder Inbox &#61614; Workflow.

This folder contains a work item awaiting a user decision.

1. Select the work item and choose .

2. Select Revise application in the user decision dialog box.

Since the flag advancing with dialog is set in the step definition for the activity Revise notification of absence, the request is immediately presented to you for revision. If this flag is not set, you must execute the work item from your Business Workplace.

3. Change the request and choose and .

You are now in your Business Workplace. The work item you have just executed is no longer displayed in the list.

Procedure as superior

If you have not closed your Business Workplace, choose to refresh the work item display.

You have received the request from the requester again. They can proceed as above to approve the request or reject it again. This workflow does not have a modeled response to a situation in which the requester and superior do not reach agreement. The workflow definition can be easily extended for this situation (for example, automatic notification of a third person if the request is exchanged between the employee and head of department several times).

Reporting and analysis with the workflow log

You should start the workflow several times together with your colleague and try out the alternatives. These alternatives can then be analyzed via work item analysis or the workflow outbox.

Use the workflow log in this unit. If the workflow you want to analyze is displayed in the work item analysis or in the workflow outbox, select the entry and choose . The workflow log provides information about all the stages of processing. This includes the following:

• Which steps were executed?

• Who was the agent?

• When was processing carried out?

• What was the result of the processing?

If the workflow log is displayed with ActiveX, you can view the various steps in the workflow in the form of a graphic. To do so, choose . For further information on the workflow log, please refer to Workflow Log: Standard View, and on the ActiveX view under Personal Settings.

Unit 17: Including "Send Notification" into the Workflow Definition

Use

You have created a complete workflow with which a notification of absence can be created, revised and approved.

In this unit, you will insert a step in the workflow definition that sends a notification to the requester after the request has been approved.

Procedure

You start the Workflow Builder and open your workflow definition in Change mode. Proceed as described in Unit 7: Including "Check Notification of Absence" in the Workflow Definition.

A separate step type is available for the sending of mails.

1. Select the outcome Approved of the step Check notification of absence and choose Create in the context menu.

The dialog box Select step is displayed.

2. Choose Send mail.

The step definition is then displayed. The input fields required for sending a mail are found on the tab page Mail.

3. Due to the fact that the mail is to be sent to the requester (the workflow initiator), you do not need to change the standard settings. Inspite of this, choose the entry Workflow initiator in the field Recipient type.

When entering a recipient, you must first select a recipient type. The entries have the following meanings:

&#61607; Workflow initiator: Choose this entry if only the workflow initiator is to receive a mail. The recipient type is automatically set to Organizational object and the expression &_WF_INITIATOR& is entered in the field Recipient. These entries are the standard settings.

&#61607; Organizational object: You must enter an Organizational object in the field Recipient or choose an expression that contains one or several organizational objects. Use the F4 input help when making the entries. When you enter an expression, the system automatically creates a container element in the task container and adds the binding definition.

&#61607; E-Mail address: In the field Recipient, enter either an e-mail address directly or by using the F4 input help, select a container element from the workflow container that contains one or several Internet addresses at runtime. The corresponding expression is entered. The system automatically creates a container element in the task container and adds the binding definition.

When you change the recipient type for the first time, the system automatically creates the necessary task for this step. You must also enter the abbreviation and the name of this task.

1. Enter the basic data for the task:

Abbreviation: <ini_nottxt>

Name: <Notification request accepted (ini)>

In the Create Object Directory Entry dialog box, choose Local object.

2. Enter the following text for the mail subject:

<Your leave request was reserved>

3. Enter the following text that the system is to send to the requester if the request is approved:

<Dear colleague,

Your leave request number &AbsenceForm.Number& from

&AbsenceForm.CreateDate& was approved on &AbsenceForm.ApprovDate& by &AbsenceForm.Approver.Name&.>

If you want to include an expression that is to be replaced at runtime, choose . Choose the expression from the container elements of the workflow container. The system automatically creates a container element in the task container and adds the binding definition.

4. Choose .

Activating workflow definition

1. Choose .

The workflow definition is checked, saved, and, provided it does not contain any errors, activated. The system displays a message if problems are encountered during the test.

Test

Test your workflow definition in the usual way.

You receive a mail when your "superior" has approved your "notification of absence". You find the mail in your Business Workplace in the folder Inbox &#61614; Unread documents.

Unit 18: Work Item Attachments

Use

The superior is to have the opportunity to add an attachment to their work item for checking the notification of absence. This attachment is a document (any SAPscript or PC document), which is then made available to all subsequent recipients in the workflow. The superior can use this to give a full explanation for a rejection.

An attachment can be added to a workflow before the workflow is actually executed in the Business Workplace.

To create an attachment after the workflow has been executed, you have to change the definition of the associated standard task.

To enable the superior to create an attachment after the notification of absence has been checked, you must set the Confirm end of processing flag for the task Check notification of absence. This property means that the agent has to confirm the end of processing of the work item explicitly. The agent can also add an attachment before this confirmation.

For further information about using documents in workflows, refer to Document Processing in the SAP Business Workflow documentation.

Procedure

You start the Workflow Builder and open your workflow definition in Change mode. Proceed as described in Unit 7: Including "Check Notification of Absence" in the Workflow Definition.

Changing the task "check notification of absence"

1. Open the step definition for the step Check notification of absence by double-clicking it.

2. Double-click the task ID to open the task definition.

You go to the screen Standard task: Display.

3. Choose to switch to change mode.

4. Set the Confirm end of processing flag under Execution.

5. Choose and then .

Concluding step definition

1. Choose to check the step definition.

2. Choose to exit the step definition.

3. Choose .

The workflow definition is checked, saved, and, provided it does not contain any errors, activated. The system displays a message if problems are encountered during the test.

Result

Execution of the work item for the step Check notification of absence must be confirmed expressly. This enables you to create an attachment after the request has been approved or rejected.

You can also create attachments while a work item is being executed. An example of this is provided in the demo workflows. Choose Tools &#61614; Business Workflow &#61614; Development &#61614; Environment &#61614; Start demo workflows. Start the demo workflow Demo for WI execution with WF toolbox. Further information is provided on the right-hand side of the screen.

Unit 19: Fifth Test

Use

After you have executed the step Check notification of absence, you must confirm the end of processing.

Procedure

Procedure as requester

1. Choose Office &#61614; Start Workflow.

All of the workflows that you are allowed to start are listed on the left-hand side of the screen. A description of the selected workflow is shown on the right.

2. Select your workflow and choose Start.

The work item for creating the notification of absence is proposed to you immediately for processing.

3. Fill out the form and choose .

You have now submitted your request and your colleague must decide whether to approve it. Since you are not now the agent of the next activity, advancing with immediate dialog does not have any effect.

Procedure as superior

1. Choose Office &#61614; Workplace to start the Business Workplace.

2. Open the folder Inbox &#61614; Workflow.

The request awaiting approval is displayed as a work item in this folder.

3. Select the work item.

The task description of the task is displayed in the work item preview. As you can see, the expressions used in the task description have been replaced with the current content.

4. Choose but do not approve the request.

5. Choose .

The dialog box for confirming the end of processing appears.

6. Choose the arrow on the right next to the and then Create attachment.

The Create Document: Header dialog box is then displayed.

7. Choose RAW as the Type and enter a title:

Title: Reason for rejecting the request

8. Choose .

The SAPscript editor is then displayed.

9. Enter your reason and choose . Choose .

You then return to the dialog box for User confirmation of end of processing. The attachment is displayed under Objects and attachments.

10. Choose Complete work item.

You are now in your Business Workplace and the work item you have just processed has been removed from the worklist.

Procedure as requester

1. Choose Office &#61614; Workplace to start the Business Workplace.

2. Open the folder Inbox &#61614; Workflow.

This folder contains a work item awaiting a user decision. The symbol in the Attachment column indicates that the work item has an attachment.

3. Select the work item.

All of the attachments for this work item are displayed in the work item preview.

4. Choose the attachment in the work item preview.

The attachment is then opened and displayed in a new screen.

5. Execute the work item.

Further Procedure

Continue processing the workflow and analyze it using the workflow log.

Unit 20: Monitoring Missed Deadlines

Use

When defining steps that require dialog with the user, you can instruct the workflow system to monitor certain deadlines. The workflow system can monitor the following types of deadline:

• Requested start

• Latest start

• Requested end

• Latest end

This unit explains how missed deadlines are usually handled: The standard system response to an exceeded deadline is to notify a recipient of the message for missed deadlines by sending a work item for missed deadlines to his or her Business Workplace.

For further information, please refer to Maintaining the Deadline Tabs in the SAP Business Workflow documentation.

In this unit, the workflow is to be extended so that the requester should be notified if the superior has not made the decision about the leave request after 10 minutes.

Procedure

You start the Workflow Builder and open your workflow definition in Change mode. Proceed as described in Unit 7: Including "Check Notification of Absence" in the Workflow Definition.

Determining the recipient of the message for missed deadlines

1. Open the step definition for the step Check notification of absence by double-clicking it.

2. Go to the Latest end tab.

3. Choose the entry Work item creation as the reference time.

The active deadline is indicated by the symbol in the tab index of the relevant tab.

4. Enter the value 10 in the field + and choose Minutes as the time unit.

5. On the Display text tab, choose the entry Workflow initiator (expression) as the recipient.

As a result, the entry WFInitiator is automatically copied to the adjacent field and the entry in the checkbox changes to Expression.

If a deadline is exceeded, the text visible in the display is automatically copied to the work item for missed deadlines. You will now change this text in the task definition.

6. Choose the highlighted text in the display to open the task definition.

7. Choose and go to the Description tab.

8. Choose the text type Text for latest end and then .

The SAPscript text editor is then launched.

9. Enter the following text:

Your notification of absence no. &_WI_OBJECT_ID.NUMBER& from &_WI_OBJECT_ID.CREATEDATE& has not been approved yet.

You should remind your superior.

If you want to insert an expression from the task container as a text variable, choose Include &#61614; Expression. Then choose the relevant expression in the Please choose an expression dialog box by double-clicking the Container node.

10. Choose .

11. Choose and then .

Concluding step definition

1. Choose to check the step definition.

2. Choose to exit the step definition.

3. Choose .

The workflow definition is checked, saved, and, provided it does not contain any errors, activated. The system displays a message if problems are encountered during the test.

Test

1. Choose Office &#61614; Start Workflow.

All of the workflows that you are allowed to start are listed on the left-hand side of the screen. A description of the selected workflow is shown on the right.

2. Select your workflow and choose Start.

The work item for creating the notification of absence is proposed to you immediately for processing.

3. Fill out the form and choose .

You have submitted your request and should now allow the deadline to expire.

Once the latest end passes, a work item for missed deadlines appears in your Business Workplace notifying you of the missed deadline. This work item is a deadline monitoring work item, for which there is no executable method. You can go from the display of this work item to the work item display of the late work item.

Notes on extensions

The recipient of a message for missed deadlines is notified with a work item. The notification text is stored in the task definition of the monitored task.

If you want to customize the notification, you can define you own Text for latest end on the Description tab in the task definition for the single-step task Check notification of absence. This text can contain text variables that are replaced at execution time.