[OIC] How to wait for the completion of the previous job triggered in Oracle Fusion before submitting the next job using OIC Integration?

 


This post will show how to wait for the completion of the previous job triggered in Oracle Fusion before submitting the next job using OIC Integration.


Let's take the example of the integration that submits Create Accounting ESS Job in Oracle Fusion for multiple ledgers using Cloud ERP Adapter. In this case, we may want to wait for the completion of the previous run of Create Accounting Job before triggering the next run for a different ledger. So, to implement this solution we will build the integration flow in the below fashion:




Below is the outline of the above flow

  1. When the Create Accounting process is triggered using the Cloud ERP Adapter it returns the Request ID of the job.
  2. Initialize a variable L_JOB_STATUS with "" which will store the current status of the triggered job 
  3. Use the while activity which will check whether the Job is completed or not by checking the current value of the L_JOB_STATUS 
  4. Put a wait activity for about 30 seconds
  5. Using the Cloud ERP Adapter again fetches the current status of the job 
  6. Update the variable L_JOB_STATUS with the current status returned by the Oracle Cloud ERP Adapter
  7. Repeat steps 4 to 8 until the Job completed by checking the current value of the L_JOB_STATUS 

Below is the configuration of each activity:

  • AssignJobStatus

  • WhileJobCompletes

  • Wait

  • Map to GetJobStatus



  • GetJobStatus





  • UpdateJobStatus


Comments