multicloud365
  • Home
  • Cloud Architecture
    • OCI
    • GCP
    • Azure
    • AWS
    • IAC
    • Cloud Networking
    • Cloud Trends and Innovations
    • Cloud Security
    • Cloud Platforms
  • Data Management
  • DevOps and Automation
    • Tutorials and How-Tos
  • Case Studies and Industry Insights
    • AI and Machine Learning in the Cloud
No Result
View All Result
  • Home
  • Cloud Architecture
    • OCI
    • GCP
    • Azure
    • AWS
    • IAC
    • Cloud Networking
    • Cloud Trends and Innovations
    • Cloud Security
    • Cloud Platforms
  • Data Management
  • DevOps and Automation
    • Tutorials and How-Tos
  • Case Studies and Industry Insights
    • AI and Machine Learning in the Cloud
No Result
View All Result
multicloud365
No Result
View All Result

Solely Hyperion – Oracle Hyperion EPM weblog: Triggering Pipeline from Groovy Rule

admin by admin
April 20, 2025
in Data Management
0
Solely Hyperion – Oracle Hyperion EPM weblog: Triggering Pipeline from Groovy Rule
399
SHARES
2.3k
VIEWS
Share on FacebookShare on Twitter


For
instance, contemplate operating a
forecast pipeline in Oracle EPM, we regularly
cope with
a number of forecast durations that should be processed sequentially.

Nonetheless,
guaranteeing that every interval runs accurately, ready for earlier jobs
to finish
, and dealing with errors gracefully will be tough.

 

In
this the script ensures that every forecast interval is processed correctly,
one after the other, and prevents overlapping or conflicting jobs.

 

Why
Do We Course of Forecast Durations One by One?

 

Think about
you’re operating a forecast information load for a complete fiscal 12 months, the place
every interval represents a month or quarter.

 

#
You don’t need a number of forecast durations operating on the identical time—this
may trigger information conflicts.
# You must look forward to every job to
end earlier than beginning the subsequent one.

# If a job fails, you wish to detect it early and cease execution.

This
script does all of that
routinely!

Initializing
the Final Job ID

At
the beginning of the method, we initialize a variable to maintain monitor of the
final job that was submitted:

String
LAST_JOB_ID = “”  // Initialize

 

  • If a job
    remains to be operating, we look forward to it to complete earlier than beginning a brand new one.
  • If a job
    fails, we detect the failure and cease processing additional.
  • We use
    this variable to regulate job execution circulate.

 

Looping
Via Forecast Durations

We
loop by every forecast interval (as much as 8 durations on this case).

 

for
(int i = 1; i

    strive {

        println “Checking forecast interval
${i}”

 

  • The
    script iterates over 8 forecast durations one after the other.
  • For every
    interval, we retrieve essential particulars like:

 

Fetching
Forecast Interval Particulars

For
every interval, we retrieve the corresponding substitution variables:

String
monthVar = “Fcst_Per${i}”

String
yearVar = “Fcst_Per${i}_Yr”

String
quarterVar = “Fcst_Qtr${i}”

 

String
fcstMonth =
operation.software.getSubstitutionVariableValue(monthVar).toString()

String
fcstYear =
operation.software.getSubstitutionVariableValue(yearVar).toString()

String
fcstQuarter =
operation.software.getSubstitutionVariableValue(quarterVar).toString()

 

  • These
    values inform us which forecast interval we’re engaged on.
  • If the
    values are lacking or invalid, we skip the interval (as proven within the
    subsequent step).

 

Skipping
Durations That Don’t Match the Forecast 12 months

if
(fcstYear != forecastYear) {

    println “Skipping interval ${i} because it
doesn’t match forecast 12 months $forecastYear.”

    proceed

}

 

  • If the forecast
    12 months for the interval doesn’t match the anticipated 12 months
    , we skip it.
  • This
    prevents us from processing information for the unsuitable 12 months.

 

Skipping
Invalid Durations

 

if
(fcstMonth == “-” || fcstYear == “-“) {

    println “Skipping interval ${i} resulting from
invalid values.”

    proceed

}

 

  • If the forecast
    month or 12 months is lacking (“-“)
    , we skip this era.
  • This
    avoids operating the job with incomplete information.

 

Ready
for Earlier Job to End Earlier than Beginning a New One

if
(LAST_JOB_ID && LAST_JOB_ID.isNumber()) {

    boolean jobRunning = true

    int checkAttempts = 0

 

    whereas (jobRunning && checkAttempts

        sleep(5000)

        String activeJobStatus =
getJobStatus(connectionNamedm, LAST_JOB_ID)

 

        if (activeJobStatus ==
“RUNNING”) {

            println “Ready for earlier
job to complete earlier than beginning Forecast Interval $i…”

        } else if (activeJobStatus ==
“FAILED”) {

            println ” Warning: Earlier
Pipeline Job ($LAST_JOB_ID) failed. Shifting to subsequent interval instantly.”

            break

        } else {

            jobRunning = false

        }

        checkAttempts++

    }

}

 

  • Earlier than
    submitting a brand new job, we examine if the final submitted job (LAST_JOB_ID)
    remains to be operating
    .
  • We wait
    for the job to complete
    , checking each 5 seconds (utilizing
    sleep(5000)).
  • If the
    job fails, we print a warning and transfer to the subsequent interval.

 

It
ensures
no two jobs run on the identical time, stopping conflicts & additionally it helps detect
failures early
and cease additional execution if wanted.

 

Submitting
a New Pipeline Job

If
the whole lot seems to be good, we submit a brand new job for the forecast interval:

 

HttpResponse
jsonResponse = operation.software.getConnection(connectionName)

    .publish()

    .header(“Content material-Kind”,
“software/json”)

    .physique(json([

        “jobName”: “Job
Name”,

        “jobType”:
“pipeline”,

        “variables”: [

            “FCST_Month_1”:
fcstMonth,

            “FCST_Year_1”: fcstYear,

            “FCST_Period_1”:
fcstPeriod,

            “FCST_Qtr_1”:
fcstQuarter,

            “IMPORTMODE”:
“Replace”,

            “EXPORTMODE”:
“Merge”,

            “ATTACH_LOGS”:
“Yes”

        ]

    ]))

    .asString()

 

We name
the
Oracle EPM REST API to submit a pipeline job for the
forecast interval.

  • The job
    makes use of essential variables comparable to:
    • Forecast
      Month, 12 months, and Quarter
    • Import
      and Export Modes

 

 

Storing
and Monitoring Job ID

 

ReadContext
ctx = JsonPath.parse(jsonResponse.physique)

String
jobId = ctx.learn(‘$.jobId’)

 

if
(jobId == null || jobId.toString().trim().isEmpty()) {

    println ” Error: Retrieved empty job
ID for interval ${fcstPeriod}. Skipping…”

    proceed

}

 

LAST_JOB_ID
= jobId.toString()

println
“Saved LAST_JOB_ID: ${LAST_JOB_ID}”

 

  • We
    extract the job ID from the API response and retailer it in
    LAST_JOB_ID.
  • This ID
    is used to monitor and look forward to job completion within the subsequent iteration.

 

Making certain
Job Completes Earlier than Shifting to Subsequent Interval

 

boolean
isComplete = waitForCompletion(connectionName, LAST_JOB_ID, “Pipeline
Job”)

 

if
(!isComplete) {

    throwVetoException(” Pipeline job
failed for forecast interval ${i}. Stopping execution.”)

}

 

  • The
    script waits for the job to finish earlier than transferring to the subsequent
    interval.
  • If the
    job fails, we abort execution instantly.

 

 

This
script ensures that forecast durations are processed so as, stopping overlapping
jobs
and dealing with errors gracefully.

 

✔ Prevents a number of forecast jobs
from operating on the identical time.

✔ Mechanically waits for earlier
jobs to finish earlier than beginning new ones.

✔ Detects job failures and stops
execution if one thing goes unsuitable.

✔ Handles lacking or invalid information
correctly.

 

This
makes your Oracle EPM automation extra dependable and prevents undesirable
surprises
in forecast processing! 

The Full script is right here

Completely happy days on the Cloud!!!

 

Tags: BlogEPMGroovyHyperionOraclepipelineRuleTriggering
Previous Post

Machine Management System Market Outlook 2024–2034: Traits, Development & Forecast

Next Post

Azure Boards + GitHub: Latest Updates

Next Post
Azure Boards + GitHub: Latest Updates

Azure Boards + GitHub: Latest Updates

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Trending

Unifying VMs and Containers on a Single Platform

Unifying VMs and Containers on a Single Platform

April 11, 2025
[Podcast] AI Is The New Hearth; Don’t Get Burned

[Podcast] AI Is The New Hearth; Don’t Get Burned

March 29, 2025
Construct an MCP to attach AI to Oracle Database w/OpenAPI

Construct an MCP to attach AI to Oracle Database w/OpenAPI

May 14, 2025
Oracle Cloud: Key Ideas and Terminology

Oracle Cloud: Key Ideas and Terminology

May 5, 2025
Analyze resource-based coverage dependencies throughout your AWS Organizations accounts

Analyze resource-based coverage dependencies throughout your AWS Organizations accounts

May 11, 2025
Prioritize Safety Threats Successfully with CVSS (Widespread Vulnerability Scoring System)

Prioritize Safety Threats Successfully with CVSS (Widespread Vulnerability Scoring System)

February 5, 2025

MultiCloud365

Welcome to MultiCloud365 — your go-to resource for all things cloud! Our mission is to empower IT professionals, developers, and businesses with the knowledge and tools to navigate the ever-evolving landscape of cloud technology.

Category

  • AI and Machine Learning in the Cloud
  • AWS
  • Azure
  • Case Studies and Industry Insights
  • Cloud Architecture
  • Cloud Networking
  • Cloud Platforms
  • Cloud Security
  • Cloud Trends and Innovations
  • Data Management
  • DevOps and Automation
  • GCP
  • IAC
  • OCI

Recent News

Safe & Environment friendly File Dealing with in Spring Boot: Learn, Write, Compress, and Defend | by Rishi | Mar, 2025

Safe & Environment friendly File Dealing with in Spring Boot: Learn, Write, Compress, and Defend | by Rishi | Mar, 2025

May 15, 2025
Bitwarden vs Dashlane: Evaluating Password Managers

Bitwarden vs Dashlane: Evaluating Password Managers

May 15, 2025
  • About Us
  • Privacy Policy
  • Disclaimer
  • Contact

© 2025- https://multicloud365.com/ - All Rights Reserved

No Result
View All Result
  • Home
  • Cloud Architecture
    • OCI
    • GCP
    • Azure
    • AWS
    • IAC
    • Cloud Networking
    • Cloud Trends and Innovations
    • Cloud Security
    • Cloud Platforms
  • Data Management
  • DevOps and Automation
    • Tutorials and How-Tos
  • Case Studies and Industry Insights
    • AI and Machine Learning in the Cloud

© 2025- https://multicloud365.com/ - All Rights Reserved