How to configure workflow task on portal UWL:
- GO to T-code PFTC and copy a standard user decision task. A new task will be generated starting from 99*****.
- Now got to SWDD and create a simple workflow with user decision step. Here we have used two decisions Approve and Reject.
- Add the custom task which you have copied in step 1, to the user decision step.
Now your workflow should look like this:
I have added two email steps in approve and reject decisions. If you go inside the user decision step you will find the custom task which was added earlier.
- Save and activate the workflow and execute it.
- Now login into portal. Go to MSS->Work Overview->Task. You will find the decision step here. By default every user decision task is configured in portal UWL and you can directly see the decision task whether it is standard or custom.
- But you will not see the decisions buttons here (Approve and Reject). Only one button is visible i.e “Open Task”. By clicking on it, it will go to SAP backend to perform the decision.
Note: We don’t want this. We want the decisions to be made in portal not in SAP backend.
- To make the buttons visible in UWL task, you need to make changes in XMl file for that particular task or even sometimes you have to create it.
- In this example we will be creating a new XML file for the decision buttons.
- Steps to create XML file:
- Login to portal administrator and go to system administrator->system Configuration->Universal Worklist – Administration.
- Under Content Configuration tab locate the file “uwl.webflow.systemname”.
- Copy the header and footer of that file in a note pad.
- Now add the following code in between the header and footer.
<ItemType name=”uwl.task.webflow.TS99000106.SAP_ECC_HumanResources” connector=”WebFlowConnector” defaultView=”DefaultView” defaultAction=”viewDetail” executionMode=”default”>
<ItemTypeCriteria systemId=”SAP_ECC_HumanResources” externalType=”TS99000106″ connector=”WebFlowConnector”/>
<Action name=”Approve” groupAction=”yes” handler=”UserDecisionHandler” returnToDetailViewAllowed=”yes” launchInNewWindow=”no”>
<Property name=”decisionKey” value=”1″ />
<Action name=”Reject” groupAction=”yes” handler=”UserDecisionHandler” returnToDetailViewAllowed=”yes” launchInNewWindow=”no”>
<Property name=”decisionKey” value=”2″ />
Note: Here in property “decisionKey” is nothing but the decision code. In this example approve has code ‘001’ and reject has code ‘002’. This code is defined by the sequence of the decisions in workflow.
Your XML file should look like this:
Save this file as .xml file.
- Now go to system administrator->system Configuration->Universal Worklist – Administration. Click on ‘Upload New Configuration’.
- Enter a configuration name.
- Browse the xml file.
- Check the high priority checkbox.
- Select the system from the drop down and choose upload.
- Now go to system administrator->system Configuration->Universal Worklist – Administration. And click on ‘Clear Cache’ link.
- Select the system and click on clear cache button.
- Now check the user decision in UWL. You will see the approve– reject buttons.
- Now if you select any one of them, it will process the particular node of the workflow.