tasks in workflows

Upload: arpan-sengupta

Post on 03-Apr-2018

222 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/29/2019 Tasks in Workflows

    1/13

  • 7/29/2019 Tasks in Workflows

    2/13

    Complete Guide for Tasks in Workflo ws

    Table of Contents

    Task....................................................................................................................................................................3Single Step Task.................................................................................................................................................3Multistep Task.....................................................................................................................................................3Important SAP Transactions Related to Tasks...................................................................................................4Features in a Task..............................................................................................................................................4Basic Data:......................................................................................................................................................4

    Description: .....................................................................................................................................................5Container:........................................................................................................................................................6 Terminating Events:........................................................................................................................................7Default Rules...................................................................................................................................................8SAP Phone......................................................................................................................................................9

    Maintenance of Agent Assignment...................................................................................................................10Appendices .......................................................................................................................................................12References........................................................................................................................................................12 Disclaimer and Liability Notice..........................................................................................................................13

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2008 SAP AG 2

  • 7/29/2019 Tasks in Workflows

    3/13

    Complete Guide for Tasks in Workflo ws

    Task

    Task is used to define an activity that can be executed within a workflow definition or independently (as asingle step). This activity can be an SAP System transaction. In case we have to create new tasks it iscreated as Standard tasks. Customer tasks can only be edited. There will be no functional enhancementsfor customer tasks.

    Single Step Task

    A single-step task is for use in workflow definitions. A task can be part of a workflow definition as a step ofthe type activity. In the workflow definition, additional information can also be specified regardingresponsibilities and deadlines.

    Single Step Task

    Standard Task Customer Task

    It is client specific withvalidity period and objecttype is T in organizational

    management.

    It is cross client withunrestricted validity periodand object type as TS inorganizational management.

    Multistep Task

    A multistep task is a formal framework for a workflow definition. When you create a workflow directly in theWorkflow Builder, the multistep task is created by the system. Multistep tasks can be divided into workflowtemplate and workflow tasks. Workflow tasks are defined on a screen without tab pages. But the activitiesto be carried out are the same.

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2008 SAP AG 3

  • 7/29/2019 Tasks in Workflows

    4/13

    Complete Guide for Tasks in Workflo ws

    Important SAP Transactions Related to Tasks

    PFTC_CHG Change tasks

    PFTC_COP Copy tasks

    PFTC_DEL Delete tasks

    PFTC_DIS Display tasks

    PFTC_INS Create tasks

    PFTC Tasks (Change/Display/Create/Copy/Delete)

    Features in a Task

    Basic Data:

    Basic data is used to identify a task. It includes three main functions namely: Editing names and Work ItemText, Maintenance of Reference to a Method, Maintenance of Execution Properties. A work item that

    represents a task is displayed with the work item text in the Business Workplace, in the work item selectionhit list and in the workflow log. If we do not specify a work item text, the name is used instead.

    The expression is replaced at execution time with the current values from the relevant container. Thecontainer elements used in the work item text must be filled using a binding. We define the activity to beexecuted with a task by specifying an object type method. We determine the reference to the method on thetab page Basic Data by specifying object type and method. The object type must be activated and definedwith the method in the Business Object Builder. If method parameters are defined for the object method, thesystem gives us the option of creating relevant container elements automatically in the task container. Thenames of these container elements are then identical in the task container and the method container. Each

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2008 SAP AG 4

    http://help.sap.com/saphelp_nw04/helpdata/en/c5/e4b51b453d11d189430000e829fbbd/content.htmhttp://help.sap.com/saphelp_nw04/helpdata/en/c5/e4b54f453d11d189430000e829fbbd/content.htmhttp://help.sap.com/saphelp_nw04/helpdata/en/c5/e4b54f453d11d189430000e829fbbd/content.htmhttp://help.sap.com/saphelp_nw04/helpdata/en/c5/e4b51b453d11d189430000e829fbbd/content.htm
  • 7/29/2019 Tasks in Workflows

    5/13

    Complete Guide for Tasks in Workflo ws

    task is identified by the object identifier T(for customer task) or TS(for standard task) and an 8-digit tasknumberallocated automatically by the system during creation. We can make the settings required for thenumber assignment in Automatic Workflow Customizing. As cross-client transport objects (transport objectPDTS), standard tasks are always connected to the transport system.

    Customer tasks are only connected to the transport system (transport object PDT) in a particular client ifAutomatic recording of changes is set for this client in table T000. The Confirm end of processingpropertycan be assigned both to task that do have terminating events and to those that do not. If there areterminating events, the relevant work item must be completed using the function Set to Donein theBusiness Workplace, If this indicator is set, the end of processing of the task must be confirmed explicitly atruntime. After execution of a task, a dialog box is displayed in which you enter whether the processing of thetask has actually been completed. For example, you can still enter an attachment before you complete thework item. As long as this confirmation has not taken place, the relevant work item appears in the BusinessWorkplace of the actual agent and has the status Executed.

    This can execute the work item again or forward it. This may be useful if a task is to be processed severaltimes and by different people. For Background Processingthis indicator is set if the object method doesnot necessitate dialog with a user, and the processing is to be started automatically by the system. If thisindicator is set, the task is executed at runtime as a background work item as soon as it is its turn in thesequence. No work item appears in the Business Workplace. We can, however, find a background work itemvia the work item selection. If this indicator is not set, a dialog work item appears in the Business Workplacesof the recipients. If this work item is executed by one of its recipients, the object method is executed in thebackground without any further dialog. We cannot set this indicator if the indicator Object method with dialog

    is set for this object method.

    Description:

    The Task descriptioncan be written here,we can also have thenotification texts here.

    We can describe the task or make notes and recommendations for processing. The task description isdisplayed in the work item display. Notification Texts like Requested End Text, Latest Start Text and LatestEnd Text can also be maintained here.

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2008 SAP AG 5

  • 7/29/2019 Tasks in Workflows

    6/13

    Complete Guide for Tasks in Workflo ws

    Container:

    This function is used to process the container elements of the task container. Each task container alreadycontains the workflow system elements and any additional elements for the method parameters of thereferenced object method. We have to add additional elements to the task container; in case additionalvalues are required for variable replacement in the work item text or in the task description or in the othertexts, additional information can be used to resolve a default rule. Values are assigned to the task container

    at runtime in the following ways by initial value assignmentor by using binding from the workflow, event, ormethod container.

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2008 SAP AG 6

    http://help.sap.com/saphelp_nw04/helpdata/en/c5/e4b4e7453d11d189430000e829fbbd/content.htmhttp://help.sap.com/saphelp_nw04/helpdata/en/a6/9bac935f2c11d194a40000e82dec10/content.htmhttp://help.sap.com/saphelp_nw04/helpdata/en/a6/9bac935f2c11d194a40000e82dec10/content.htmhttp://help.sap.com/saphelp_nw04/helpdata/en/a6/9bac935f2c11d194a40000e82dec10/content.htmhttp://help.sap.com/saphelp_nw04/helpdata/en/a6/9bac935f2c11d194a40000e82dec10/content.htmhttp://help.sap.com/saphelp_nw04/helpdata/en/c5/e4b4e7453d11d189430000e829fbbd/content.htm
  • 7/29/2019 Tasks in Workflows

    7/13

    Complete Guide for Tasks in Workflo ws

    Terminating Events:

    Binding generated

    for TerminatingEvents

    This function is used to define the terminating events (Event whose occurrence completes a task) of the task.Synchronous object method and asynchronous object method canbe defined with terminating events. Theterminating events of a task express the possible end statuses of the task. A terminating event always refersto one object for which the event must be triggered. We define the object for which the event must betriggered in a container element in the task container.

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2008 SAP AG 7

  • 7/29/2019 Tasks in Workflows

    8/13

    Complete Guide for Tasks in Workflo ws

    Default Rules

    Rules to define theresponsible agents of atask and the recipientsof notifications.

    We use rules to define the responsible agents of a task and the recipients of notifications. The responsibleagents and recipients of notifications, we can specify a rule for each recipient type, depending on the use ofthe task. We must define the binding from the task container to the rule container for each rule. Task isstarted in dialog or via an event or Task is started from a workflow. For task in dialog or via an event thesystem resolves the rule for the recipient type agent at runtime, and determines the responsible agents of thetask. All responsible agents who are also possible agents become recipients of the relevant work item. Fortask started from workflow rules entered are only resolved if nothing is specified in the step definition.

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2008 SAP AG 8

  • 7/29/2019 Tasks in Workflows

    9/13

    Complete Guide for Tasks in Workflo ws

    SAP Phone

    SAP Phone propertydetermines the possibleuse of a task in the SAPPhone environment.

    The SAPphone property determines the possible use of a task in the SAPphone environment. SAPphoneintegrates telephony functions into the SAP System. SAP applications use this to integrate the telephone intothe work process. SAPphone provides the Basis technology requires processing outgoing and incomingtelephone calls is supported by data from the SAP System environment, (for example, telephone number,name). An incoming call starts a search for caller data. The result of the search is displayed automatically inan information window.

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2008 SAP AG 9

  • 7/29/2019 Tasks in Workflows

    10/13

    Complete Guide for Tasks in Workflo ws

    Maintenance of Agent Assignment

    The agent assignment is one of the important features in TASK. This function assigns possible agents to atask.

    Path: Additional Data -->Agent Assignment MaintainNo possible agents are assigned initially to an SAP task or an SAP workflow. We can perform thisassignment in Customizing. We can change and extend these assignments at a later date as well.

    The system establishes the recipients of a work item at runtime. The recipients are derived from theintersection of possible agents and responsible agents barring excluded agents. If this intersection is empty,no users receive the work item. In Workflow Runtime Administration a function is available to determine suchwork items. We specify the responsible agents for a step in the step definition. We can specify not only a

    system user, but also a role or an object of Organizational Management such as a position, a J ob, anorganizational unit or a work center. Alternatively, we can define a container element that contains the objectof Organizational Management at runtime or a rule for dynamic agent determination.

    We can define agents excluded from processing within the step definition. The user who actually executesthe work item at runtime is the actual agent. The possible agents for a task must be maintained so that therecipients can be established at runtime.

    To process the basic properties of a task, chooseAddi tional dataClassificationChange in taskmaintenance.

    To assign a task we have defined to its possible agents or process its basic properties, chooseAdditionaldataAgent assignmentMaintain and select the task.SelectAttr ibutesto define the basic properties of the task.

    ChooseAgent assignment

    Createto assign the possible agents.We can process the possible agents of the task and workflow (multistep task) from the Workflow Builder aswell. A default rule when defining a task can be used so that the agents are established dynamically whenthis task is executed. This default rule is evaluated if the task is executed alone. The default rule takes on thefunction of the responsible agents in this case. The possible agents of a task are all of the users who areorganizationally responsible and authorized to execute the task at runtime. Only they can receive a work itemfor this task in their Business Workplaces. Starting the task in dialog outside a workflow is included inexecution. We must assign possible agents to a task that requires a dialog for the task to be executed atruntime. We can create several assignments for a task and also use various types of agent doing so.We do

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2008 SAP AG 10

  • 7/29/2019 Tasks in Workflows

    11/13

    Complete Guide for Tasks in Workflo ws

    not have to assign possible agents to tasks designated as background tasks. You must assign possibleagents to those background tasks that are also to be started as single steps in dialog.

    Agent Assignment in Workflow Task (Multistep Task)

    The possible agents of a workflow are those users who are authorized to start the workflow manually. Youcan perform the assignment of possible agents in the basic data of a workflow definition or in the relevantmultistep task.

    We only have to assign possible agents to a workflow if the workflow is to be started directly by users. If the

    workflow is only to be started by events, do not assign any possible agents to the workflow.

    Agent Assignment in Task Groups

    We define Task Groups if you want to collect and group tasks (only Standard Tasks) and workflows (onlyWorkflow Template), that are connected as far as logic or content is concerned. We can also collect othertask groups within a task group, hence making hierarchies of task groups. Task groups are not restrictedwithin applications. We can collect tasks and workflows from within one application component as well astasks and workflows from various application components. A task or workflow can be used in several taskgroups. We can use task groups to delimit the search range when calling the Business Workflow Explorer.The application component is also available as a collective evaluation criterion for tasks and workflows. Eachtask and workflow is assigned to an application component automatically using its package. If we assignpossible agents to a task group, this assignment in passed on to all tasks, workflows and task groupscontained in the task group.

    If we define a task as a general task, all users can execute the task. This is useful if the task is used in aworkflow and we only want to define the recipients in the step definition. A recipient can forward associatework items to all users. Work items whose tasks are defined as general tasks and for which no responsibleagents or default rules are defined are offered to all users of the SAP System for execution in their BusinessWorkplaces.

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2008 SAP AG 11

  • 7/29/2019 Tasks in Workflows

    12/13

    Complete Guide for Tasks in Workflo ws

    Appendices

    Standard Task A single-step task for use in workflow definitions with Object type TS inOrganizational Management, cross client and unrestricted validityperiod

    Customer Task A single-step task with Object type T in organizational managementClient specific With validity period

    Workflow Template A multistep task with organizational object type WS which isCross client with Unrestricted validity period and any planversion

    Workflow Task Multistep task created by a customer to meet their specific requirements.A workflow task contains a workflow definition.

    The following apply to workflow tasks:

    Organizational object type WFClient specificValidity periodPlan version specific

    Workflow tasks will not be supported in the future. New workflows shouldbe given the type "workflow template."

    Task Group Collection of standard tasks, workflow templates, and other task groupsthat are used in a common context.

    References

    SAP Business Workflows

    Business Workflows

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2008 SAP AG 12

    http://help.sap.com/saphelp_nw04/helpdata/en/92/bc26a6ec2b11d2b4b5006094b9ea0d/frameset.htmhttp://help.sap.com/saphelp_nw04/helpdata/en/92/bc26a6ec2b11d2b4b5006094b9ea0d/frameset.htmhttp://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCBMTWFMSTART/BCBMTWFMSTART.pdfhttp://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCBMTWFMSTART/BCBMTWFMSTART.pdfhttp://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCBMTWFMSTART/BCBMTWFMSTART.pdfhttp://help.sap.com/saphelp_nw04/helpdata/en/92/bc26a6ec2b11d2b4b5006094b9ea0d/frameset.htm
  • 7/29/2019 Tasks in Workflows

    13/13

    Complete Guide for Tasks in Workflo ws

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    Disclaimer and L iability Notice

    This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is notsupported by SAP. Changes made based on this information are not supported and can be overwritten during an upgrade.

    SAP will not be held liable for any damages caused by using or misusing the information, code or methods suggested in this document,and anyone using these methods does so at his/her own risk.

    SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article orcode sample, including any liability resulting from incompatibility between the content within this document and the materials andservices offered by SAP . You agree that you will not hold, or seek to hold, SAP responsible or liable with respect to the content of thisdocument.