How to retrieve selected records in a workflow user task

How to retrieve selected records in a workflow user task

book

Article ID: KB0073973

calendar_today

Updated On:

Products Versions
TIBCO EBX All versions from 5.8.1.

Description

This article will give you a solution for the following requirement: I want to create a user task in which a user can select records which will be later used in the workflow process.
Before reading this article you should be aware of the UserService API.
Please see links in "reference" section.

Resolution

Solution

As the workflow user task service, we use a service extension in order to add an output parameter that will contain the selected records.
The following article explains how to achieve this:
https://support.tibco.com/s/article/Extending-a-built-in-service-to-add-input-output-parameters

Then we have implemented a service without display (UserServiceExtended) that will be launched from the user task that uses the default service extension.
When launched, this service:
- Retrieves selected records
- Puts their primary key values, separated by a ";" character, in a data context output variable
- Completes the interaction (displays the accept button)

This service is declared so it can only be displayed/executed in a workflow context.
In our solution, we chose to implement a toolbar so that it can be launched with a separate button.

Result

Before launching the service:
User-added image

After launching the service:
User-added image

Data context variable value:

User-added image

Issue/Introduction

How to retrieve selected records in a workflow user task

Additional Information

User services documentation:

Knowledge base article:


https://docs.tibco.com/pub/ebx/5.9.8/doc/html/en/Java_API/com/orchestranetworks/userservice/declaration/UserServiceExtensionDeclaration.html
https://docs.tibco.com/pub/ebx/5.9.8/doc/html/en/Java_API/com/orchestranetworks/userservice/UserServiceExtended.html
https://docs.tibco.com/pub/ebx/5.9.8/doc/html/en/Java_API/com/orchestranetworks/interactions/SessionInteraction.html#complete-com.orchestranetworks.interactions.InteractionHelper.ParametersMap-
 

Attachments

How to retrieve selected records in a workflow user task get_app