Quantcast
Channel: Andrej Baranovskij Blog
Viewing all articles
Browse latest Browse all 706

Passing Payload Value from ADF to BPM Process Task

$
0
0
This post describes how to pass payload value from ADF programmatically and assign it to the BPM process task. This is one of the important points for ADF/BPM integration, along with programmatic process task initialization we are able to assign process task payload and pass dynamic values.

Sample process from demo BPM app -  adfbpmapp_ps6_v2.zip, works with Employee type payload. Employee data is submitted in the input and output of the process task:


Process is initialized programmatically, AssignEmployee task is process automatically by completing this step from ADF through BPM API. User is navigated to AssignEmployeeReview task automatically - this is how sample process works:


Once new process task is initialized, we are setting payload variable based on initialized task ID and processing the task. From the same bean, tasks table is refreshed by the ADF poll component to display latest changes. BPM process task starts asynchronously and ADF UI may not display it immediately:


Payload value is assigned by getting task payload XML element and setting value by ID. In this example only Employee ID variable is initialized for the payload:


BPM process works in the similar way as ADF Task Flow - navigation between process tasks is controlled by outcomes. As you can see SUBMIT outcome is defined in the task definition:


Finally ADF UI part defines ADF Poll component to reload tasks table automatically every 10 seconds to display asynchronously started BPM task list:


User redsam1 selects employee row - 101 in this test:


Goes to Assigned Tasks tab and from there starts new process (payload for Employee ID is retrieved from current row set in Employee Data tab):


As you can see from the screenshot above - task was created, but not yet displayed in the list. Since list is auto refreshed - it will be loaded in the next 10 seconds:


If you go to the standard workspace task flow and display associated human task UI for selected process task, it will display Employee ID 101 from process payload assigned by method in ADF:


Submit selected task for further processing, payload value will be transfered by BPM to the approver redsam2 user:


Through BPM process instance tracker we can double check - payload was set programmatically correctly, value 101 is displayed:


Viewing all articles
Browse latest Browse all 706

Trending Articles