Tuesday, July 13, 2021

OIC - Schedule parameters to get last run Date and Time

Introduction of schedule parameters:
  • Scheduled parameters are available across all scheduled runs of an integration and can be used to facilitate processing of data from one run to the next run for example, When performing batch processing, a scheduled parameter can be used to track the current position of batched data between runs.
  • Max 5 variables can be added.
  • Last time and date of the schedules integration to avoid the duplicate processing of data.

UseCase: We will create a schedule parameter lastRunDateTime and initialize with '' and log the last run date time and update the lastrundatetime with the schedulestartTime.

Detailed Steps:

Step1: Create a schedule orchestration integration and clicked on the Schduled icon and select Edit.

Step2: In the parameter name, click plus icon and enter a name lastRunDateTime and default value like ''. And close it.

Step3: drop logger activity and select Always as radio button and click on edit expression icon and below expression:
concat("last run date and time: ", $lastRunDateTime)

Step4: From the actions, add a assign activity and select the created selected parameter "lastRunDateTime" and add the value as startTime of the schedule. Validate and close.

Step5: add the tracking , save and activate and test

Run 1st time and see , lastRuntime is empty

Run 2nd time and see, lastRuntime is last start time of the schedule.

Run again and see, lastRunDateTime is the last start time of the schedule.

Run again and we can also update the lastRunDateTime.

No comments:

Post a Comment

Featured Post

11g to 12c OSB projects migration points

1. Export 11g OSB code and import in 12c Jdeveloper. Steps to import OSB project in Jdeveloper:   File⇾Import⇾Service Bus Resources⇾ Se...