Sei sulla pagina 1di 13

Deadline Monitoring in SAP Workflow (Working with Latest end)

By Suresh Kumar Parvathaneni A major advantage of workflow is the ability to monitor the workflow steps according to a predefined schedule. Following are different deadlines that can be monitored against each workflow step:

Requested Start Latest Start Requested End Latest End

In this example, we will define a deadline to the User Decision example created earlier (click here). Following is the screenshot of the application developed using the User Decision example:

We would extend this example to the deadline monitoring. In the User Decision step, click on the latest end tab.

By default, No deadline monitoring is active (as seen in the above screenshot). Choose the Work Item Creation from the list box.

After selecting Work Item Creation, chose an offset of 5 minutes. This means that the work item must be executed within 5 minutes of the creation, if not this would trigger.

Enter recipient details to whom the message to be escalated, if the work item is not executed with in 5 minutes after work item creation.

Save and activate the workflow definition. Testing the workflow application: Execute your workflow. Check for the work item in the SAP Inbox. This time do NOT execute the work item. Wait for the deadline to be triggered. After that, a deadline message is delivered to the recipient mentioned in the Latest End tab. See the screenshot below.

Dont worry if the deadline message doesnt appear immediately after 5 minutes. This depends on various factors including how the deadline monitoring program is scheduled and also on the availability of the background processors. Use SWWA to check how the deadline monitoring program is scheduled in program.

For example, assume that our work item has been created at 09:10 hrs and the deadline message is expected to trigger at 09:15 hrs. From the above screenshot, it is understood that the background program is scheduled to execute for every 3 minutes. Assume that the last run of the program is at 09:14hrs and the next run is expected at 09:17hrs. So even our deadline expires at 09:15, the deadline message would appear only at 09:17hrs after execution of the background program. Some more points In our above example, we have used the deadline on the Work Item creation time. i.e., 5 minutes after creation time, the deadline message would be sent. Now we would check the o ther option Expression. Here we can mention the date and time, when the deadline message should appear irrespective of the work item creation date/time.

As seen in the above screenshot, we can provide the target date and time by which the task should be finished. Container elements could be used in this case. Please refer to our example on creation of container elements (click here).

Creating a Container element


By Suresh Kumar Parvathaneni This document details about creation of a container element in workflow and using it in the step "Mail". Pre-requisites: It is assumed that the reader of this Tutorial is aware of creating a workflow definition with the step Mail. If not, please go through the document on creating the same available, by clicking here. Steps: 1. Create a workflow definition using the transaction SWDD.

2. Lets create a container element for Carrier id. Click on the Workflow Container on the left side of the screen (as shown in the screenshot below):

3. Now double-click on Double-Click to Create

4. Enter the details pertaining to CARRID here.

5. Click on tab Properties and select Import.

6. Click on Confirm (Enter). 7. Now the element created could be seen on the left side, below the Workflow Container.

1.

Create a Mail step by double-clicking on Undefined step in the workflow.

2. 3.

Enter the recipient details in the Recipients box. In the subject line, enter Carrid value entered is: and click on Insert Expression.

4.

Select the element Carrid from the list.

5.

Similarly enter the content in the Body area.

6.

Save and activate the application.

Testing the Workflow application: 7. Test the workflow by clicking F8.

8. 9.

Enter the value of the Carrid as shown above and press execute. A mail would be sent to the recipient mentioned earlier with the carrid value entered.

Deadline Monitoring in SAP Workflow (Working with Requested Start)


By Ravi Aswani In this tutorial, we would look into implementation of Requested Start in the step User Decision. This is common for the step Activity and others as well. Go to transaction SWDD and create a step User Decision. Click on the tab Requested Start.

For demo purpose, we would be choosing the Requested Start as 2 minutes from the work item creation. Choose the Work Item Creation from the list box.

Choose an offset of 2 minutes. This means that the work item shall be created after 2 minutes. Save and activate the workflow definition. Execute the workflow definition. In SAP inbox, you can observe that the work item is not yet delivered. Following is the status of the workflow instance. You can observe that the work item is in the status Waiting.

The status of the work item would convert to Ready after 2 minutes (as per the time mentioned in the Requested Start).

Potrebbero piacerti anche