X

The Integration blog covers the latest in product updates, best practices, customer stories, and more.

Overriding Schedule Parameters

Arya Sanyal
Software Development Director

A quick recap on schedule parameters

Schedule Parameter feature supports adding scalar variables for Scheduled Orchestration Integrations. These parameter values are available across scheduled runs for the particular Integration and can be overridden by downstream actions like Assign. A maximum of five schedule parameters can be defined per Integration.

Requirements like the following can be achieved by using schedule parameters:

  1. Maintaining the Last Run Time (position) of the scheduled integration to avoid duplicate processing of data.
  2. Process information for specific directory/area/region.

As mentioned above, schedule parameters can be updated in the orchestration by using Assign.

Please refer Oracle Documentation for more details about this feature.

 

How to override schedule parameters

Today if user wants to invoke a Scheduled Integration (containing schedule parameters) with different parameter values, they need to deactivate the Integration, configure a new default value and activate it back.

Schedule parameter override feature enables user to provide parameter values while invoking the Integration without deactivating it. This feature is controlled by feature flag oic.ics.console.schedule.parameter-override-support.

Once the feature is enabled, a popup will be displayed when user clicks Submit Now or Start Schedule - for Integrations that have schedule parameters defined. Users can view the Default and Current Value of parameters and, if required, input a New Value to override the Current/ Default values.

The New Value field is optional. If no new values are specified then Current Value will be considered for next Run. If Current Value is also empty then Default Value will be considered.

 

If the integration updates these schedule parameter values using Assign, then the updated value will be saved and will become the Current Value for the next Run.

 

Schedule parameter values for Submit Now and Scheduled Runs

Typically for a given Integration, schedule parameter values for Submit Now and Start Schedule use cases are not shared.

So if user defines new schedule parameter values as part of Submit Now operation it will be saved and shown as Current Value for all subsequent Submit Now operations. It will not impact the saved parameter values of Start Schedule.

In certain usecases, it might be required to share schedule parameter values between a scheduled Run and a Submit Now Run. To enable sharing, Run as part of schedule checkbox needs to be enabled when doing a Submit Now operation. Below image shows the option:

Note: Run as part of schedule checkbox shows up only if there is a schedule defined for the integration.

Based on the checkbox selection, appropriate Current Value and Default Value will be displayed in the table.

 

Updating schedule parameter values of a scheduled Run after starting schedule

Schedule parameter values of a scheduled Run can be updated in-between Runs. In order to do this, use the menu item Update Schedule Parameters in the Schedule and Future Runs page. This will launch schedule parameter popup and allow updating the values which will be used for the next Run.

Note: If any Run is in running state then update operation is not allowed. Updating parameter values is only allowed in-between Runs as mentioned above.

REST API:

Configure Schedule Parameter: 

Schedule parameters can be passed while submitting job using REST API.

$ curl -1 -u <username>:<password> -k -v -X POST -H 'Content-Type:application/json'  -d '{"runAsSchedule" : true/false,"parameters":[{"name": "<param_name_1>","value": "<value of param_1>"},{"name":"<param_name_2","value":"<value of _param_2"}]}' https://<hostname>/ic/api/integration/v1/integrations/<Integration_code>%7C<integration_version>/schedule/jobs

Note:

runAsSchedule is optional parameter and it is required if user decides to submit job as part of schedule. 

parameters  indicates the schedule parameters and user can pass the value for one or more schedule parameters. This is an optional field.

Updating schedule parameters between runs:

Below REST API allows users to update schedule parameters in between runs of a scheduled run. User can update one or more schedule parameter values using this API.

$ curl -1 -u <username>:<password> -k -v -X PATCH -H 'Content-Type:application/json'  -d ‘{"parameters":[{"name": "<param_name_1>","value": "<value of param_1>"},{"name":"<param_name_2","value":"<value of _param_2"}]}' http://<hostname>/ic/api/integration/v1/integrations/<Integration_code>%7C<integration_version>/schedule/parameters

 

 

 

Join the discussion

Comments ( 10 )
  • Hina Shaikh Monday, December 24, 2018
    Hi,

    It's a nice blog.Could you please also explain from what version onwards it is available and how to enable this feature in your current ICS environment.

    Thanks,
    Hina
  • Arya Thursday, February 28, 2019
    Hi Hina,

    This functionality is available only in OIC. And is available all OIC environments.

    It is not available in ICS.

    The feature flag to enable the feature is mentioned in the blog. You need to raise an SR to get this feature flag enabled for your OIC environment.

    Thanks,
    Arya
  • Rishabh Wednesday, July 17, 2019
    Hi Arya,

    In case , I want to schedule integration to run for two areas "EMEA" and "APAC" (considering area is my scheduled parameter).
    How can I pass two different value of 'area' in one schedule ? I want my integration to run daily 5pm for both EMEA and APAC.

    Regards,
    Rishabh
  • Arya Thursday, July 18, 2019
    Hi Rishabh,

    Are there two separate integrations - one for "EMEA" and another for "APAC"?

    Or do you have a singular integration modeled for both areas?

    Thanks,
    Arya
  • Arya Thursday, July 18, 2019
    Hi Rishabh,

    One way to achieve your usecase is to have 2 separate integrations - say ScheduleAreaJob and ExecuteArea.

    1. ExecuteArea defines a schedule parameter "area" and has a switch case logic that checks for the value of "area".
    2. The first branch of the switch has the logic to execute for "EMEA" area. And the second branch has the logic for "APAC".
    3. The second scheduled Integration "ScheduleAreaJob" can call ExecuteArea twice using the Call Integration action. First time it calls ExecuteArea and passes "EMEA" as the value of schedule parameter "area".
    4. Second call of ExecuteArea passes "APAC" as the value of schedule parameter "area".
    5. Now define a schedule for ScheduleAreaJob and configure it to run every day at 5:00PM.

    This will ensure ExecuteArea gets called twice - once for EMEA and next for APAC at 5:00PM.

    Hope this helps. Feel free to ask questions if you have any.

    Thanks,
    Arya
  • Rishabh Thursday, July 18, 2019
    Hi Arya,

    Thank you very much for your suggestion.

    Actually I was looking to use single integration to schedule for both the areas.
    But anyways looks like (from below meta-link) that we can not schedule same integration twice so there is no point of over-riding the schedule parameter in my use-case. Either I have to clone the same integration or add one more integration (for schedule) as you suggested above.

    https://support.oracle.com/epmos/faces/DocContentDisplay?_afrLoop=357771499007560&id=2520103.1&_afrWindowMode=0&_adf.ctrl-state=g12gsb28r_251

    Thanks & Regards,
    Rishabh
  • Hemanth Lakkaraju Thursday, July 18, 2019
    Can you confirm if this proposal is recommended for above issue?

    https://cloudcustomerconnect.oracle.com/posts/82cf35aedb?commentId=269853#269853
  • Arya Thursday, July 18, 2019
    Hi Hemanth,

    Yes your solution should also work. Care should be taken while modeling to avoid any infinite loops that might occur due to this recursive call.

    Would suggest to start with a simplistic usecase locally and then incrementally improve it to support the end goal.

    Thanks,
    Arya
  • Mike Harrison Friday, September 20, 2019
    How do you use this feature to keep track of a run date? Do we set the run date as a schedule parameter, and then update it at the end of the job or the beginning of the job? Is there a way to increment a date by one day in the Assign?
  • Arya Monday, September 23, 2019
    Hi Mike,
    What is your usecase for the run date? Can you please elaborate?

    In Assign, you can use the current date function and increment it by one.
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.