Friday, July 6, 2018

#639 AIC - VB CS calling Process Part 2

Part 2 of this mini-series covers the Process relevant snippets available with VB CS.

You can see them here -





The full list of operations available is as follows -


















A variation of this is offered at Page/Action level -






































Ok so how do Snippets this work?

I create a new page called myDeployedProcesses -













I go to the Code view of the page -











I will copy and paste the code snippet in here - so again, here is the html for the snippet



































Let's switch to the design view of the page -



















As you can see, we have some errors on the page - essentially we need to provide some metadata
that defines the data provider, i.e. our Process instance, for this page.

Back at the Snippets, you can see another tab for json - here is the metadata definition















We need to add this json code to the page.

Here is the default definition -



















Here it is, after copy and paste -






















Here is the page in design mode -

























I will now call this page from my main page - by clicking a button.
Here is the Action -








































I test -





























Thursday, July 5, 2018

#638 OIC REST API

Another look at the REST API and the areas it covers -






















We have a situation today where we have v1 and v2 APIs.
OIC V1 and ICS V2.

OIC V1 -











ICS V2 -

























Tip: Use ICS v2

The base URL is highlighted in blue below -
















Let's try out some of them -

Environment 

https://baseUrl:443/icsapis/v2/environment



















https://baseUrl:443/icsapis/v2/environment/trackingdb

returns salient information, such as retention period etc.
























I can use the following API to purge the tracking DB -

/icsapis/v2/environment/trackingdb/purge

Connections 




















Here I retrieve my connections and test my Service Cloud connection

/icsapis/v2/connections



























Note the ID:  "id": "AANC_SERVICECLOUD",

/icsapis/v2/connections/AANC_SERVICECLOUD

gives me some more details -
























I can test the Connection via the following request -

/icsapis/v2/connections/AANC_SERVICECLOUD/test
















The test is just a ping on the wsdl.


Integrations























Here is an example of retrieving integrations and the all important id-

/icsapis/v2/integrations

























id is simple a concatenation of integration name and version number.


Now let's clone it using -


/icsapis/v2/integrations/{id}/clone












Validate in OIC -





















As we say in Ireland, great stuff!



#637 SSI invoking OIC

Self Service Integration is our compelling new offer, targeting line of business folks.
With SSI, they can easily create their own "personal" integrations; in SSI speak - recipes.

However, they can also leverage existing business processes and integrations, running on OIC.

Here is a simple example -














This integration creates a new organization in Service Cloud, after checking that the organization doesn't already exist.





























So let's call this from SSI - the use case is as follows:

Someone registers for an event in EventBrite - they specify their organization, as part of the
registration process. Now SSI will pick up the Registration Event from EventBrite and then call the above integration.

Firstly, I create a connection to OIC/Integration in SSI -






























































I can now create a recipe leveraging this connection -

The Trigger definition is self-explanatory -

























Now to the Action -

As you can see, it calls my integration -
























Map the fields from EventBrite to the input parameters for the integration, and I'm finished!


Monday, July 2, 2018

#636 New JET based OIC Mapper
























Firstly, the new mapper expands the data structures veryquickly.



























Simple field to field mapping, also with target expression.

What about more complex mapping requirements?

Just click on toggle functions -






































No more having to do all of this on a separate page - much simpler!

Here I drop the concat() function on to the Industry/Name field




As you can see above, I get the basic concat syntax displayed.

Noow, I can simply drag and drop Source fields into the expression.




































Tuesday, June 26, 2018

#635 Autonomous OIC --> Process REST API

Some simple examples of leveraging the API here -

I am doing this to familiarize myself with things, before trying out Visual Builder CS integration with process.

Here is a process instance in OIC -




























Now to the REST API -

1.GET /ic/api/process/v1/processes
Retrieves process instance list.



























2. Add comments to the process -

POST /ic/api/process/v1/processes/{processId}/comments

As you can see from the first call, my process id is 30001.





















I validate in the worklist app -
























3. Retrieve a Process Instance

GET /ic/api/process/v1/processes/{processId}






























4. Retrieve the Task List

GET /ic/api/process/v1/tasks





























































5. Get Task 
GET /ic/api/process/v1/tasks/200023

Note the payload returned -

  "actionList": [
        {
            "length": 0,
            "title": "CREATE_TODO",
            "actionType": "System",
            "actionId": "CREATE_TODO"
        },
        {
            "length": 0,
            "title": "VIEW_PROCESS_HISTORY",
            "actionType": "System",
            "actionId": "VIEW_PROCESS_HISTORY"
        },
        {
            "length": 0,
            "title": "SKIP_CURRENT_ASSIGNMENT",
            "actionType": "System",
            "actionId": "SKIP_CURRENT_ASSIGNMENT"
        },
        {
            "length": 0,
            "title": "VIEW_TASK",
            "actionType": "System",
            "actionId": "VIEW_TASK"
        },
        {
            "length": 0,
            "title": "VIEW_TASK_HISTORY",
            "actionType": "System",
            "actionId": "VIEW_TASK_HISTORY"
        },
        {
            "length": 0,
            "title": "START_TASK",
            "actionType": "System",
            "actionId": "START_TASK"
        },
        {
            "length": 0,
            "title": "SUSPEND_TIMERS",
            "actionType": "System",
            "actionId": "SUSPEND_TIMERS"
        },
        {
            "length": 0,
            "title": "UPDATE_TASK_PAYLOAD",
            "actionType": "System",
            "actionId": "UPDATE_TASK_PAYLOAD"
        },
        {
            "length": 0,
            "title": "ACQUIRE",
            "actionType": "System",
            "actionId": "ACQUIRE"
        },
        {
            "length": 0,
            "title": "ESCALATE",
            "actionType": "System",
            "actionId": "ESCALATE"
        },
        {
            "length": 0,
            "title": "WITHDRAW",
            "actionType": "System",
            "actionId": "WITHDRAW"
        },
        {
            "length": 0,
            "title": "OVERRIDE_ROUTING_SLIP",
            "actionType": "System",
            "actionId": "OVERRIDE_ROUTING_SLIP"
        },
        {
            "length": 0,
            "title": "VIEW_SUB_TASKS",
            "actionType": "System",
            "actionId": "VIEW_SUB_TASKS"
        },
        {
            "length": 0,
            "title": "CUSTOM",
            "actionType": "System",
            "actionId": "CUSTOM"
        },
        {
            "length": 0,
            "title": "UPDATE",
            "actionType": "System",
            "actionId": "UPDATE"
        },
        {
            "length": 0,
            "title": "UPDATE_ATTACHMENT",
            "actionType": "System",
            "actionId": "UPDATE_ATTACHMENT"
        },
        {
            "length": 0,
            "title": "UPDATE_COMMENT",
            "actionType": "System",
            "actionId": "UPDATE_COMMENT"
        },
        {
            "length": 0,
            "title": "INFO_REQUEST",
            "actionType": "System",
            "actionId": "INFO_REQUEST"
        },
        {
            "length": 0,
            "title": "REASSIGN",
            "actionType": "System",
            "actionId": "REASSIGN"
        },
        {
            "length": 0,
            "title": "SUSPEND",
            "actionType": "System",
            "actionId": "SUSPEND"
        },
        {
            "length": 0,
            "title": "DECOMPOSE_TASK",
            "actionType": "System",
            "actionId": "DECOMPOSE_TASK"
        },
        {
            "length": 0,
            "title": "DELEGATE",
            "actionType": "System",
            "actionId": "DELEGATE"
        },
        {
            "length": 0,
            "title": "REJECT",
            "actionType": "Custom",
            "actionId": "REJECT"
        },
        {
            "length": 0,
            "title": "APPROVE",
            "actionType": "Custom",
            "actionId": "APPROVE"
        }
    ]

6. Update a Task
PUT /ic/api/process/v1/tasks/{id}

Here I will approve the task we have been looking at -







































7. Create a Process Instance -
























As you can see, I have 2 Start events - Message and Form

Start Message -

POST /ic/api/process/v1/processes

Start Message Payload is as follows -


















REST Request Payload -

The request payload will Require the process name, I need to call the following REST API to retrieve that

ic/api/process/v1/process-definitions




















The value I need is processDefId - 
 "processDefId": "oracleinternalpcs~NewOrgApprovalApp!1.0~NewOrderApprovalProcess",

I also need the Service Name -








 "serviceName": "NewOrderApprovalProcess.service"

Here is the payload -