Thursday, March 30, 2017

#556 ICS 17.1.3. Orchestration Features --> Global Fault Handling

Here is my simple Orchestration -



























All it does is check if an organization exists in Service Cloud, creating it, if it does not.

So what features are interesting here?

How about a global fault handler?

Global Fault Handler

To quote the What's New doc -
Here you can configure global fault handling to catch faults in an orchestrated integration and perform actions

You can add global fault handling to orchestrated integrations. This functionality enables you to direct business faults back to the caller or apply business logic before sending faults to the error handling framework. You can add fault handling to any integration type (for example, asynchronous, synchronous, or scheduled fire-and-forget (no response expected)).

So let's do it -















Now I can define the error handling required -


















Here I add a Notification -




















I could also add the error itself to the Body of the email -

I begin by adding a parameter and setting it to the error code.


 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

 

 
 
 

Friday, March 24, 2017

#555 ICS 17.1.3 FTP adapter and File Staging

We all know and love the ftp adapter, but what is file staging?

Here is a simple example - processing an order contained in a zip file, residing on an ftp server somewhere out there in the wide beyond.

I create an Orchestration -























I add an ftp adapter to retrieve my order which is in a zip file - order.zip.


The zip is in the /In directory on my, or should I say, Angelo's,  ftp server.












Here is the ftp adapter configuration in my Orchestration -



























I can delete the superfluous map activity -





















resulting in ...





















So what have we done here? We have downloaded the zip file to a "virtual" file system in ICS.

In the next activity, we will read the file from that location.
























Stage File Action configuration -























the result -
























I now invoke the ftp adapter to write the order to the /Out directory.

Configured as follows -

















I do the mapping -















I check my /In directory -




















I check my /Out directory -



















I activate the Orchestration -

















I submit via the menu -




















I check the ICS monitor -































I check the ftp server /Out directory -

























Granted, a very simple example, but you can extrapolate from this to create complex batch file integrations from and to Fusion HCM and ERP.



Wednesday, March 22, 2017

#554 ICS 17.1.3 --> using FOR loop

A simple example here - we will iterate thru incidents retrieved from service cloud.


Here are the incidents in Service cloud for our customer - Hare of the Dog Pub.















The For Each loop -
allows repeated steps to be performed and multiple invokes to be made within the loop.

Now to the implementation -
Here I use the Orchestration pattern in ICS.

























I will use a REST interface to trigger the process.
Parameter is simple the orgName.




















Then the following ROQL query to retrieve the unresolved incidents for a particular customer.

Select Incident from Incident Where Organization.name = '&orgName' and StatusWithType.Status.Name = 'Unresolved'














My orchestration now looks like this -







I map as follows -


I then add the For Loop -
























I call the For Each - LoopOverUnresolvedIncidents,  and drag the Incident onto the Repeating Element and name the current element name CurrentIncident.















































I have created a process in PCS, that will allow a CSR to process the unresolved incidents -


















I will call this from the loop -

First, I create the WSDL based SOAP connection in ICS -
















I then leverage it in the orchestration -














































I do the mapping, leveraging CurrentIncident -













I map the final process response -

















I activate and test -