Thursday, September 27, 2018

#655 VB CS / Process Integration - Surfacing the Task Payload in VB CS

I detailed in a previous post how to replicate process workspace functionality in VB CS.

You can read all about it here

The only thing that was missing was surfacing the Task Payload in VB CS.

This will be detailed here.

To begin with, it is not as automated as the steps to display the task list and individual task metadata.

Here is my example -























But what about the payload? I cannot approve without seeing that.

There is a REST API I can use, to retrieve the payload.




















Note the orgName --> NiallC Org. This is the only field I will display,
but you can extrapolate from this.


The URL format is as follows:
https://yourOIC/ic/api/process/v1/tasks/{taskId}/payload

So I create a Service Connection in VB CS for this.




















Note the Header - this is required to get the response from Process in json format -
















I copied the response from Postman -





















I test -














Note the tester also has a button -







So now all I need to do is call this from a form.

I create a  new page/form - very rudimentary I agree, but I just want to demo the basics.












So I assume everyone knows whats going on here -  I enter a TaskId and then click the button.
The proper orgName from the payload should then be displayed.

Here is the Event chain -

























Let's check out the Assign of the result -












This is where some manual work is needed -

{{ $chain.results.callRestEndpoint1.body['organizationBO.orgName'] }}

This is not what you get when you do the default mapping in the designer.
So revisit the Assign and set accordingly.


Thanks to my colleagues Vipul and Zafar, for their advice on this.

So now to the demo -













No comments: