Workflow: Making User Decision Task fit for consumption in My Inbox

Generic user decision step in workflow technically works out of the box in My Inbox app. Given that, it is a generic task it is expected from it to not display object-specific information. From a user point of it though it’s not good enough as they would expect to see information regarding a document which they are expected to approve/reject.

For the purpose of this blog, I have this workflow, based on purchase requisition business object BUS2105 with generic user decision task.

Let’s see what we already get in My Inbox with Generic User Decision step.

  1. The task in My Inbox displays Title set in the workflow.
  2. Agent’s name
  3. Task created date and time
  4. Fully functional Approve and Reject button. Buttons also prompt the user to input comment, which could be optional or mandatory, based on how you have specified in the workflow step.

In terms of functionality, it’s almost there without us making any My Inbox related configuration or BADI code to handle ‘Approve’ and ‘Reject’ actions.

In terms of information regarding what needs to be approved the only information is the subject. What would be nice to have is a link to open up Purchase requisition or ideally Purchase requisition information being displayed directly in task.

Adding Link to Business Document

SAP Generic decision task TS00008267 being SAP standard first thing we need to do is copy it and make it more specific to the scenario. In transaction PFTC copy TS00008267, give it a scenario-specific name.

In copied task add container element on which your workflow is based on. I am going to insert the element based on BUS2105.

Now go to workflow and replace generic user decision task by newly created task.

Sort out the binding, make sure business object from workflow container is mapped to business object in task container.

Following these changes, I can now see link in My Inbox task.

Adding Visualisation to Task

The configuration can be defined using transaction SWFVISU for the relevant tasks in the back end in question. SWFVISU configuration is task-specific so copying generic task is prerequisite, otherwise, you would end-up jeopardising existing workflow using generic task.

Select the visualization type “INBOX_GEN – My inbox generic application”. The following visualization parameters are available for the selected visualization type:

APPLICATION_PATH  
COMPONENT_NAME cross.fnd.fiori.inbox.annotationBasedTaskUI
QUERY_PARAM00 service=/sap/opu/odata/SAP/C_PURREQUISITION_FS_SRV
QUERY_PARAM01 entity=/C_PurRequisitionFs(PurchaseRequisition='{&PurchaseRequistion.Number&}’)
QUERY_PARAM02 annotations=/sap/opu/odata/IWFND/CATALOGSERVICE;v=2/Annotations(TechnicalName=’C_PURREQUISITION_FS_ANNO_MDL’,Version=’0001′)/$value
SCHEME Sapui5

You can read more about this CDS based visualisation setting in sap note 2178368 – URL generation for any application (My Inbox)

One Reply to “Workflow: Making User Decision Task fit for consumption in My Inbox

  1. hello,
    the link exist, but not the items.and not the attachments. the tcode swfvisu is on the right side cutted in your short cut. Can you send the whole parameters to me?

Leave a Reply