Skip to main content

 

 

 

 

Template:OutSystems/Documentation_KB/Breadcrumb_New_Layout

 

 

Template:OutSystems/OSLanguageSwitcher

 

 

 

OutSystems

List activities

This topic shows how to list activities currently assigned to an end user by using the Case_GetActivities service action from the CaseServices_API module.

The concept of activity internal state is important to filter the kind of activity the user is looking for. There are 3 types of activities, according to their internal state (which takes into account both the bpt status of the activity and the assignment/ownership of the activity):

ToDo
The activity has been assigned to a group or a group and a user. The activity is in the ready status (BPT state).
InProgress
The activity has been assigned to a user or a user and a group. The activity is in the open status (BPT state).
Done
The activity is finished (closed state).

List activities assigned to an end user

As an example, let's look at the particular case of “obtaining all the activities, which haven't yet been opened, assigned to the user who is accessing the screen”:

Before following the steps, make sure you have created the UI module of your app, named <app-name>_UI.

To get a list of the activities assigned to an end user, follow these steps:

  1. In <app-name>_UI, open Manage Dependencies, and add the following dependencies:

    • Case_GetActivities entity from the CaseServices_API producer.
    • ActivityFilterCriteria static entity from CM_ProcessServices_BL producer.
    • UserAssigneeCriteria static entity from CM_ProcessServices_BL producer.
  2. In the screen where you want to display the list of activities, add a Data Action.

  3. In the data action flow, add a Case_GetActivities action.

  4. Set the Data Type of the Output Parameter as CaseActivity_View List.

  5. To filter the activities by the logged in end user, expand the FilterResults action input, and set UserAssigneeCriteriaId as Entities.UserAssigneeCriteria.AssignedToMe.

You can use the suggestion AssignedToMe.

After these steps, display the results to end users by using the output parameter as the source of a Table, List, or Table Records.

  • Was this article helpful?