07 b 01workflowdefinition


Published on

Published in: Business, Technology
  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide
  • Hint: Before you analyze your business process or future workflow, search through the SAP R/3 documentation first. Try to implement one of the provided SAP workflows before you start with your own design
  • Note: As of release 4.5A, only client-independent tasks (standard tasks) and workflows (workflow templates) should be created. Client-dependent tasks (customer tasks) and workflows (workflow tasks) are not longer supported.
  • Workflow definition: description and implementation of workflow processes. Workflow Builder to create and edit workflow definition including: Steps Triggering Events The data interface of a workflow is specified by the workflow container .
  • The steps and events are displayed graphically in a network. Each workflow definition has responsible user(s) assigned for administration.
  • A workflow definition is made up of individual steps in a modular fashion. When creating a step in a workflow definition, the step type must be specified first. There are: steps which refer to business activities: activity, user decision, document from template steps which are used for internal process control and monitoring: condition, multiple condition, loop, fork, container operation, event creator, wait for event The steps can be arranged in series or in parallel processing. Each step is the determining element of “its” block. Operations on individual steps always concern the whole block in which this step is located. The processing sequence of the steps depends on the result of the respective preceding step. The relevant successors for all possible results of a step are established in the workflow definition. The possible results of a step are usually derived from the underlying business functionality and are available for workflow definition.
  • The standard view makes it possible to improve the clarity of a workflow definition considerably. With very large workflow definitions, however, this is not enough. An objects area has therefore been added, which displays all steps with node numbers (for diagnosis purposes) and step descriptions. The step definition of a marked step is opened by double-clicking. The graphic can be positioned on the chosen step using the context menu (right-hand mouse button). The same icons are used in the objects area as in the graphic. The objects area is also used to manage the workflow container. Using the context menu, it is possible to create, change, display, delete, rename container elements, and so on. It is possible to change the workflow container elements from the Workflow Builder (input/output properties). It is possible to declare local elements of the workflow container to be interface elements of the workflow. Note, however, that the changes to the interface are visible in all workflow versions. With the help of the tasks area, it is possible to display all tasks and other workflows relevant for your workflow, and transfer them into your workflow definition by double-clicking.
  • The workflow builder is the tool to create workflow definitions. We call the workflow builder via transaction SWDD directly (you can also double-click this entry within SAP Easy Access) (1). First of all we add all necessary tasks for the notification of absence to the ‚available task‘ –part of the screen. Click right on the entry ‚workflows last processed‘ and (2) select ‚Choose another search area‘ (3). A popup appears. Switch to ‚Task Groups‘ and press ‚F4‘. Enter ‚SWD*‘ in the value help popup and hit return. Double-click task group ‚SWD_AF_TG‘ (TG70000023) – the task group is being added to the search area (4). If you close the window to setup the search area, the available tasks will show the content of the recently added task group.
  • Key improvements of the workflow builder builder can be called directly without passing over multistep-tasks better layout and new icons new interaction-model: no context-switches, rarely popups, navigation is always possible where used lists for tasks, container-elements, document-templates detailed checks integrated runtime-tools
  • Now you can use the available tasks as toolbox for our little workflow-project. To integrate a step within the empty workflow, you have to click on the step (1) ‚Undefined – Double-click to create new node‘ and to double-click a task (2) out of the available-task-area. The system integrates the step in the workflow-definition - see dotted circle (3). Advanced : No container-elements and bindings have to be created - the system creates them automatically.
  • As second step we use ‚Approve notification‘ of absence. Make sure that the undefined step as marked (1) and double-click the task for approval (2). See result in the dotted circle.This approval step has three possible results ‘New’ (we don’t need this – you can position on the line and press the button delete), ‘Approved’ and ‘Rejected’.
  • Then we mark the line ‘approved’ (see picture) (1) and choose ‘Wizards->Include ”Send mail”’ (menu) (2). Now the system needs to store the workflow definition and asks for its name. Enter name and description (3). Now the system stores the it and the definition will appear in the recently used list called ‘workflows last processed’.
  • Follow now the wizard's instructions. I.e. enter the mail text and specify the recipient – we’d like to send the mail to the workflow-initiator – so we leave the default there. We left out some wizard screens - the sequence follows here: welcome screen enter text which shall be sent: use variables as well select receiver: the default is perfect: send it to the workflow initiator enter a name for the task which will send the email (for reuse purposes) last screen: press finish to create task and integrate it into the workflow definition
  • In the dotted circle you find the step which is responsible to send the notification email What happened so far: we can create and approve a notification of absence and send an email if the manager decided to approve... What now? If the managers rejects the request, the employee has to be asked if he likes to revise or to withdraw his request. And here we go: Mark now the rejected line (1) and click the ‘create’ button (2). A popup (3) appears with all available step and operator types: we choose user decision . Now the graphic disappears and is being replaced by the detail screen for the user decision (4). Fill in a least the two possibilities (try again and withdraw) leave the screen with button back (green arrow to the left)
  • Mark now the undefined step after the ‘withdraw’-line (1) and double-click the task ‘delete notification of absence’ in the available tasks area (2). The step is being integrated in the workflow definition (3). The dotted circle shows what has been inserted
  • Mark now the undefined step after the ‘revise’-line (1) and double click the task ‘revise notification of absence’ in the available tasks area (2). The step is being integrated in the workflow definition (3). The dotted circle shows what has been inserted
  • To make sure that the employee can revise his notification of absence (in case his manager rejected it), we need to create a loop that allows to do the approval again (and again...if necessary). First of all, we need a variable to which allows the loop to decide whether it’s finished or not. Double-click in the navigation tree the entry workflow container (1) and enter the following data (2): Field ‘element’: Flag Field ‘name’: Flag Field ‘Reference table’: SYST Field ‘Reference field’: INPUT single click then the icon ‘until (loop)’ in the toolbox - the cursor jumps into the definition area. Single click then the node ‘Approve notification of absence’ to insert the loop (4) Fill in the(5) text (see picture) and double click the condition preview or click button ‘condition’
  • The condition editor appears. We want to make sure that the loop is being left when our indicator (called Flag) contains value ‘X’. Double click now the entry ‘Flag’ (1) to build the first part of the condition. Single click ‘=‘ in the operator-toolbox (2) to set the operator. Enter ‘X’ into field constant and press return (3). The condition is consistent now, leave the condition editor and leave the detail view of the loop to be back on the graphic again
  • What happened so far? We created a loop without content. We’d like to repeat the approval as often as we need to. So we cut the whole part with the approval and paste it into the loop. Click step ‘Approve notification of absence’ and click right mouse button and select function ‘Cut block’ (1). The whole approval block disappears and is being taken into the clipboard. Click then the undefined step within the loop (2) and choose function paste from the menu (3). The approval sequence is being inserted into the loop.
  • Fine - we created the approval sequence and a loop around. Now we have to care for to terminate the loop when the manager has approved the notification or the employee decides to withdraw his notification of absence. Single click the icon ‘container operation’ (ToolTips available) in the toolbox (1) and single click the step which send the email to drop the container operation (cares to set the ‘X’ into the flag to terminate the loop) on the ‘SendMail’ step (2). Fill out the detail view of the container operation with the following values (3): Field ‘Result element’: Flag Field ‘Expression’: X This will move the value ‘X’ to the variable ‘Flag’. Leave the detail view and return to the graphic.
  • Now copy this container operation from the ‘send mail’- to the ‘delete notification of absence’-step. Follow the instructions: click right mouse button on the container operation we just created and choose ‘copy block’ (1) mark then step ‘delete notification of absence’ and choose function ‘paste’ from the (2) menu. The container operation is being duplicated and cares to terminate the loop if the employee withdraws his notification of absence The work is done (3): the process is complete.
  • We created a workflow definition, but: only the structure: which action is followed by what, but did not assign any agent. This can be done very easily at the end of the creation of our workflow definition. At this time we know exactly which step has to be assigned which agent.
  • To assign the agents, we use the navigation tree and double-click first the step ‘Create notification of absence’ (1) - the detail view appears (2). Choose the workflow initiator out of the listbox and navigate further. Double click next the step ‘approve notification of absence’ (3) and the systems takes you to the detail screen. Assign there ‘Superior of workflow initiator’ and navigate again. Use then the page before to assign the agents correctly.
  • This created process behaves exactly like the already demonstrated workflow definition we know from the first tour of this session. It can be saved, syntax checked and - of course - it can be executed.
  • To allow a user to start a workflow directly from an area menu, you previously had to use a general start transaction (SWUS). This usually has an unsuitable user interface, and should be considered a test tool. Important note about incompatible change. Transaction SWUS is no longer available as a general transaction for starting workflows directly as of Release 4.5. Transaction SWUS has been assigned a special authorization and is no longer available for business users. Everyone who has authorization for this transaction can execute all workflows, even if they are not actually authorized to do so via the organization model. Therefore, only workflow modelers and workflow administrators should have the authorization. As you create a start transaction for a workflow definition, a screen is displayed that reflects all the input parameters of the workflow and can be adapted as required. This enables you to ‘tailor' this screen for the user group. Note that this option is only available for workflow templates. Workflow tasks are gradually being superseded by workflow templates.
  • If you want to start or execute a task via a Web form from the Internet, you need a start transaction. The Web form is derived from this transaction. To enable the system to create a unique name for the task related transactions, you must maintain a namespace template and a development class. Customizing activities: Maintain a two-character namespace template. Specify the development class, to which the task, the generated transaction and all the programs required are assigned. When generating start transactions, the system creates the following from this information: The transaction code prefix Y<namespace_template> that all start transactions will receive. The module pool prefix SAPMY< namespace_template > under which the programs and screens of a start transaction are stored. Note This Customizing is used both for the start transactions and the Web forms.
  • The screen created by the system can easily be changed with the graphical screen painter, if you adhere to the following rules: Do not delete fields that are not to be displayed and given values. Instead, set to: ‘ Only output' and ‘ Invisible'. The flow logic of the screen therefore does not have to be changed. Note however, that mandatory input parameters cannot be ‘hidden' in this manner.
  • 07 b 01workflowdefinition

    1. 2. Workflow Definition <ul><li>Contents: </li></ul><ul><li>Overview of workflow definition </li></ul><ul><li>Workflow Builder components </li></ul>
    2. 3. Workflow Definition: Unit Objectives <ul><li>At the conclusion of this section, you will be able to: </li></ul><ul><li>Define components of a workflow definition </li></ul><ul><li>Identify steps in a workflow </li></ul><ul><li>Use the functions of the Workflow Builder </li></ul>
    3. 4. Workflow Definition: Business Scenario <ul><li>You laid out the design of your business process on a whiteboard </li></ul><ul><li>You need to learn about the Workflow Builder </li></ul><ul><li>This will allow you to translate your business process into a workflow definition </li></ul>
    4. 5. Workflows: Examples <ul><li>Circulation list which has to be processed, signed off and checked </li></ul><ul><li>Checking the master data after changes </li></ul><ul><li>Business processes which cross application boundaries </li></ul><ul><ul><li>From a change request all the way to a production order </li></ul></ul><ul><ul><li>Budget management from request through release of funds </li></ul></ul><ul><ul><li>Recruitment from placing the advertisement through the integration of the new employee in the organization </li></ul></ul>
    5. 6. Workflow Template / SAP workflow Workflow template (WS) <ul><li>customer-defined </li></ul><ul><li>reference to the workflow definition </li></ul><ul><li>client-independent </li></ul>SAP workflow (WS) <ul><li>executable </li></ul><ul><li>reference to the workflow definition </li></ul><ul><li>client-independent </li></ul><ul><li>may not be edited </li></ul><ul><li>can be extended </li></ul><ul><li>can be used as template for own workflows </li></ul>
    6. 7. Workflow Definition Workflow definition Workflow (workflow template) <ul><li>Reference to workflow definition </li></ul><ul><li>Specification of triggering events </li></ul><ul><li>Initial value assignment </li></ul>
    7. 8. Workflow Definition: Workflow Builder <ul><li>Workflow Builder: </li></ul><ul><li>Navigation and display area </li></ul><ul><li>Block-oriented modeling </li></ul><ul><li>Top-down modeling is possible </li></ul><ul><li>Special functions such as cut, paste, move, copy </li></ul><ul><li>Print </li></ul><ul><li>Checking and activating </li></ul><ul><li>Drag and Drop functionality </li></ul>Event Step Block Workflow Definition
    8. 9. Workflow Definition: Steps <ul><li>Display step </li></ul><ul><li>Arrangement of steps in sequence or in parallel processing </li></ul><ul><li>Deadline monitoring for certain steps </li></ul><ul><li>Choose and name relevant successors for each step </li></ul><ul><li>Block mode operations </li></ul>Internal process control Condition Multiple condition Event creator Wait for event Container operation Loop (UNTIL) Loop (WHILE) Fork Business activity Activity (task reference) User decision Document from template Step Workflow Definition in Workflow Builder
    9. 10. Workflow Builder: Objects and Task Area <ul><li>Objects area </li></ul><ul><ul><li>Increased clarity with Explorer like presentation of workflow steps and navigation </li></ul></ul><ul><ul><li>Workflow container maintained directly in Workflow Builder </li></ul></ul><ul><ul><li>overview of document templates </li></ul></ul><ul><li>Task area </li></ul><ul><ul><li>Existing, defined tasks are used in the workflow definition: They only have to be found </li></ul></ul><ul><ul><li>The task area offers access to all tasks relevant for the workflow in the definition </li></ul></ul>
    10. 11. Definition Tour - The goal
    11. 12. Definition Tour - Scenario <ul><li>Step 1: Call Workflow Builder </li></ul><ul><ul><li>Define a new search area for the available tasks </li></ul></ul><ul><li>Step 2: Insert first steps out of the available tasks </li></ul><ul><ul><li>Insert step ‘Create notification of absence’ </li></ul></ul><ul><ul><li>Insert step ‘Approve notification of absence’ </li></ul></ul><ul><li>Step 3: Insert mail notification about approval </li></ul><ul><li>Step 4: Insert step to delete absence request if rejected </li></ul><ul><li>Step 5: Insert loop to do the approval again </li></ul><ul><ul><li>create a loop and do some cut and paste operations </li></ul></ul><ul><ul><li>insert also functions to take care to terminate the loop </li></ul></ul><ul><li>Step 6 (advanced): Insert creation of word document </li></ul><ul><li>Step 7: Assign agents </li></ul>
    12. 13. Step 1: Call Workflow Builder 1 2 4 3 The search area has to be defined once Right mouse click
    13. 14. Step 1: Introduction Toolbox Graphical navigation Navigation and data maintenance Toolbox of available tasks Graphical representation of the workflow definition Message collector with navigation capability
    14. 15. Step 2: Insert step ‘create notification’ 1 2 3 Single click Double click to insert
    15. 16. Step 2: Insert step ‘approve notification’ 1 2 double click to insert
    16. 17. Step 3: Insert step to send mail 1 1 2 3 single click to mark Choose wizard ‘send mail’
    17. 18. Step 3: Wizard to create mail step 1 Write text to be sent (values out of the workflow may be used) Define recipient of mail Roadmap to maintain orientation Additional information Standard navigation
    18. 19. Step 4: Delete or not? Insert decision 1 2 3 4 click button ‘ create’
    19. 20. Step 4: Delete or not? Insert deletion 1 2 3 double click to insert
    20. 21. Step 4: Delete or not? Insert update 1 2 3 double click to insert
    21. 22. Step 5: Insert loop 3 4 5 1 2 double click to edit condition single click to drag single click to drop double click to create flag
    22. 23. Step 5: Define loop - condition 1 2 3 double click to insert Enter ‘X’ as constant and press return single click ‘=‘ to insert
    23. 24. Step 5: Move approval into loop 1 2 3 Right mouse button for context menu click button ‘ paste’
    24. 25. Step 5: Take care to leave the loop 1 2 3 single click to drag single click to drop
    25. 26. Step 5: Take care to leave the loop 1 2 3 click button ‘ paste’ Right mouse button for context menu
    26. 27. Step 6: Assign agents <ul><li>Who is responsible for what? </li></ul><ul><li>Employee </li></ul><ul><ul><li>Create notification of absence </li></ul></ul><ul><ul><li>User decision - revise or withdraw </li></ul></ul><ul><ul><li>Revise notification of absence </li></ul></ul><ul><li>Manager </li></ul><ul><ul><li>Approve Notification of absence </li></ul></ul><ul><ul><li>Create document from template </li></ul></ul><ul><li>Workflow system </li></ul><ul><ul><li>Send email </li></ul></ul><ul><ul><li>Delete notification of absence </li></ul></ul>
    27. 28. Step 6: Assign agents - how? 1 4 2 3 double click to navigate double click to navigate
    28. 29. Finish
    29. 30. Start Transactions: Background and Use <ul><li>Why start transactions? </li></ul><ul><ul><li>Workflows sometimes have to be started and supplied with values directly </li></ul></ul><ul><ul><li>Until now, a generic transaction (SWUS) has been used to start workflows </li></ul></ul><ul><ul><li>This transaction is a test tool only, not a working tool for users </li></ul></ul><ul><li>Who needs start transactions? </li></ul><ul><ul><li>It is possible to put help texts directly on the screens of the start transaction </li></ul></ul><ul><ul><li>Users who start workflows directly (via area menu or R/3 main menu -> Office -> Start workflow) </li></ul></ul><ul><ul><li>Users who want to start workflows via a short cut from their Windows Desktop </li></ul></ul>
    30. 31. Start Transactions: Creation <ul><li>How do you generate start transactions? </li></ul><ul><li>Customizing (one-off activity) </li></ul><ul><ul><li>Determine namespace of transaction codes and module pools in Customizing (transaction SWUT) </li></ul></ul><ul><li>Generation </li></ul><ul><ul><li>In the area menu ‘SAP Business Workflow [Development]’, you will find the menu option ‘Workflow start transactions’ under ‘Definition tools’. </li></ul></ul><ul><ul><li>Specify your workflow template as Task </li></ul></ul><ul><ul><li>Enter ‘100’, for example, as Screen number </li></ul></ul><ul><ul><li>Press the pushbutton ‘Create’ -> the generation now runs automatically </li></ul></ul><ul><li>Personalization </li></ul><ul><ul><li>You then have the opportunity to adapt the start transaction created to your requirements </li></ul></ul>
    31. 32. Start Transactions: Example Name Personnel number Department Cost center Absent from To Reason Contact at Attachment Start Deadline Refresh organizational environment Workflow Edit Goto Environment System Help Input data for task Request leave Manually revised screen You can also put additional help texts here. No programming required Knowledge of operating the graphical screen painter is the only prerequisite.
    32. 33. Workflow Definition: Unit Summary <ul><li>Workflow templates are client-independent </li></ul><ul><li>Workflow definition is the description and implementation of a workflow process </li></ul><ul><li>Workflow definition in step types and their symbols in the Workflow Builder </li></ul>
    33. 34. SAP Workflow Course PwC Consulting TM refers to the management consulting services businesses of the member firms of the worldwide PricewaterhouseCoopers organisation.  2001 PricewaterhouseCoopers. All rights reserved.