You are on page 1of 22

The Business Process

This tutorial will take you step by step through the one of the scenarios in the workflow showcase transaction. This example process shows how an employee submits an application for a vacation the manager rejects the application the applicant changes the application and resubmits

However, in order for you to step through the scenario yourself, you will take on the role of applicant and manager. This makes it simpler for you to execute in the system because you don't need two user Ids to complete the scenario.

Goal
At the end of the scenario you should have a feel for how a workflow runs, and how it can be used to automate a business process. The Inbox used in this scenario is the SAP Business Workplace (not to be confused with the mySAP.com Workplace). However it could equally well be run in MS Outlook (using the Outlook integration from SAPLabs), Lotus Notes (using Lotus Notes Integration from SAP or Lotus) or using the mySAP.com Workplace.

The workflow showcase transaction allows you to start pre-configured workflows to get a feel for the system without the need for customizing or development. The workflow system should already have been pre-customized (transaction SWU3).

Double click on the Start Demo Workflows branch. If you do not have the Tools tree visible in your start screen you can call the demo transaction directly (SWUI_DEMO).

Select the workflow from the list of demonstration workflows. In this exercise the notification of absence workflow will be used. If you are using the system for the first time press the Set up workflows button to assign yourself to the different tasks used in the workflows. An "S" message is displayed at the very bottom of the screen. Read the accompanying description in the right hand window. You will see two buttons that you ca used to start the workflow. Start with details will allow you to attach a note to the workflow as it starts (the first screen). Please, wait until you've read to the end of this page before starting the workflow. In the real world, the workflow will probably not be triggered manually, but by an event taking place within the system. This ensures that the workflow is triggered consistently. However, for test purposes, or for ad hoc workflows, the workflows can be triggered manually.

Please press the Start button to continue with this tutorial. This will start the workflow directly without you typing in any details. Once it has started the form assigned to this workflow is displayed. An "S" message is displayed at the bottom of the screen to show that the workflow has started.

You can now fill in the form. This form was NOT created for production purposes. There are several standard HR SAP workflows (including a self-service web scenario) to take care of this process in practice. This form (and scenario) have been simplified to give you an idea of what the workflow tool can do. The form is displayed immediately because the workflow step had been configured to continue without a break.

Fill out the form but you can be as careless as you like as no data verification is performed. It's just a demo form after all. When you've finished filling in the data, save the form by pressing the save button . The workflow will now continue.

You are now back in the demo showcase. Normally your manager will receive this work item for approval in her Inbox but remember, to simplify matters this demo workflow assumes that you are your own manager. You should navigate to your Inbox by clicking on the Business Workplace button.

Once you have navigated to the Business Workplace view your inbox by clicking on the inbox branch on the left of the screen. Now you will see your work item in the Inbox list at the top right hand side of the screen. You can double click on the work item to execute it or single click on it to see the preview at the bottom of the screen (but wait until the end of this page before doing this!) If you right click on the work item you will see a context menu which shows what else can be done with this work item. Don't be surprised if you see more than one work item in your Inbox. This is caused by other workflows being triggered in the background.

Execute the work item by double clicking on it or by pressing the execute button of work items.

above the list

Normally the workflow is not started manually as we did here. Instead it is started in the background when a particular change occurs. This change will trigger an event which in turn triggers a workflow. Sometimes these events are triggered with BAPIs or code within a transaction, but they can also be triggered using generic change handling mechanisms such as: document changes status changes message control changes in the HR infotypes.

Why use events?


The each event type has a name and is associated with a business object. This allows the consultant setting up the system to locate the most suitable trigger for the workflow. The events and the business objects form a sort of catalogue of the SAP system. By starting the workflows automatically in the background you ensure that the flows are started every time and don't have to rely on the good will of your colleagues working in the system.

Why were several work items created when we started the flow once?
In the example for this tutorial, the form was created from within the workflow. This is easy to follow but not usually the way things are done in the real world. Normally when an object is created, in this case the absence request, an event is triggered when the data is inserted into the database and this triggers the workflow. This is also true in the case of the absence request form. When this is written to the database (from within our workflow), an event is triggered (formabsenc created). Now if someone else has been playing in this system they may well have hung another workflow on this event. If this is the case, this workflow will be triggered every time we complete step one of our workflow. This may sound horribly complicated, but luckily it does not happen in the real world. In a real installation you have one implementation team setting up a workflow, rather than lots of separate individuals experimenting with the formabsenc example.

When you execute the work item you will see the following screen. Note the generic object services button at the top left of the screen. You can use this to navigate directly to the notes attached to the workflow or to the log of the workflow.

You may either approve or reject the work item. In this scenario please reject the work item and the press F3 to leave the screen (Return ).

This particular step has been configured in the workflow definition so that the user has to manually confirm that the step is complete. This is typical for decision steps or maintenance steps to give the user time to reconsider or add changes.

If you do not complete the work item it will remain in your Inbox and you can return to it later to complete it or change your mind. When your conscience is clear about rejecting the application, complete the work item so that the workflow continues.

You have executed the work item but it is still visible in your Inbox. Press the refresh button to see the current state and you will see that 'approve' work item has disappeared and been replaced with a new work item.

This new work item would normally appear in the Inbox of the employee making the request, but in this tutorial you are the requester and the approver so you see it immediately. Before you execute this work item we will take a small detour and have a look at the Outbox.

Click on the Outbox branch on the navigation tree on the left of the screen and click on Started Workflows to see the list of workflows that you have started. Do not be surprised if there is more than one, some may have been started in the background.

The Outbox allows you to see how far the workflows that you started have progressed. You may also use it to see the status of any workflow that you were directly involved on or where you forwarded a work item to someone else.

To see other representations of the workflow log press on the log icon (represented by a scroll ).

The main log is the chronological log which shows a brief overview of the steps processed so far. Clicking on a details icon shows exactly what happened in the step. For example who the work item was forwarded to, when it was executed and what attachments were added.

There are several other views as explained in the workflow overview but for the moment we'll content ourselves with the graphical view. Click on the button for the graphical log to see what this looks like.

This is intended for the process administrator. It shows which paths were taken in the workflow.

Enough of the logs. Let's return to the business workplace and continue with the workflow.

Once you have returned to the Business Workplace select the inbox from the navigation tree on the left of the screen. From the Inbox execute the work item "Notification of absence number ??? rejected. What do you want to do." by double clicking on it. In this work item the user requesting the vacation can weigh up whether or not to pester his boss again. This step uses the standard decision task which is very easy to configure in the workflow builder.

Select the option Revise notification of absence and you are automatically presented with the

form where you can make changes. The form is displayed immediately without you having to return to the Inbox because the workflow definition has been configured to do this. It makes sense because this step will always be executed by the applicant who has just decided to revise the form. After you have made your changes the workflow loops back to the approval step again (don't forget to refresh your inbox). At this point you should begin to feel familiar with the workflow. Every time a step in the workflow completes it moves automatically to the next step. This creates a work item in the Inbox of users for whom the task is intended. (In this example it will always be you) Of course, once the work item has been executed ( and confirmed if necessary) it will disappear from your work queue immediately, but you have to refresh the view to see this. If the work item was assigned to several users it will disappear from their inboxes too. Reserving a work item causes the work item to disappear from all work inboxes (once the view is refreshed), other than the person reserving it.

Congratulations, you have reached the end of the tutorial. You may stop if you like and
pat yourself on the back. If you still have a couple of minutes available then you're welcome to continue the workflow, experimenting as you go. Here are some of the things you can try add attachments put the work item in the resubmission queue forward it to someone else create a query for someone else inspect different views of the workflow log approve the request and inspect the status of the workflow

The workflow that you start is WS70000704. You can return to the main tools navigation tree and use the Workflow Builder to look in detail at the definition of this workflow.

Double clicking on the steps in the zoomed view of the workflow will show you some of the settings that we talked about in this tutorial. Don't be mislead into believing that the definition looks complicated. We have other tutorials in the online documentation and SAPNet that relate to building workflows and you've already proved to yourself that you're capable of administrating and running a real live workflow.

Congratulations!

You might also like