Wednesday, January 20, 2021

#826 OIC --> Process Archiving

 One may need to archive process instances for compliance purposes and what better place to store those completed instances than OCI Object Storage.








Here is the OCI bucket - 









The password entered in Configuring Services above is NOT your oracle cloud password.

Rather - 














I approve 9 human tasks, completing 9 simple process instances - just that I've something to archive.

Simple so far - now to defining the archiving schedule - 









Only 6 minutes to go, so let's wait for the magic to happen...





Back in object storage land...






















I download the zip and open it -






metadata - 









Let's check out one of the folders - ECarApprovals-1.7

here we see the export of that version of the Process application -





Back to runtime - here are my 9 process instances





As reference, here is the Process - 








Here are the files from the archive -






So what's in the audit-trace.xml file?














A comprehensive audit of metadata and the process execution.

Each Action in the Process - Start - Fix Supplier - Resubmit? - Create Supplier is reflected in 

<activityName> / <activityType> elements - 


 












This file naturally contains payload details - input payload, changes made to the payload by Approvers, response payload etc.

docsContent.xml - for docs attached etc. I do not have any.

processInstance.xml - execution engine data, uninteresting from a business compliance perspective.









socialContent.xml - empty, as I am not using Oracle Social

task.xml - includes details of the human task - payload, who is the approver, outcome etc.

task-detail.xml - more detail of task metadata but does not include the payload. 








Wednesday, January 13, 2021

#825 Guest Post - OIC --> JSON Obfuscation

 This is my first guest post and it couldn't come from a more competent source - so take it away Chris Peytier -

With Oracle Integration Cloud, the need to handle incoming JSON requests is rather common,

However, OIC will attempt to process these request, and will hence not maintain the original JSON format. What if we want to handle the request "as is", preserving its original structure? For example if we want to pass it down to, say, an ADW database instance, so that it can be processed there as JSON document? How can we avoid OIC to interpret and "de-structure" the JSON formatting? 

 

We can do this by using an "obfuscated" mode, In order to preserve the JSON structure of an incoming request.  For this, we will write & read the file with 2 stage file actions in sequence.

Here are the steps that need to be performed:

a)     Write your incoming JSON request into a file, via a Stage File action:


 






You can choose the name of the directory, etc. as you wish.

b) Create a file on your laptop , of type .xsd, for example opaqueSchema.xsd, and enter the following lines in that file:





c) Create another Stage File action in order to read as "entire file", this time using the obfuscated mode.  In the "schema option", you will need to state that you want to specify the contents of the file, and chose "XML schema" as shown below







d) On the next screen , select the opaque_schema.xsd file which you have created on your laptop.







The summary of your ReadFileAsOpaque should look like this:














e) Finally, in the mapping section, you will need to use a decodeBase64 function . 
The output can be used to do whatever you want ( in my case, I was sending it to an ATP database).
The JSON object's format will have been preserved.





Chris Peytier January 2021

Tuesday, January 12, 2021

#824 - Simple Fusion ERP - OIC Demo

 Here is a very simple demo to show the value add of OIC in respect of creating suppliers in Fusion ERP. Should take you about an hour to create this.









It covers the OIC components - Integration, Process and Insight.

It also includes embedding the Insight Dashboard in Fusion ERP.

Creating a Supplier in Fusion ERP




 



The above details the minimum number of fields required to create a supplier.

JSON format - 

{

  "supplierName" : "NiallCSupplier",

  "taxOrgType" : "Corporation",

  "supplierType" : "Supplier",

  "bizRelationship" : "PROSPECTIVE",

  "DUNS" : "389765334",

  "taxCountry" : "US",

  "taxpayerID" : "410417775"

}

My processing logic is as follows - 

Integration with a REST Trigger invokes the ERP adapter to create a new supplier. A Business Process is called if this creation is NOT successful. 

I also have an Insight Dashboard that keeps business users updated on what's happening.

The Integration














The CreateSupplierScope -














ERP Adapter Configuration - 










Mapping - 






Note:I only show mapped field in the Target above.

The Scope FaultHandler - 











The logic is very simple - if supplier creation fails - 

1. Check for Supplier already exists error. If this is the error then set appropriate error code.

2. Check for DUNS Nr already in use error. If this is the error then set appropriate error code.

3. Set a generic error code for other errors.

4. Call a Business Process which will allow our supplier staff to correct the invalid supplier data.

I just made the arbitrary decision to only check for those 2 issues - Supplier and DUNS.   

The Process

The process is ultra simple -








Essentially, fix the supplier data and re-submit to the Integration - remember the SWITCH at the start of the integration that checks for re-submission?

The Insight Model





The Identifier is the SupplierName.

The Integration 2 Insight Mapping




















Demoing the final product




I can validate in Fusion ERP - 



Check out the Insight Dashboard - 


Now I test with an invalid payload - new supplier name with existing DUNS Nr.


The Insight Dashboard has been updated - 



I check out my Process Task List - 


I fix the DUNS Nr and click RESUBMIT -


Insight Dashboard is updated -


Embedding the Insight Dashboard in Fusion ERP

I have already posted on embedded Insight dashboards - check out the post here

I just extrapolate from this - 
I build the url - 

https://myOIC/ic/home/lite.html?root=console&console=SupplierCre_xEUAsjOe&views=Milestone_Summary_Diagram&header=true&height=10px&layout=1,1&output=embed

Starting point for the page is the Page Builder in ERP - 




I create a page specifying the Insight url and "Employee" role.
I move the page to the Me section of the ERP Menu structure.




















Monday, January 11, 2021

#823 - OIC - Tagging Instances for Feb 21 upgrade

 You should see the following when you login to your cloud tenancy these days - 








You should have been informed about this ca. 3 weeks ago -






Cutoff date for tagging instances in January 14th - so you still have time to do so.

Regarding the new features coming with the Feb release, please see Antony's blog post here

Please expect the usual blog posts from me on these new features.