This action might not be possible to undo. Are you sure you want to continue?
By Avinav Goel Tata Consultancy Services w.r.t. Peopletools ver. 8.46 PeopleSoft Enterprise Apps. ver. 8.8
• What is a WORKFLOW Many of the day-to-day processes in business are part of larger tasks that involve several steps and several people working together. For example, when you enter an invoice, you are initiating an approval and payment process: someone else reviews and approves it, and a third person submits payment to the vendor. The term workflow refers to this larger process. With respect to ERP (Enterprise Resource Planning), a workflow involves a set of approvers (generally in a hierarchical fashion) having different options (approve/deny/send back/sanction) towards a financial transaction (purchase order/budget sheet) or an HRMS feature (leave/loan). • TARGET AUDIENCE This white paper intends to guide a PeopleSoft Application Developer quickly and simply on how to design and prepare workflows. Further, some enhancements and alternatives are also mentioned to better utilize the power of workflows. The paper would be found useful by a PeopleSoft Functional too to gain insights into the general logic and mapping of workflows.
Arrows show the relationships between the activities. Event and Worklist in the activity and connect these through links as shown in the fig.Design METHOD 1.Chapter 1. Link to connect the Step Event and Worklist Step Worklist Event 3. . Create a Business Process (File > New > Business Process) and insert the created activity into it. below.triggerbusinessevent () based STEPS TO CREATE A SIMPLE WORKFLOW 1. Insert a Step. indicating the proper chronological sequence. Create an Activity in Application Designer (File > New > Activity). ? Business Process A business process is a graphical representation of the relationships between related activities. 2.
STEP Set the name of the Step and its description . Activity Features. 4. i.Multiple Activities can be inserted in a single Business Process 4.
The return value is not optional.MCA_HLO_BP. BusEvent is the name of the Event created in the activity Triggerbusinessevent() function should only be used in Workflow PeopleCode. BusEvent. ii. BusActivity is the name of the Activity 3. EVENT Define the event and go to ‘Edit Business Rules’ and write the following workflow code there. &SUCCESS = TriggerBusinessEvent (BusProcess. false otherwise.Menu name of the target component which the approver will open through worklist Bar Name of the target component Item Name of the target component Set the name of the target page which the approver will open through worklist Set the mode in which approver will open the request 4. .MCA_HLO_FIN_ACT2. BusActivity. Returns a Boolean value: True if successful. where 1. BusProcess is the name of the Business Process created 2."Medical Advance Final Status").
Set the name of the Activity . WORKLIST This is the most important setting that determines the nature of your workflow. Set the Worklist record 2. Set the name of the Business Process of this activity 3.Set the record name from which workflow event is to be triggered 4. iii. Set the name of the Worklist and its description • Setting the Attributes in the Worklist 1.
When a user finishes with a work item. the system marks the row as worked. Retrieve the record that is associated with the work item. When a business event routes a work item to a worklist. so that users can select the item on which they want to work. it adds a row to the table. Set Programmatic when the worklist is to be deleted through coding Set Reassignable when the approver has the authority to reassign to some other approver Set the Timeout Processing Active when the worklist is to be deleted after a specified time ? Worklist Record Worklist record determines which fields of information the system stores for each work item and in what order the work items appear. Set Selected when the worklist is to be deleted as soon as it is selected 4. so that the user can work on it. . Set User Specified when the worklist is to be deleted manually 2. Worklist Record Definitions When you create a worklist record definition. Determine the order of work items in the worklist. The system uses the worklist record definition to: • • • • Link each work item with the underlying workflow tracking information. Set Saved when the worklist is to be deleted while saving the worklist page 3.Options to delete worklist 1. which is stored in a workflow system record (PSWORKLIST). Display relevant information about each work item on the Worklist page. you define what a work item in a worklist looks like.
System Field BUSPROCNAME ACTIVITYNAME EVENTNAME WORKLISTNAME INSTANCEID TRANSACTIONID Description The business process that includes the work item. They must be defined as ascending key fields in the worklist record definition. This field stores the ID assigned to the work item for Virtual Approver processing. you must also add the APPR_INSTANCE field as a non-key field in the worklist record definition. Appropriate values might include the key data for the record in which the . The system sorts the work items in a worklist based on the field immediately following the TRANSACTIONID field. you must include all of the key fields for the search record. The worklist in which the work item is waiting. The business event that triggers the worklist routing. The system-assigned transaction ID for the work item. The system uses these fields to retrieve the associated record from the database when the user selects a worklist entry and moves to the page where the work is done. All of the application fields appear in the user’s worklist. The system uses these fields to link the items in the worklist with their tracking information. If you’re using Virtual Approver. Worklist Display Field WORLKIST_URL Description The text that links to the page where the user can work on the item. The system-assigned ID for the work item. Application Fields The next set of fields in a worklist record definition are those specific to the application that creates the worklist. The activity that triggers the worklist routing. Virtual Approver. It sorts based on all key fields in the record definition. requires one additional system field. Note the following: • • Because the system uses the values from these fields to search for the associated database record. which is stored in the PeopleSoft-defined table PSWORKLIST. but a different instance ID.System Fields The first fields in a worklist record definition must always be the following system fields. then the next field. When an event triggers multiple routings. and so on. • Worklist Display Fields The last two fields in a worklist record definition are for descriptive information that appears in the worklist. each work item has the same transaction ID. unless you suppress them by including the special field WORKLIST_DESCR. The order of the fields is important. a specialized type of workflow used for approval processes.
Add the required system fields to the record definition. The link also appears on the main Worklist page. 4. Create a database table using the record definition that you saved in step 3. Save the record definition using a name that ends with _WL. The worklist record must include the search record key fields so the system can locate the record on which the user must work. WORKLIST_DESCR A text comment that appears in the user’s worklist. 2. Creating Worklist Record Definitions 1. although the key fields are still used to bypass the search page of the target page. The presence of this field automatically suppresses the display of any application fields. the text might be the name of the employee who submitted the report. 3. for a work item directing a manager to approve an expense report. Mapping the fields of the Worklist Record.Worklist Display Field Description item will be worked. Add the key fields from the search record for the page that group users use to process the worklist entries. OPRID should be mapped with the userid of the approver. On the Worklist Details page. Make them key fields so that they’re used to sort the work items. OPRID can be mapped directly or through a role query Map the Key values of the worklist record to the Key values of the approver’s search record . these values appear as the Link and Comment fields. For example.
.Mapping the Key fields. Query through which OPRID can be mapped. This query can be created through Application designer or through front end. Mapping the OPRID (Operator Id or Id of person logging in).
METHOD 2. Specify the range of values from the type’s edit table that users with this profile can process. select the lowest value in the From Value field and the highest value in the To Value field. iii. Adding Route Control Types i.. select the same value in both fields. To provide access to two values. E. Go to PeopleTools> Workflow> Routings & Roles> Route Control Type (eg.APPROVAL RULE SET WORKFLOWS (ARS) 1. to route purchase requisitions to different buyers based on which vendor can supply the requested item. if a Route Control Profile shall contain many values. BUS_UNIT_TBL_FS table has been used for the Business Unit Route Control Type and the values (all business units) would be used for Route Control Profile. E. Once you give the Required Edit Table Name. Business unit) In the Edit Table drop-down list. . (Optional) Assign values for another route control type. ? Route control types These identify the situational factors on which you want to base routing decisions. i. iii. you create a Vendor route control type. Alternatively. e. Here you need to specify the edit table. The route control type specifies the prompt tables to which this profile applies. click the Add button. To provide access to a single value. Select a new route control type. add a new row to the Authorized Values field. The values of the key field of this record would be used for Route Control Profile.g. Go to PeopleTools> Workflow> Routings & Roles> Route Control Profiles Select a route control type from the Route Control Type drop-down list. To provide access to a continuous range of values. Create a route control profile as follows. select the prompt table against which you want to validate values. Later.g. You can assign values for more than one route control type to the same route control profile. Save this page and repeat the process for each route control type. 2. BUS(RC101) has Route Control Type Business Unit and the Route Control Profile values are From : RC101 and To : RC101. If you want to make a profile having more than one values of that Route Control Type then add multiple rows of ‘From’ and ‘To’ Prompts. Assign its authorized values. list the first and the last value as stored in the edit table (sequentially). ii. you specify with whom each buyer works. With your cursor in the Route Control Type field. save the Page.g. Create a Route Control Type such as Business Unit or Administrative Area. Make the Route Control Profile and Assign the From and To values to it. ii.
In the On Authorized group box.Finally. . self-approval is still subject to the person’s approval limits. enter an activity name (associated with the business process that you’ve specified) and event nameto specify which event should be triggered when the transaction is fully approved. 6. Basically. PeopleSoft recommends a standard effective date. a security feature in workflows. Selecting this option does not mean that transactions are automatically approved. 8. Specify the currency unit for the transaction. Save the rule set and assign an effective date. 4. Rule steps are the individual approval steps. Virtual Approver triggers this event when final approval occurs. When you add PeopleCode to call Virtual Approver from the transaction page. Unless you specifically want to make the approval rule set effective at a particular time. Approval rule sets incorporate one rule step for each level of approval that might be required. Specify currency units for the approval rules. Specify whether users can approve their own transactions. after a purchase requisition is approved. displaying the General tab. For example. The components of the map are individual approval steps: one for each level of approval. it is logical to trigger an event that notifies a buyer that the approved requisition is ready to be fulfilled. To create an approval rule set. File>New>Approval Rule Set 2. Enter descriptive information about the approval rule set. this business process is one of the input parameters. 5. The Approval Rule Properties dialog box appears. Go to 3rd tab of the Userid Component and there attach the Route Control Profile corresponding to the Required Role (through Route Control Hyperlink). 7. Select the Use tab. such as 01/01/1900. Specify the event to trigger when all required approvals have occurred. Navigation: PeopleTools > Security > User Profiles > User Profiles Attaching route control Profile(s) to a Userid means that this User is allowed to approve the transactions related to this route control profile(s) only. Select Allow Self Approval if users are permitted to approve transactions that they’ve entered. Properties. Enter the name of the business process that is associated with this rule set. Application Designer Procedure: ? Aapproval Rule Set An approval rule set is a workflow map representing the criteria for determining which approvals are required for a transaction. 9. 1. Use the Icon Descr (icon description) field to specify a description that appears next to the rule set’s name in dialog boxes that list approval rule sets. Open the Approval Rule Properties dialog box by selecting File. Attach Route Control Profile to the Userid used in the Approval Process. 3.
If users who submit items for approval have some level of authorization. Virtual Approver bypasses that user anyway. The user sees a message indicating that the transaction needs further approval. for example. Displays a message asking the user whether to add the transaction to the workflow. and then the first rule step must represent that approval level. Specify whether the system can bypass this approval step if additional approval is required.When the person who submits something for approval has no self-approval authority. Workflow Only Message Only Both If a transaction needs further approval. users can self-approve amounts up to USD 100. the message comes from the PeopleSoft . you may include a step for that user so that your graphical map more clearly documents the entire process. As long as that user has no authorization authority. this forwards it on to the next step without informing the user. but the transaction doesn’t enter the workflow. you do not need to include a step for that person. The role that you select is the role of the user who approves items at this step and path. However. select all of the roles that are qualified to process the transaction at this step. If you select Message Only or Both.
Use the Message Catalog setting to specify the set and number of the message that the user sees. When both of the managers approve the request. The purchase request example following this procedure has several steps. RULES tab Specify which transactions the specified role users have the authority to approve. The associated record and field specify the record and field containing the amount in the original transaction. An example of a process with multiple paths is one in which requests must be approved by the department manager and an office manager before going to a vice president. Here is sequence of steps and paths in this case: Step 1 1 2 A B A Path Route to Role MANAGER (DEPTARTMENT) MANAGER (OFFICE) VICE PRESIDENT In this example. specify which step you’re defining. enter the criteria in the Row Level Rule group box. the system sends two worklist entries when a new request comes in: one to the department manager and one to the office manager. the system forwards it to a vice president. but only one path. • • • . In the Appr Step (approval step) and Appr Path boxes. The user can authorize transactions whose monetary amount is between the values in the Min and Max fields. You can specify which transactions a user can authorize in the following three ways: • • If approval requirements are based on a monetary amount. 1. The associated record and field specify the record and field containing the quantity in the original transaction. There are two methods of obtaining row level criteria: using a route control or a SQL object. If the value is in the range to which the route control profile gives the user access. the user can approve the transaction. enter the criteria in the Quantity Rule group box. The system compares the value from the specified record and field to the user’s route control profile. the range of transactions that the user can authorize is determined by the user’s route control profile. If approval criteria are based on a (non-monetary) quantity. If the approval criteria are based on the approver’s user data. The user can authorize transactions in which the (nonmonetary) quantity is between the values in the Min and Max fields. If you select Route Control.Message Catalog. Approval processes can have multiple steps (in sequence) and multiple paths (in parallel). enter the criteria in the Amount Rule group box.
EVENT tab Select the Events tab to specify which business events are triggered. depending on the action of the approver at this step. Select the business event to trigger when this approver approves the transaction. Specify which events to trigger if the user denies or recycles the transaction. .
Rte_cntl_type1 Rte_from_value_1 appr_fields_wrk. Here in ‘specify query bind variables’. the OPRID field is linked through RoleName>One Route Control Query.rolename Rte_cntl_type_1 appr_fields_wrk. .fld1 Rte_to_value_1 appr_fields_wrk. the mapping of the listed 4 fields is done as follows: Rolename appr_fields_wrk. we may map it to a constant if we want the workflow to be triggered to one particular approver always (through triggerbusinessevent ()).fld1 Alternately.NOTE: Generally in the worklist ‘field mapping’ of the above listed activity.
Enter the following code exactly as it’s shown. The business process and approval rule set you want Virtual_Approver to use. &ROLEUSER). 4. NOTE: include the three fields APPR_ACTION. Set values in the APPR_FIELDS_WRK work record to give the Virtual_Approver function the data it needs to check the approval rules. NOTE: the following code should be written on an event of a non-key field of the record like APPR_FIELDS_WRK. &FORMID. you must add both SaveEdit PeopleCode and Workflow PeopleCode to the record definition that is associated with that page. Set these values: • • • The name of the role user attempting to approve the transaction. Use the Virtual_Approver function.ROLEUSER = &ROLEUSER. these should be made hidden.Adding Workflow Work Pages: Every component that uses Virtual Approver PeopleCode must include the pages WF_FUNCTIONS_01 and APPR_WRK_01. APPR_FIELDS_WRK. NOTE: while including the 2 extra pages in the component. For example. declare function Virtual_Approver PeopleCode APPR_VA0_WRK.FUNCLIB_01 FieldFormula. and P (Pending).ROLEUSER FieldChange. /* Get the role user name for the current user */ &USERID = %UserId.APPR_ACTION = <approval_action>. APPR_FIELDS_WRK. APPR_FIELDS_WRK. Set the approval status record field to the value that Virtual_Approver returns: A (Approved). if you’re using route controls. The valid status values are A (Approve). These special work pages load several important Workflow PeopleCode functions into memory. .APPR_ACTION /* Declare the Virtual Approver workflow functions */ declare function Get_RoleUser PeopleCode APPR_VA0_WRK. &EMAILID. &EMPLID. 3.<BusProcessName>. or R (Recycle).APPR_RULE_SET = <approval_rule_set>. D (Deny). D (Denied). /* Set values in the work record for Virtual_Approver */ APPR_FIELDS_WRK. Adding Virtual Approver PeopleCode After you add the Virtual Approver work pages to the component with the page where the triggering event occurs. Declare the external workflow functions Get_RoleUser and Virtual_Approver. replacing the values in angled brackets with the values that are appropriate for your application. 2. The approval action that the current user gave to the current work item.APP_ROW_NUMBER = <current_row_number>.APPR_INSTANCE = <RECORD>.BUSPROCNAME = BUSPROCESS. /*OPTIONAL*/ APPR_FIELDS_WRK. APPR_FIELDS_WRK. WF_FUNCTIONS_01 enables the system to determine which route control types are relevant for the event that you’re triggering. Get_RoleUser(&USERID.APPR_INSTANCE. APPR_INSTANCE & APPROVAL_STATUS in your main record and APPR_ACTION & APPROVAL_STATUS on your page SaveEdit PeopleCode This is the general structure of the SaveEdit PeopleCode program: 1.
if the user specifies a single approval action for the entire page—it’s preferable to include the field APPR_FIELDS_WRK. The variables in this code are: BusProcessName Approval_rule_set Approval_action The name of the business process whose approval rules to use. Usually. endif. Workflow PeopleCode declare function Virtual_Router PeopleCode APPR_VA0_WRK. Status_record_field The record field that holds the approval status of the transaction. If the user specifies the approval action at level 0 on the page—that is. The approval action to provide Virtual_Approver as input. approval_action is the name of the record field in which the user sets the approval status. If you’re calling the router from level 0. Current_row_number The current row number in the scroll. The name of the approval rule set that you want Virtual_Approver to use to determine whether an item needs further approval. The scroll_info is a number. such as Purchase Request Approval Status. this direct approach doesn’t work if the user must specify approval actions for each row in a scroll. Setting this field is not necessary at level 0. However. You must have the user set the action in another field. then transfer the value to the APPR_ACTION field before the Virtual_Approver call. If you’re calling from a level 1 to level 3 scroll. Virtual_Router(). if you’re calling it from a scroll.FUNCLIB_02 FieldFormula.APPR_STATUS. use the CurrentRowNumber() function. . It can also be one of the string constants: P. scroll_info is 0.APPR_INSTANCE. scroll_info is the row number of the current row in the scroll. Note.APPR_ACTION on the page and let the user set it directly. if None(APPR_INSTANCE) then APPR_INSTANCE = APPR_FIELDS_WRK.APPR_VR_ROW = <scroll_info>. or R./* Call the Virtual Approver */ Virtual_Approver(). APPR_FIELDS_WRK. /* Set the application record’s approval status field to the value */ /* Virtual_Approver returns */ <status_record_field> = APPR_FIELDS_WRK. D.
roleuser from ps_rte_cntl_ln A. If I want to have 2 different pages in my activity. SQLExec("select B. Check the ‘Worklist User’ checkbox in the Workflow tab of the userid in Peopletools>security>user profiles before proceeding ahead. We can also map OPRID to a work field OPRID to which we can assign a value on the workflow event just before we call TriggerBusinessEvent () function. any particular &ROLEUSER can also be fetched with the help of these 2 queries under a set of conditions: SQLExec("select ROLENAME from ps_appr_rule_detl where appr_rule_set = :1 AND APPR_STEP =:2". &ROLENAME. if you tick 'self approval’. In ARS based workflows.Chapter 2. we may keep 4 roles or steps in the ARS and assign 2 roles to 1 of the approvers.r.RTE_CNTL_PROFILE = B. Typically.RTE_CNTL_PROFILE and A. otherwise we cannot use email/message option in activity directly in the worklist item. TROUBLESHOOTING SOME COMMON WORKFLOW PROBLEMS 1.rolename=:2". &ROLEUSER). 3. For any approver. when we have requirements which are highly non-uniform in nature w. &ROLENAME). .t. if you untick 'approval active'. other for deny 6. of approvers goes up to 4 say for a different business unit or route control profile. &APPR_STEP. Please make sure to include this work field on your page if you want it to appear in the ‘map field’ box above. 4.rte_from_value >=:1 and A. we use the triggerbusinessevent () workflow and customize it through peoplecode. The Route Control Queries (mentioned in ARS based workflows) can be studied or tested from front end (Reporting Tools> Query> Query Manager).Check the SQL view query of the search record. Check the relevant role & route control profile of the user in case of approval rule set based workflows. we fetch OPRID values one-by-one from a separate set-up page where we maintain a list of approvers. “BUSINESS UNIT” . virtual router doesn’t check the ARS rules and request is approved fully as soon as saved.Alternatives & Enhancements 1. at least one field on the page should change its value (including approval action) for trigger of workflow to next level. 2. 3.e. I can achieve that using 2 different stepssay 1 for approve. if our requirement is a 3-level workflow (i. SMTP server needs to be configured. 9. Worklist item getting transferred but approval page not opening up component's search record OPRID not getting updated. ps_rte_cntl_ruser B where A. routing of our workflow or approver options. it means you can approve your request but subjected to amount and quantity rules. 5. ARS based workflows ultimately operate on triggerbusinessevent () only internally. This will be a flexible design for future in case the no. 4. In ARS based workflows. "APPROVAL RULE SET". Further. Further. However. 8. 3 approvers). How to monitor my workflows(status/level of approval) from front end PeopleTools> Workflow> Monitor Worklist> Update Worklist Entries. 2. 7.rte_to_value<=:1and B.
REFERENCES PeopleTools 8.44 PeopleBook: Workflow Technology -.End of document -- .
This action might not be possible to undo. Are you sure you want to continue?
We've moved you to where you read on your other device.
Get the full title to continue reading from where you left off, or restart the preview.