Thursday, September 27, 2018

#657 SSI - Custom Adapters in a matter of Minutes!

This is the killer feature of SSI -


the ability to create your own REST based adapters in a matter of minutes.


In this simple demo, I will create an adapter for the following Apiary based REST service.






































The URL is as follows -

https://private-nnnn-parkmycarservice.apiary-mock.com/carpark

Note the Developer icon, which appears once you have the relevant role in SSI.



































So I click on - Create a Cloud App Definition.







































Here I enter a Postman like tester.
I copy and paste the request from my Apiary definition



I then click -



























Looks good!

I then click Next















I click Next -













that's the Action created -













Note that the input/output schemas have been automatically created -















That's it!

Now to the Recipe - I will kick this off with a Timer -
























Now to the Invoke of the ParkMyCarService


























Ok, I did hard code the carRegistration !

Now I add a second Action to put the response in an email to myself.


That's it!

Now to testing -


















I check my email -












A very simple example - but this is a huge value add.

Custom adapters to REST based apps in a matter of minutes!














#656 Finishing off the VB CS Process Approval Scenario

Here is the finished product, so to speak.
















Now back to the tasklist - Task with id 200014 is no longer displayed.














So now to what I have done -

Step 1 - create a Service Connection for the REST API to approve a task































Step 2 - create a page to display the task payload





















Step 3 - create an action chain for Approve


























Note: I call the REST Service to approve the task and then navigate back to the Task List page

Step 4 - Displaying the payload in the approvals page


I create a variable with app scope. This will hold the task id -


















This is leveraged in the Action Chain for the Details button
























This is how I pass the TaskID of the selected task to the Approvals page.


Step 4 - Pre-populate the Approvals page with the Payload data

I create page variables for the payload field values -



















I set the Data values of the Page fields to these e.g. -












I create a new action chain for this page -









































As you can see, I Call the REST API to get the Payload data from Process.
I then Assign the Payload field values to the page variables.

Now all I need to do is specify when this action chain should be executed -














That all there is to it!

THanks to Sid J. for his advice!

#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 -













Wednesday, September 26, 2018

#654 OIC feature Flags










One of the compelling aspects of OIC is the area of feature flags.

These flags can be broadly categorized as follows -

1. new functionality, with broad appeal, that will eventually flow into the mainline OIC service

2. specific functionality, only interesting for certain customer use cases.

My colleague, Antony Reynolds has written an excellent article on OIC feature flags.
There he describes them and details what you have to do to activate them in your OIC environment.

Read it here

Thursday, September 6, 2018

#653 OIC Process & VB CS Part 3 - Starting a Process and Workspace

Here is my simple process -


















The process has 2 start events -
1. Form driven
2. Message Driven

So I can kick off this process as follows -

















Here is the form -
























I submit the order and then go to Workspace -










So how can I do the same in Visual Builder CS?

Step 1 - create the order business object in VB CS
























Step 2 - get access to the process in VB CS














Step 3 - create the order app.
Mine will be very simple -

Main Page - Display all orders









Note the 2 buttons - Create and Edit.

Create page will allow me to create new orders.






















Edit page will allow me to edit an existing order.
Editing will include the ability to kick off an approval workflow.
























I add a button - Approval and then configure the clicked event -







































I drag across the Start Process Action -

























and configure as follows -



















All I need to do is map the input parameters - the salient one is
orderBO.

















Let's Test -































Check in Process Workspace -

























It doesn't get any easier than that!

Now to duplicating Workspace style functionality in VB CS -















So how did I create the above?

I created a  new page and dropped in a List Control.
I then clicked on Data -


















































The Result -


















Now I change some of these labels -





















I now add - Add Task Actions - this will allow me to Approve, Reject etc. from this
page.












































I test -















Great stuff!