Tuesday, March 19, 2019

#695 OIC - Subscribing to Fusion ERP Events - part 2

This is the second part of my simple demo of subscribing to Fusion ERP Events.

Part 1 is here

In  part 1 the Purchase Order event (create/update/delete) triggered an OIC integration that pushed Purchase Order data to a Visual Builder app.

In the VB app, I can change the PO.

Part 2 - will now cover how to update the PO in Fusion ERP from VB.

Here is the form in VB -




















In my example, I will update the LOC Id (Letter of Credit Id) value.
Clicking Change Order will call an OIC integration that updates the PO in Fusion ERP.

The Integration


























The REST Trigger payload is as follows -








The Invoke to Fusion ERP - changePO - is configured as follows -

























The relevant Mapping -



















The Invoke of the Integration from VB CS

I create a Service Connection in VB, based on the configured connection to OIC-Integration





















Having configured the above -













































I now add an event chain to the button on the editPO page -

























Note the addition of the FireNotification on success.
This will show a pop-up screen, when I run the app  -
















Now to testing the whole scenario -

I create the following PO in Fusion ERP -









I see this PO in my VB CS app -


























I edit and set the Letter of Credit id to 4















I check in Fusion ERP -





















as we say in Ireland, that's grand!



#694 OIC --> Process: using external forms

Here is my simple scenario - approving a new Organization, before it is created in Service Cloud.




















Here is my basic form - created in Process.





















However, now I can add an external form (ui) to my Process application -
















Before I add it, I need to create it.

I will use VB CS for this.
Note the inclusion of the Task Id field.

This field will be used later to update Process with the outcome (Approve/Reject)














From a functional perspective, I need to pass the values of Organization and Country
from Process to VB. From a technical perspective, we need to include taskId.

So, I add these 3 parameters to this VB CS page.


Note the checked -
Input Parameter --> Pass on URL


I bind the 3 form fields to these variables, as per -


I can test this out in a Browser -



https://myOIC/ic/builder/design/MyVBCSApp/1.0/preview/webApps/org-approvalapp/?param_orgName=NiallCOrg&param_orgCountry=DE&taskId=6789




Now back to Process, where I click - New External UI -

I specify the URL for my VB CS form.
I add the 2 functional parameters.
I do not need to add the taskId parameter explicitly.




















I now apply the new form to the Approval step -


























I do the Data Mapping -













I now activate the Process and then test -











I now login to workspace to approve the new organization. This will be done via the external form from VB CS.











I check the network tab in chrome and see the url -

https://myOIC/ic/builder/design/MyVBCSApp/1.0/preview/webApps/org-approvalapp/?param_orgName=HOTD&param_orgCountry=UK&taskId=200668



Monday, March 11, 2019

#693 iPaaS update from Gartner and it looks good for Oracle














Read all about it here

It is very interesting, also in respect of RPA.

#692 OIC - Subscribing to Fusion ERP Events - setup

Some more details -

We need to do some work on the ERP side to ensure events get propagated -

From the docs -

You must create a CSF key to subscribe to events in Oracle ERP Cloud. This key is
required by the event handler framework when it invokes the integration. The
credentials of the integration are managed by the CSF key. Create the CSF key in
Oracle SOA Composer.

Open SOA Composer on the ERP pod -







I click "Manage Security"












Note the csf-key is a concatenation of
the OIC Identity Domain and the OIC Service Instance.

You can get these values by clicking the About box in OIC-Integration.













I don't usually read the docs but in this case, it did prove useful.
Not only for the csf-key stuff above.

Click here for the ERP adapter doc.

Also - to find a list of the events supported -




















You can get a list of who is subscribed to which events via the following REST request -

https://yourERPEnv/soa-infra/PublicEvent/subscriptions/

e.g.
{"subscriptions":[{"csfKey":"yourCSFKey","endpointURL":"https://yourOICEnv:443/ic/ws/integration/v1/flows/erp/yourERPIntegration/1.0/","filter":"$eventPayload/ns2:result/ns0:Value/ns0:PurchaseOrderLine/ns0:ItemDescription="DHL"","name":"{http://xmlns.oracle.com/apps/prc/po/approval/PrcPoApprovalComposite/PurchaseOrder}PurchaseOrder",


You can also delete subscriptions, via the REST API



Monday, March 4, 2019

#690 Extending Oracle HCM with OIC

Here is a simple demo I created for a customer.
The use case: Process new hires from HCM in a custom app.

Ok, in order words, a simple SaaS extension app.
I decided to use Visual Builder(VB CS) here, well that's not really the whole truth - this is what the customer wanted to see.

Here's essentially what I did -

1. Created an app in VB CS. This app contained the following business object.


















This business object contains the fields from the HCM Atom Feed to which I will subscribe.
I also created a couple of pages to manage the employee -




















main-start displays a list of all employees.
main-edit-employee - displays an employee in edit mode.
This page also offers us the opportunity to retrieve the full employee details from HCM -


 












Note the GetDataFromHCM button. I use the HCM REST api to retrieve the emp data.
I will also use the REST api to update the said employee in HCM.

Here is the Service Connection I use.
































The key for the GET is the personId, contained in the Atom Feed.

The GET request returns the following structure - a very long structure, which I have shortened for readability. Essentially all employee attributes are returned.

{
    "items": [
        {
            "Salutation": null,
            "FirstName": "Frankie",
            "MiddleName": null,
            "LastName": "TSOAPUI_LName10031",
          ...
         
            "WorkEmail": "TSOAPUI_10031@test.com",
            "AddressLine1": null,
            "AddressLine2": null,
            "AddressLine3": null,
            "City": "Harmonstown",
           ...
            "PersonId": 300000172272525,
            "EffectiveStartDate": "2019-03-01",
            ...
            "WorkerType": "E",
            "links": [
                {
                    "rel": "self",
                    "href": "https:/yourHCM/emps/00020000000EACED00057708000110D93BB36B8D0000004AACED00057372000D6A6176612E73716C2E4461746514FA46683F3566970200007872000E6A6176612E7574696C2E44617465686A81014B59741903000078707708000001694600040078",
                    "name": "emps",
                    "kind": "item",
  ...

The composite key is the hash value highlighted above - 002...
This key is required when updating the employee.

Now to the page that allows me to update the employee - I just display the City value here -











Note - I display the EmpID in "disabled" mode. Just to show that I have stripped off the leading url returned by the GET.

That I do as follows - thanks to my colleague David K. for the code.














My version worked, but was much more pedestrian.

I call this (Call Module Function) in the following EventChain - triggered when I click GetDateFromHCM -

























As you can see, I assign the result of the function call to an application variable - var_hcmid.

The EmpID field on my screen is set to this -















2. Created an Integration that subscribes to the Atom Feed -


























The HCM Adapter invoke is configured as follows -


































I then leverage a connection based on the VB CS Employee Object REST API, to update the aforementioned.
















That's it.

3. To Test - I simply select the Integration menu option - Submit Now.











I check the Employees - I now have 13 rows -











I run the VB app and select a new employee - I click GetDataFromHCM -

The city is Harmonstown -












I change to Howth and click Update City -












I validate via Postman -