Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
jayshukla
Explorer

Post implementation of custom Fiori Apps, we faced issue related to Delay/Manual refresh required to refresh the Fiori Task list. This blog provides information regarding the Fiori Task list and its refresh behavior based on the task type (Synchronous/Asynchronous). Information about the Task Type and how it is completed has also been provided. This article also provides information how to go about the task design for Fiori Applications.

Here I cover the following topics

  • Fiori Task List
  • Task Type – Synchronous or Asynchronous
  • Task Completion and Refresh
  • Fiori Task Design



Fiori Task List


Work items assigned to a user are displayed in a master detail view.

On completion of task, the work item is removed from the list.


Fiori Task List Refresh Flow

A Fiori task list is refreshed as per the following steps

Task Overview

A task is removed from the list once it has been completed. A task completion depends on the way it has been created. A task can be created as Synchronous or Asynchronous. The task gets this Sync/Async property from the Business Object Method

AsynchronousSynchronous
When

We define a method as an asynchronous method if we want a task that uses this method to be terminated only via events.

The following are possible reasons for defining a method as asynchronous:

  • The function within the method uses the update task
  • The method is terminated by an event generated when the update task is successful.

You define a method as a synchronous method if we want to use the processing results as method parameters or results.

The following are possible reasons for defining a method as synchronous:

  • The function within the method does not use an update task
  • The method is "just" to be executed
Definition
  • A task that refers to an asynchronous object method must be defined with at least one terminating event. If we define an asynchronous method, we must ensure that one of the terminating events is triggered after execution of the method.
  • At runtime, the relevant work item is only terminated if one of the defined terminating events occurs.
  • A task that refers to a synchronous object method can be defined with terminating events.
  • At runtime, the relevant work item is generally terminated when the synchronous method has been successfully executed.
  • But the work item can also terminated if one of the defined terminating events occurs.
ExampleThe task in which the method Process sales order is executed is also terminated by the event Customer unable to pay.The method Display for displaying an object.

An Asynchronous task has to be completed by using a terminating event.


Task List Refresh

A synchronous task would disappear from the Fiori task list as soon as it is completed. In case of an asynchronous task, the completion of the task depends on the event processing mechanism.Again, these events may be using the Event Queue mechanism or would be delivered as soon they were raised. However some delays are expected in processing of the event and subsequent task completion.

As a result of this, a task list based on an asynchronous task may not get refreshed as soon as the action is performed on the task.

Task Definition - Points to consider

Custom Task

First preference should always be given to define task as Synchronous task

For completing a synchronous work item, FM SAP_WAPI_WORKITEM_COMPLETE can be used.

Asynchronous Task (Standard or Custom)

Irrespective of whether the task is standard or Custom, communicate upfront about the task list refresh behavioral issues

The user should be communicated about expecting task to remain in the list sometimes. To refresh the list in these cases, manual refresh will be required.

I hope this blog is helpful in some way.


Thanks for reading and any comments/questions please comment below.

4 Comments
Labels in this area