Sooner or
later, someone in the business asks to run an integration "from
Fusion", without logging in to OIC. They want a button they already know: Schedule
New Process, and the team that owns the integration wants to decide exactly
who is allowed to run it.
This post shows
one way to do that. A custom ESS job runs a BI Publisher report, the report
calls an OIC integration over REST, and a custom role controls who can submit
the job. I will walk through each piece with screenshots from a working setup,
including a small "router" integration in OIC that lets one ESS job
trigger many different integrations.
The idea in one picture
|
Step |
Where |
What happens |
|
1 |
Fusion, Scheduled Processes |
A user submits the custom ESS job and fills in a few
parameters, such as the integration ID. |
|
2 |
Fusion, BI Publisher |
The ESS job runs a BIP report. The report's data model has
an HTTP data set that calls OIC. |
|
3 |
OIC, router integration |
A REST-triggered wrapper integration receives the call and
reads the full parameter list back from the ESS request. |
|
4 |
OIC, target integration |
The wrapper looks up which integration the ID belongs to
and invokes it, even if it sits in another project. |
|
|
The Benefits
|
Benefit |
What it means in practice |
|
No OIC access for users |
Business users submit a Fusion process. They never need an
OIC login or any knowledge of OIC. |
|
Access controlled by a custom role |
Only people who hold the role can submit the job. Add or
remove the role, and access changes with it. |
|
Familiar screen |
Users work in Scheduled Processes. They get parameters,
scheduling, status and history without any new tool. |
|
Built-in audit trail |
Every run is an ESS request with a submitter, a submission
time, parameters and a status. |
|
One entry point, many integrations |
A router integration chooses the target from a lookup, so
adding a new integration does not need a new BIP report. |
|
Credentials stay out of the user's hands |
The service account that calls OIC lives in the BIP data
source, not with the person who clicks submit. |
The BIP side
Create an HTTP data source to OIC
In BI
Publisher, open Administration > HTTP and add a data source that
points at your OIC instance. Here it is named OIC_RESTAPI.
HTTP data sources in BI Publisher
administration
Open it to see
the settings:
The OIC_RESTAPI data source settings
|
Setting |
Value used here |
|
Server protocol and port |
https, port 443 |
|
Server |
Your OIC instance host name |
|
Session timeout |
10 minutes |
|
Username and password |
A dedicated OIC service account that is allowed to call the
integration |
|
Allowed roles |
BI Consumer Role, so report users can run reports that use this
source |
Treat the
username and password as a secret. Create a separate service account for this,
give it only the OIC role it needs, and review who can use the data source
through the allowed roles list.
Create the data model and the report
Under the
shared catalog, create a data model and a report that uses it. Both live in a
custom folder so they are easy to secure and migrate.
The report and its data model in the
catalog
The data model
is the important part. It holds the parameters, the HTTP data set and one list
of values.

The data model: one data set, one list of
values and the parameters
|
Element |
Purpose |
|
TestOIC (data set) |
The HTTP data set that calls the OIC REST endpoint |
|
INTID |
The integration ID, which tells the router which
integration to run |
|
Parameter1 to Parameter10 |
Generic parameters that the target integration can use
however it likes |
|
fusionapps_request_id |
The ESS request ID of the current run, filled in by the
list of values below |
Configure the HTTP data set
Add a new data
set of type HTTP. Point it at the data source and give it the URL suffix of the
OIC integration.

The HTTP data set that calls the OIC
integration
|
Field |
Value |
|
Data source |
OIC_RESTAPI |
|
Method |
GET |
|
URL suffix |
ic/api/integration/v2/flows/rest/project/TEST_MASTER_PROJ_POD1/TEST_COMMON_ESSINVOC_SERVICE/1.0/ESSInvocationService |
|
Parameters |
Each name (INTID, Parameter1, Parameter2 and so on) is mapped to the data model parameter of the
same name |
The URL suffix
has a fixed pattern: project name, then integration identifier, then version,
then the REST resource path of the integration's trigger. You can copy it from
the integration's endpoint details in OIC.
Capture the ESS request ID
The data model
has one list of values. It is a SQL query against the Fusion database that
returns the ID of the ESS request that is running the report:

The list of values that returns the
current ESS request ID
select FND_JOB.REQUEST_ID from
dual
That value is
passed to OIC as the request ID.
Create a report using the above datamodel
The custom ESS job
Now wrap the
report in an ESS job definition, because that is what users will actually
submit. In the Setup and Maintenance work area, search for the task that
manages scheduler job definitions.
Searching for the Manage Enterprise
Scheduler Job Definitions task
Open Manage
Enterprise Scheduler Job Definitions and Job Sets for Financial, Supply Chain
Management, and Related Applications and create a job definition. This is
the first example, with three parameters:

A custom ESS job definition that runs the
BIP report
|
Field |
Value |
|
Display name and name |
A clear business name, and a unique code that starts with
the integration ID |
|
Job application name |
FscmEss |
|
Job type |
BIPJobType |
|
Class name |
oracle.xdo.service.client.scheduler.BIPJobExecutable |
|
Report ID |
/Custom/REP/Integrations/Common/OICTrigger/PROD1/PROJECT/TEST_OIC_Common_REST_Trigger_Report.xdo |
|
Allow multiple pending submissions |
True |
|
Enable submission from Scheduled Processes |
Ticked, so users can find the job in the process list |
The Report
ID is the catalog path of the BIP report, ending in .xdo. The parameters tab defines what the
user sees on the submission screen. Here the first parameter is the integration
ID, which can carry a default value so the user does not have to type it.
A second job
definition shows another flavour, with parameters named for the process it
triggers:

A second ESS job definition with its own
parameter prompts
|
Parameter prompt |
How it is used |
|
Integration Flow / Integration ID |
Required. Sent to OIC as the first argument and used to
pick the target integration. A default value avoids typing mistakes. |
|
Parent OIC Instance ID |
Optional text box, useful when a parent integration needs
to be tied to this run |
|
Start Period and End Period |
Optional lists of values, passed on as parameters to the
target integration |
Each parameter,
in order, becomes an argument of the ESS request: the first is argument1, the second argument2, and so on. That
matters in Part 3.
Let us Run it and see what happens
Submit the job
From Scheduled
Processes, a user clicks Schedule New Process, picks the job, fills
in the parameters and submits. After a short wait the request shows as Succeeded.

The ESS request in Scheduled Processes,
with status Succeeded
Open the
request and scroll to its Parameters section to see exactly what was
submitted:

The parameter values of the ESS request
Here argument1 holds the integration
ID, and the unused arguments are null.
Check it in OIC
In OIC, open
the project and go to Observe. The wrapper integration shows the calls
it received, and all of them succeeded in this example.

Observe: the wrapper integration and its
run counts
The Instances
tab shows each run with its primary identifier. The integration ID from the ESS
job appears there, which makes a run easy to find.

Observe: each instance carries the
integration ID as its primary identifier
The OIC router integration
This is where
one ESS job becomes useful for many integrations. Instead of calling each
target directly, the BIP report always calls the same wrapper, and the wrapper
decides what to run.

The wrapper integration, from trigger to
response
|
# |
Action |
What it does |
|
1 |
REST trigger (getTriggerRequest) |
Receives the call from the BIP report |
|
2 |
Throw new fault (ThrowTargetNotFound) |
Fails cleanly if the integration ID is not in the lookup |
|
3 |
Map, then REST invoke (query_parameters) |
Calls the ESS REST API to read the request's submitted
parameters |
|
4 |
Map (InvokeTargetWrapperService) |
Builds the payload for the target and looks up which
integration to run |
|
5 |
Integration action |
Invokes the target integration dynamically |
|
6 |
Map, then return |
Builds the Status and StatusMessage response |
The trigger
The trigger is
a REST endpoint that accepts GET with query parameters, matching the parameters
the BIP data set sends.

Trigger: resource URI and GET action

Trigger: the query parameters (INTID,
Parameter1 and so on)
It returns a
small JSON response, so the report always gets a clear answer:

Trigger: the response sample
{ "Status" :
"", "StatusMessage" : "" }
Read the parameters back from ESS
The BIP report
only passes a handful of values. The ESS request knows all of them. So the
wrapper calls the ESS REST API for the request that triggered it.

REST invoke to the ESS scheduler API
GET
/ess/rest/scheduler/v1/requests/{requestid}?fields=requestParameters
The request ID
comes from the trigger, which is why Step 4 in Part 1 captured it. Setting fields=requestParameters keeps
the response small: it returns only the list of submitted parameters.
Map ESS arguments to the target payload
This mapper
turns the ESS arguments into the payload for the target integration.

The mapper from the ESS parameters to the
target request
|
ESS request parameter |
Target payload field |
|
submit.argument1 |
IntID |
|
submit.argument2 |
Parameter_1 |
|
submit.argument3 |
Parameter_2 |
|
... and so on up to submit.argument21 |
... up to Parameter_20 |
Each parameter
uses the same pattern: if the argument has a value, pass it on, otherwise pass
the text null.
That gives the target integration a complete, fixed-shape payload every time.
<xsl:choose>
<xsl:when
test="$query_parameters/.../requestParameters[ns30:name =
'submit.argument2']/ns30:value != ''">
<ns33:Parameter_1>
<xsl:value-of
select="$query_parameters/.../requestParameters[ns30:name =
'submit.argument2']/ns30:value"/>
</ns33:Parameter_1>
</xsl:when>
<xsl:otherwise>
<ns33:Parameter_1><xsl:value-of
select="'null'"/></ns33:Parameter_1>
</xsl:otherwise>
</xsl:choose>
Pick the target from a lookup
The same mapper
decides which integration to call. It reads three values from an OIC lookup
named CommonRouterServiceOICLookup,
keyed by the integration ID:
dvm:lookupValue("CommonRouterServiceOICLookup",
"IntegrationID", <INTID>, "WrapperServiceName",
"")
dvm:lookupValue("CommonRouterServiceOICLookup",
"IntegrationID", <INTID>, "Version", "")
dvm:lookupValue("CommonRouterServiceOICLookup",
"IntegrationID", <INTID>, "ProjectCode",
"")
|
IntegrationID |
WrapperServiceName |
Version |
ProjectCode |
|
INT100 |
TEST_INT100_WRAPPER_SERVICE |
01.00.0000 |
TEST_PROJECT_A |
|
INT200 |
TEST_INT200_WRAPPER_SERVICE |
01.00.0001 |
TEST_PROJECT_B |
The rows above are examples. Because the project code is part of the lookup, a target in another project works just as well. To add a new integration, you add a row to the lookup. The BIP report and the wrapper do not change.
Control who can run it
This is the
benefit that ties everything together. Each layer has its own control, and the
custom role is how you grant access to the whole chain.
|
Layer |
How it is controlled |
|
ESS job |
Only roles with the privilege to submit this job definition
can run it. We can have privilege and suty role. |
|
BIP report and data model |
Folder and object permissions in the catalog, plus the
allowed roles on the HTTP data source |
|
OIC call |
The service account in the data source. Users never see or
use it. |
|
Target integration |
The lookup decides which integrations are reachable from
the router |
To set it up:
1.
Create a custom role, for example TEST_OIC_INTEGRATION_SUBMITTER.
2.
Give the role the privilege to submit your custom ESS
job.
3.
Give the role access to the BIP report folder and the
data source, so the job can actually run.
4.
Assign the role to the users who should be able to
submit the job. Everyone else will not see the job at all.
5.
Test with a user who has the role, and one who does
not.
With a data
source, a data model, an ESS job and a router integration, we have turned any
OIC integration into a normal Fusion process that the right people can run on
their own. The custom role is what makes it safe to hand out. Start with one
integration, prove the path end to end, then add the rest as rows in the
lookup.





