Home     |      About this site      |     Feedback   |    Search    |
FAQ Workflow Techniques
(See also Frequently Asked Questions about SAP's WebFlow Engine)

Mailing
What differences are there between a work item and a notification mail?
What is the difference between sending a mail to a recipient list compared to sending individual mails via a dynamic loop?
How do I send a standard text as an e-mail from workflow?
How do I send a complex text from the workflow?
How do I send really complex mails from the workflow?
How do I send reports?
How do I trigger a workflow with an e-mail
Deadline Handling
How can I configure the workflow so that different types of messages are sent out to different people depending on how late the processing is?
How can I configure the workflow so that when the deadline is missed the workflow step is simply skipped?

Authorizations

How can I make sure that user's access their tasks via the workflow and not via the menu?

Mailing
 What differences are there between a work item and a notification mail?
a) The work item cannot be used to notify several users.
Mails can be routed to several users, just like work items. When a mail is sent, and one recipient reads and deletes the mail, all other recipients will still have access to their own copy in their own inbox. However, when a work item is processed by one of the recipients it will automatically disappear from all the other inboxes.  So you can see that a work item is unsuitable for notifying several users.
It is also worth noting that a mail can be forwarded in many different ways (fax, internet...) whereas the work item cannot.

b) The work item holds up the workflow
When the workflow sends a mail (usually as a background step) it continues with the process immediately after transmitting the mail. When a work item is generated, the workflow will not continue until the work item has been processed. This slows down the process. Occasionally this is what is intended (using the work item as an approval step without the ability to reject) but usually you will better off using mails for notifications.

Note: You can send business objects as references with the mail either as a business object reference attached to the mail or as an URL (ABAP required).
top
 What is the difference between sending a mail to a recipient list compared to sending individual mails via a dynamic loop?
Performance. Sending 1 mail to 20 recipients will cost considerably less performance than sending 20 individual mails. If the mail is sent as a SAP Office mail (as opposed to e-mail, fax...) disk space will also be a factor because the SAP office mail will only exist once in the database, with references being created for each of the recipients.

The only time you need to consider individual mails with a dynamic loop is when the text of the mail varies from one recipient to another.
top
 How do I send a standard text as an e-mail from workflow?
It is very easy sending standard text , which may include data from the workflow. You simply create a background step which sends the work item description. This may include variables which will be substituted when mail is sent.
In early releases you have to create your own task based on the method SELFITEM SendTaskDescription. In later releases a wizard is available for creating the step and in release 4.6 there is even a step type which does this all for you automatically.
Whichever path you take, there is very good online documentation describing exactly what has to be done.
top
 How do I send a complex text from the workflow?
You may create mails using SAPscript. These mails can include conditions which are evaluated in order to determine which text blocks which are used in the mail. Workflow variables can be used in these conditions and workflow variables can be substituted into the body of the e-mail text.
top
 How do I send really complex mails from the workflow?
If you this is not enough for you will probably want to write your own ABAP routines for generating the text and generating the attachments to go with the text.
Use the function group SO01 which contains functions of the form SO_*_API1 which are ideal for creating your own sophisticated messages. There are plenty of advantages of how these are used within the SAP system.
top
 How do I send reports?
There are wizards (Release 3.1) which will create workflows for you to send reports to a distribution list. You can specify whether the results should be transmitted or evaluated at the time the recipient wishes to view the report. It is usually better to send the evaluation because this allows the recipient to see the results instantaneously, without having to wait for the report to execute first.
top

Deadlines
 How can I configure the workflow so that different types of messages are sent out to different people depending on how late the processing is?
Follow these steps:

1. Specify a deadline period for the step.
2. Specify a name for the event. This adds new branch from the step. More...
3. Add a new step to the branch which sends a mail message.
4. Add another step to the branch which sends out the second deadline warning (see mail steps above). Use deadlines in this step to configure an earliest start so that the second message is not sent until a further time has elapsed.
5. Repeat step 5 as often as you like.
top
 How can I configure the workflow so that when the deadline is missed the workflow step is simply skipped?
This is tricky to explain but easy to implement once you know how.
Follow these steps (in later releases there is a wizard which takes you through the steps):
1. In the terminating events view of the workflow step activate the  "obsolete" event and give it a name. More...
2. Specify a deadline period for the step.
3. Specify a name for the event. This adds new branch from the step. More...
4. Add a new step to the deadline path. This step must be of type "process control".
5. Select the control "Make step obsolete" and use the search help to specify the workflow step that has the deadline. Only steps with obsolete paths defined will be displayed (see step 1).
top
 How do I trigger a workflow with an e-mail?
You can customize the system to call a BOR method when an external mail (fax, e-mail...) arrives in the system. You BOR method should either trigger the e-meil directly or trigger an event. To customize this user exit use the transaction SCOT.

top

 How can I make sure that user's access their tasks via the workflow and not via the menu or launch pad?
The routing mechanism for work items uses roles and organizational assignments to determine who receives which work item. However the routing does not provide extra authorization checks based on the routing configuration. If you want to ensure that the  tasks are executed within the workflow, and not via the standard transaction, service or MiniApp, then you will have to apply your own protection.
The simplest way of doing this is to remove the standard transaction from the user's menu or Workplace role (but include it in the supervisor's role, just in case).

If you want to allow the user to execute the task from the menu if and only if they have received the work item then you should replace the standard transaction with your own custom built transaction. Your own transaction simply calls the standard transaction but performs it's own authorization check first, based on the routing mechanism used in the workflow. Tip: Add a second (ored) authorization check to make sure that a supervisor can execute the transaction in an emergency.

top
Content last changed: 13. Feb 2001






Next page please

www.workflowing.com

 |   Home     |      About this site      |     Feedback   |    Search    |