In most workflow systems, you will want to include a β€˜My Task List’ page in your application for users to see their current tasks. How do we do this in Flows for APEX?

You have two alternatives:

  • Use the flow_task_inbox_vw Task List View. This is available to you with any version of APEX. The view lists ALL current usertasks for all users, but can be further filtered to return only the tasks for the current user. Details below.
  • Use the flow_apex_my_combined_task_list Task List view. This requires APEX v22.1 or higher and requires an APEX session when you use it. This view combines the APEX task list that APEX uses for any Approval Tasks that it is managing PLUS any userTasks that are current in Flows for APEX. The view filters tasks based on the user identity and granted APEX Application Roles - so it will give a task list for the current user. This task list is designed to be used in conjunction with the APEX Unified Task List feature in APEX v22.1+. Details Below.

Using the flow_task_inbox_vw Task List View

The flow_task_inbox_vw view has been present in Flows for APEX for many releases now. It is a view on the runtime tables of the Flows for APEX engine, and provides user-friendly (but still quite technical) information about all of the current userTasks in your Flows for APEX system.

It is anticipated that you will likely create a view on top of this view to further filter the tasks that are shown to your users. This could include:

  • filtering for only certain process types (if not all are relevany in the particular app)
  • removing tasks already reserved (claimed) for another user
  • to make the results user-specific. For this you will need to
    • use the current username and check if this is in the sbfl_reservation column
    • or if it is contained in sbfl_potential_users
    • or if the user has been granted a role that is in the list of potential groups
    • and that the user is not in the excluded users list.

In previous versions of Flows for APEX, you would have used current lane. But with 23.1, you should use modify uoir models to use the Task Assignment features, and then use the potential_groups column instead – as this takes into consideration both any explicit task assignment definitions, and whether the lane is defined as mapping to an APEX role or not.

APEX Application Roles and Externally granted roles used by APEX require different configuration currently.

Once you have a view that returns the correct tasks to a user, you can then create an APEX Report region using the object. The link_text column will give you a link to the APEX Page required by the task.

Using the flow_apex_my_combined_task_list Task List View

This view is designed for users of more modern APEX System (v22.1+), that include the APEX Unified Task List feature. The columns returned are designed to fit cleanly into a generated APEX Unified Task List.

This view uses a pipeline table function to create a personalized task list for a user, based on their username and APEX Application Roles. It does not currently work for exterally granted roles.

To use this

  1. Generate a Task List page using the APEX Page Wizard. Use type β€˜My Tasks’.
  2. Change the source table for the Task List to flow_apex_my_combined_task_list
  3. Add Server Side Conditions to the Approve and Reject buttons so that they are only shown when task_type = 'APPROVAL'.
  4. We often also add buttons here to Reserve/Claim and Release a Task from the Task List.
  5. We also often add a button to Show Process State for Flows for APEX tasks, which calls the BPMN Viewer.

More details to be provided soon.