For partners that build or integrate commercially available applications and service solutions with the Oracle Cloud Platform
For partners that provide implementation or managed services around Oracle Cloud Applications
Hi Everyone,
I'm calling a child Integration from a main Integration via the REST connection, based on the URI for my child Integration. but I need to pass a value from the main integration to the child, and then the child to use this parameter variable.
I am assuming this is possible?
If it is, does anyone have any experience with this that they can share?
Thank you as always.
Mark.
Calling another ICS rest-based integration is exactly same as calling any external rest api. You can configure child integration trigger (rest adapter) with a template parameter or query parameter and you can pass this from Parent flow.
Hi Hemanth,
how would the parameter relate in the Child Integration?
Do we define a Variable in the Child Integration, and ensure the parameter name I pass from the main integration matches the variable in the child?
any detail instructions / examples would be very much appreciated.
thank you.
Mark
It is possible, no different to calling another service I believe we covered in the book and there are advanced illustrations in the resources from 3rd parties - https://urldefense.proofpoint.com/v2/url?u=https-3A__oracle-2DIntegration.cloud&d=DwIFAg&c=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE&r=MXYbTzTshRc5epJxhBYWZ4WjZFeYrTxE5mIacleO5S8&m=KcvDR3XoCLOFrFOV3Y1SX2nQQ4MlJi-XNZgt0NgDzCQ&s=qMF5Y0DD8mj9DCM-5-EOOQodjoUXutLMI4_F7A1AiaU&e=
True. You can pass parameters via URI, query params, header or body depending on the use-case.
There are, as Phil mentioned, many books discussing best practices on when to use each of these in REST calls. All are possible and easy to do in OIC.
Have fun.
-John
Yes you can call child integration from main integration. Here I did it for my project. Here I am sending you screen shots. Hope this will help you.
Hi Hemen
how would the parameter relate in the Child Integration?
Do we define a Variable in the Child Integration, and ensure the parameter name I pass from the main integration matches the variable in the child?
any detail instructions / examples would be very much appreciated.
thank you.
Mark
Thanks All
I'm glad to learn this is possible, as I expected. However I'm new to using OAICS and very new to using REST API call's.
I'm sure I can figure out how to pass a parameter in the REST adapter config, but how would the parameter relate in the Child Integration?
Do we define a Variable in the Child Integration, and ensure the parameter name I pass from the main integration matches the variable in the child?
any detail instructions / examples would be very much appreciated.
thank you.
Mark
Hi Guys
thanks for the help so far...
I've added a word doc, screen shot showing my attempts at defining a template parameter within my REST connection config, within my main integration... this REST connection obviously invokes my child Integration...
however, when I run my integration with this template parameter defined as it is, my integration errors with the following;
: Fault Details : <nstrgdfl:APIInvocationError xmlns:nstrgdfl="http://xmlns.oracle.com/cloud/generic/rest/fault/REST/CallChildInteg"><nstrgdfl:type/><nstrgdfl:title/><nstrgdfl:detail/><nstrgdfl:errorCode/><nstrgdfl:errorDetails><nstrgdfl:type>http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.6</nstrgdfl:type><nstrgdfl:title>Method Not Allowed</nstrgdfl:title><nstrgdfl:errorCode>405</nstrgdfl:errorCode><nstrgdfl:errorPath><![CDATA[POST https:/xxxxxxxxxxxxxxxxxxxxxxx.oraclecloud.com/ic/api/integration/v1/integrations/PO_UPDATE_BUSSER_MC_DEV1%7C01.00.0000/schedule/jobs/TESTfromOAICS returned a response status of 405 Method Not Allowed]]></nstrgdfl:errorPath><nstrgdfl:instance><![CDATA[Method Not Allowed]]></nstrgdfl:instance></nstrgdfl:errorDetails></nstrgdfl:APIInvocationError> :Application Error
any advice greatly appreciated on this error - and then also, how I can reference this parameter in my child integration.
thanks as always
Mark
So you want to invoke a scheduled integration as a child? Did you look at this on how to use? I would suggest first try to test it standalone so that way you can easily get to know how to configure this as an invoke in parent.
Calling schedule integration as a rest call is slightly different to calling another rest-based integration in terms of passing parameters. While the latter use template parameters or query parameters in URL as parameters, former requires parameters to be passed in payload as an array like below (I've not tried though):
I assume, from above error TESTfromOAICS is the parameter value to be passed here and I would assume testScheduledParam will be the scheduled parameter name you created for the scheduled flow. With these assumptions,
The URI should be: https:/xxxxxxxxxxxxxxxxxxxxxxx.oraclecloud.com/ic/api/integration/v1/integrations/PO_UPDATE_BUSSER_MC_DEV1%7C01.00.0000/schedule/jobs
The Body should be:
{
"action":"NOW",
"parameters":[
{
"name":"testScheduledParam",
"value":"TESTfromOAICS"
}
]
}
Hi Hemanth,
Currently my child Integration is a scheduled integration yes...
It is simply calling a BIP Report, decoding and then sending the output to an SFTP Server... I've taken the URI from this Integration and created a REST Connection in OAICS pointing to it. Then I've dropped this REST Connection into my main Integration in order to invoke it. This works as long as I am not trying to pass parameters as described.
My child Integration does not need to be a scheduled Integration. However, if I create a new child integration as an Orchestrated Integration - what would be my trigger for this? and how would I then call from my main integration?
If can figure this out, I will attempt with template parameters...
I will also attempt using the payload option for a scheduled Integration...
How then, in either case, does my child integration reference the parameters passed to it?
Finally, I've just come across this article:
How to invoke an Integration From another Integration in OIC without creating a connection
https://blogs.oracle.com/integration/how-to-invoke-an-integration-from-another-integration-in-oic-without-creating-a-connection
This looks an option for me, but I'd like to understand how to pass parameters manually via REST also...
thanks for your help
Mark
If child is another REST-based integration having EndpointURL --> https://host:port/ic/api/integration/v1/flows/rest/CHILDFLOW/1.0/testTemplateparam?testQueryparam=test
Below is the configuration for Parent Invoke REST Connection:
Connection URL: https://host:port/ic/api/integration/v1
URI: /flows/rest/CHILDFLOW/1.0/{testTemplateParam}
QueryParams: testQueryparam (type string)
Request and Response --> based on payload configured for child trigger.
If child is another Scheduled Orchestration-based integration having EndpointURL --> https:/host:port/ic/api/integration/v1/integrations/SCHFLOW%7C01.00.0000/schedule/jobs and have scheduled params as schParam1 as String
Below is the configuration for Parent Invoke REST Connection:
Connection URL: https://host:port/ic/api/integration/v1/flows/rest
URI: /integrations/SCHFLOW%7C01.00.0000/schedule/jobs
Request: JSON as specified in above format
The parameter name in payload should match exactly as the parameters configured in the child integration.
Mark,
I find it odd that the blog entry you refer to points to a flag feature not mentioned in the OIC docs.
Also, that blog entry shows how to create a rest service with parameters and should serve as a reasonable example for your question. The sample Hello World serves as the example receiving parameters and this blog shows how to call it.
Hemanth, below, shows how to use the query parameters.
-John
Hello Hemanth,
We are triggering schedule integration through rest API the similar way as .
https:/xxxxxxxxxxxxxxxxxxxxxxx.oraclecloud.com/icsapi/integration/v2/integrations/TEST_SCHEDULE%7C01.00.0000/schedule/jobs that execute it synchronously one after other for multiple requests.
Now we need to pass parameters while we trigger the schedule integration. I tried your suggestion in the post above. But it is not working for me. One difference is now the API version is v2.
Following is body I used while triggering the scheduled integration.
Regards,
Vasanth Mahendran
1. The endpoint is wrong. There is no such pathURI - /icsapi/integration/v2/integrations
2. If you are referring to this API, then it is ICS v2 API that doesn't support parameters.
3. Parameters through rest call are supported only in OIC version of APIs.
Do check out recent blog that can allow integration calling another integration differently and is optimized: https://blogs.oracle.com/integration/how-to-invoke-an-integration-from-another-integration-in-oic-without-creating-a-connection
Hi,
What is the best approach to invoke a local integration from another in AIC? Is that using the integration activity or using a rest adapter?
Thank You
Sajeena
Depends on the use case. Using the activity saves maintenance of a connection and credentials while using adapter will give the opportunity to use features supported by adapter.
Hi,
I am not able to see Integration Activity in my Integration. Anything we need to enable to use Integration Call in our integration. I am using 19.2.3 version OIC.
Ideally this features should be available in 19.2.3 if not you will have to raise SR and get it enabled.
You can refer blog for any issues.
Yes you can call child integration from main integration. Here I did it for my project. Here I am sending you screen shots. Hope this will help you.