public class ScenarioRollup
extends java.lang.Object
By default, parameters are case sensitive and may not be null or empty unless otherwise specified.
The instance of this class can be used to perform multiple operations on a Scenario Rollup along with the passed model as selected model.
Operations supported by this object include the following:
Example call from Groovy of adding a new root business case "LossBusinessCase" to "Operations US Consolidation" Scenario Rollup:
Example call from Groovy of removing an existing root business case "LossBusinessCase" from the "Operations US Consolidation" Scenario Rollup:// An optional check to confirm whether the Scenario Rollup exists within the application. if(operation.application.hasScenarioRollup("Operations US Consolidation")){ // DefineScenarioRollup
object with the selected model as the root Node. ScenarioRollup rollup = operation.application.getScenarioRollup("Operations US Consolidation") // Adds new business case "LossBusinessCase" to the Scenario Rollup with "Base" as the leaf node scenario to contribute. rollup.addNewRootBusinessCase("LossBusinessCase", "Base") }
Example call from Groovy of executing a Scenario Rollup "Sales US Consolidation" with the business case as "ProfitBusinessCase" and selected model as "Sales US" without Refresh and Publish property by using both theScenarioRollup rollup = operation.application.getScenarioRollup("Operations US Consolidation") // An optional check to confirm whether the business case exists within the Scenario Rollup. if(rollup.hasBusinessCase("LossBusinessCase")) rollup.removeRootBusinessCase("LossBusinessCase")
ScenarioRollup
and Job
object:
Example call from Groovy of executing a Scenario Rollup "Sales US Consolidation" with the business case as "ProfitBusinessCase" and selected model as "Sales US" without Refresh and Publish property by solely using theif(operation.application.hasScenarioRollup("Sales US Consolidation", "Sales US")){ ScenarioRollup rollup = operation.application.getScenarioRollup("Sales US Consolidation", "Sales US") // Assign "ProfitBusinessCase" business case to run to the Scenario Rollup without Refresh and Publish property rollup.setExecuteBusinessCases(ScenarioRollup.addBusinessCaseToExecute("ProfitBusinessCase")) JobFactory jf = operation.application.jobFactory JobDefinition jobDef = jf.job("Sales US Consolidation Job", ScenarioRollup.getJobType(), rollup.getRollup()) Job job = operation.application.executeJob(jobDef) }
Job
object:
Example call from Groovy of executing a Scenario Rollup "Sales US Consolidation" with the business case as "ProfitBusinessCase" and selected model as "Sales US" with Refresh property by using both theJobFactory jf = operation.application.jobFactory // It is not necessary to pass "ModelName" if selected model is the root node while creating JobDefinition object JobDefinition jobDef = jf.job("Sales US Consolidation Job", ScenarioRollup.getJobType(), [ "ModelName" : "Sales US", "RollupName" : "Sales US Consolidation", "BusinessCases" : [ScenarioRollup.addBusinessCaseToExecute("ProfitBusinessCase")] ]) Job job = operation.application.executeJob(jobDef)
ScenarioRollup
and Job
object:
Example call from Groovy of executing a Scenario Rollup "Sales US Consolidation" with the business case as "ProfitBusinessCase" and selected model as "Sales US" with Refresh property by solely using theif(operation.application.hasScenarioRollup("Sales US Consolidation", "Sales US")){ ScenarioRollup rollup = operation.application.getScenarioRollup("Sales US Consolidation", "Sales US") // Assign "ProfitBusinessCase" business case with refresh flag to run to the Scenario Rollup rollup.setExecuteBusinessCases(ScenarioRollup.addBusinessCaseToExecute("ProfitBusinessCase", true, false)) JobFactory jf = operation.application.jobFactory JobDefinition jobDef = jf.job("Sales US Consolidation Job", ScenarioRollup.getJobType(), rollup.getRollup()) Job job = operation.application.executeJob(jobDef) }
Job
object:
Example call from Groovy of executing a Scenario Rollup "Sales US Consolidation" with the business case as "ProfitBusinessCase" and selected model as "Sales US" with Publish property by using both theJobFactory jf = operation.application.jobFactory // It is not necessary to pass "ModelName" if selected model is the root node while creating JobDefinition object JobDefinition jobDef = jf.job("Sales US Consolidation Job", ScenarioRollup.getJobType(), [ "ModelName" : "Sales US", "RollupName" : "Sales US Consolidation", "BusinessCases" : [ScenarioRollup.addBusinessCaseToExecute("ProfitBusinessCase", true, false)] ]) Job job = operation.application.executeJob(jobDef)
ScenarioRollup
and Job
object:
Example call from Groovy of executing a Scenario Rollup "Sales US Consolidation" with the business case as "ProfitBusinessCase" and selected model as "Sales US" with Publish property by solely using theif(operation.application.hasScenarioRollup("Sales US Consolidation", "Sales US")){ ScenarioRollup rollup = operation.application.getScenarioRollup("Sales US Consolidation", "Sales US") // Assign "ProfitBusinessCase" business case with publish flag to run to the Scenario Rollup rollup.setExecuteBusinessCases(ScenarioRollup.addBusinessCaseToExecute("ProfitBusinessCase", false, true)) JobFactory jf = operation.application.jobFactory JobDefinition jobDef = jf.job("Sales US Consolidation Job", ScenarioRollup.getJobType(), rollup.getRollup()) Job job = operation.application.executeJob(jobDef) }
Job
object:
Example call from Groovy of executing a Scenario Rollup "Sales US Consolidation" with the business case as "ProfitBusinessCase" and selected model as "Sales US" with Refresh and Publish property by using both theJobFactory jf = operation.application.jobFactory // It is not necessary to pass "ModelName" if selected model is the root node while creating JobDefinition object JobDefinition jobDef = jf.job("Sales US Consolidation Job", ScenarioRollup.getJobType(), [ "ModelName" : "Sales US", "RollupName" : "Sales US Consolidation", "BusinessCases" : [ScenarioRollup.addBusinessCaseToExecute("ProfitBusinessCase", false, true)] ]) Job job = operation.application.executeJob(jobDef)
ScenarioRollup
and Job
object:
Example call from Groovy of executing a Scenario Rollup "Sales US Consolidation" with the business case as "ProfitBusinessCase" and selected model as "Sales US" with Refresh and Publish property by solely using theif(operation.application.hasScenarioRollup("Sales US Consolidation", "Sales US")){ ScenarioRollup rollup = operation.application.getScenarioRollup("Sales US Consolidation", "Sales US") // Assign "ProfitBusinessCase" business case with refresh and publish flag to run to the Scenario Rollup rollup.setExecuteBusinessCases(ScenarioRollup.addBusinessCaseToExecute("ProfitBusinessCase", true, true)) JobFactory jf = operation.application.jobFactory JobDefinition jobDef = jf.job("Sales US Consolidation Job", ScenarioRollup.getJobType(), rollup.getRollup()) Job job = operation.application.executeJob(jobDef) }
Job
object:
Example call from Groovy of executing multiple business cases on a Scenario Rollup "Sales US Consolidation" by using both theJobFactory jf = operation.application.jobFactory // It is not necessary to pass "ModelName" if selected model is the root node while creating JobDefinition object JobDefinition jobDef = jf.job("Sales US Consolidation Job", ScenarioRollup.getJobType(), [ "ModelName" : "Sales US", "RollupName" : "Sales US Consolidation", "BusinessCases" : [ScenarioRollup.addBusinessCaseToExecute("ProfitBusinessCase", true, true)] ]) Job job = operation.application.executeJob(jobDef)
ScenarioRollup
and Job
object:
Example call from Groovy of executing multiple business cases on a Scenario Rollup "Sales US Consolidation" by solely using theScenarioRollup rollup = operation.application.getScenarioRollup("Sales US Consolidation") rollup.setExecuteBusinessCases( ScenarioRollup.addBusinessCaseToExecute("ProfitBusinessCase"), ScenarioRollup.addBusinessCaseToExecute("LossBusinessCase", true, true), ScenarioRollup.addBusinessCaseToExecute("MergerBusinessCase") ) JobFactory jf = operation.application.jobFactory JobDefinition jobDef = jf.job("Sales US Consolidation Job", ScenarioRollup.getJobType(), rollup.getRollup()) Job job = operation.application.executeJob(jobDef)
Job
object:
Example call from Groovy of executing multiple Scenario Rollups "Sales US Consolidation" and "Operations US Consolidation":JobFactory jf = operation.application.jobFactory JobDefinition jobDef = jf.job("Sales US Consolidation Job", ScenarioRollup.getJobType(), [ "RollupName" : "Sales US Consolidation", "BusinessCases" : [ScenarioRollup.addBusinessCaseToExecute("ProfitBusinessCase"), ScenarioRollup.addBusinessCaseToExecute("LossBusinessCase", true, true), ScenarioRollup.addBusinessCaseToExecute("MergerBusinessCase")] ]) Job job = operation.application.executeJob(jobDef)
Example call from Groovy of displaying list of all defined business cases and all available leaf node scenarios to contribute while adding root business case:ScenarioRollup salesRollup = operation.application.getScenarioRollup("Sales US Consolidation") salesRollup.setExecuteBusinessCases(ScenarioRollup.addBusinessCaseToExecute("ProfitBusinessCase")) ScenarioRollup operRollup = operation.application.getScenarioRollup("Operations US Consolidation") operRollup.setExecuteBusinessCases(ScenarioRollup.addBusinessCaseToExecute("LossBusinessCase")) JobFactory jf = operation.application.jobFactory // Rollups will be executed serially in the given order. JobDefinition jobDef = jf.job("Sales US Consolidation Job", ScenarioRollup.getJobType(), ScenarioRollup.executeMultipleRollups(salesRollup, operRollup) Job job = operation.application.executeJob(jobDef)
ScenarioRollup rollup = operation.application.getScenarioRollup("Sales US Consolidation") println("List of all defined business cases: " + rollup.getAllDefinedBusinessCases()) println("List of all available leaf node scenarios to contribute: " + rollup.getRootNodeScenarios())
Modifier and Type | Method and Description |
---|---|
static oracle.epm.api.model.ScenarioRollupRunBusinessCase |
addBusinessCaseToExecute(java.lang.String businessCaseName)
Returns a ScenarioRollupRunBusinessCase object from the specified
case insensitive business case name.
|
static oracle.epm.api.model.ScenarioRollupRunBusinessCase |
addBusinessCaseToExecute(java.lang.String businessCaseName,
boolean isRefresh,
boolean isPublish)
Returns a ScenarioRollupRunBusinessCase object from the specified
case insensitive business case name and passed parameters.
|
void |
addNewRootBusinessCase(java.lang.String businessCaseName,
java.lang.String leafNodeScenario)
Adds a new root business case with the specified name to the
Scenario Rollup.
|
static java.util.Map<java.lang.String,java.util.List<oracle.epm.api.model.ScenarioRollupRunParameters>> |
executeMultipleRollups(ScenarioRollup... rollups)
Returns a Map containing a list of ScenarioRollupRunParameters
objects created from the specified instances.
|
java.util.List<java.lang.String> |
getAllDefinedBusinessCases()
Returns a list of all available business case names defined for the
Scenario Rollup.
|
static java.lang.String |
getJobType()
Returns a String constant with the job type for running the
Scenario Rollup as a planning job.
|
java.util.Map<java.lang.String,java.util.List<oracle.epm.api.model.ScenarioRollupRunParameters>> |
getRollup()
Returns a Map containing the ScenarioRollupRunParameters object
created from the current instance.
|
java.util.List<java.lang.String> |
getRootNodeScenarios()
Returns a list of all valid root node scenarios.
|
boolean |
hasBusinessCase(java.lang.String businessCaseName)
Returns true if the specified case insensitive business case name
contains within this Scenario Rollup structure.
|
void |
removeRootBusinessCase(java.lang.String businessCaseName)
Removes a root business case with the specified name from the
Scenario Rollup.
|
java.util.List<java.lang.String> |
setExecuteBusinessCases(oracle.epm.api.model.ScenarioRollupRunBusinessCase... businessCases)
Validates and assign business cases to run to the Scenario Rollup.
|
public static oracle.epm.api.model.ScenarioRollupRunBusinessCase addBusinessCaseToExecute(java.lang.String businessCaseName)
The Refresh and Publish properties of the specified business case will be
set to false.
The returned ScenarioRollupRunBusinessCase object can be further
used as an argument in the
setExecuteBusinessCases(ScenarioRollupRunBusinessCase...)
method.
businessCaseName
- name of the business case and is case insensitivepublic static oracle.epm.api.model.ScenarioRollupRunBusinessCase addBusinessCaseToExecute(java.lang.String businessCaseName, boolean isRefresh, boolean isPublish)
The returned ScenarioRollupRunBusinessCase object can be further
used as an argument in the
setExecuteBusinessCases(ScenarioRollupRunBusinessCase...)
method.
businessCaseName
- name of the business case and is case insensitiveisRefresh
- on true external source data maps will be executedisPublish
- on true data maps will be executed with publish datapublic void addNewRootBusinessCase(java.lang.String businessCaseName, java.lang.String leafNodeScenario) throws java.lang.Exception
businessCaseName
- name of new business caseleafNodeScenario
- name of leaf node scenario to contributejava.lang.Exception
- if an unexpected fault occurspublic static java.util.Map<java.lang.String,java.util.List<oracle.epm.api.model.ScenarioRollupRunParameters>> executeMultipleRollups(ScenarioRollup... rollups)
This method executes multiple Scenario Rollups sequentially in the given
order. The run job of specified Scenario Rollup instances will get
attached to a parent group consolidation job.
Asynchronous execution is not supported by this method.
The returned Map can be further passed as an argument while creating the
JobDefinition
object for running multiple Scenario Rollups.
rollups
- ScenarioRollup
instances to be executedpublic java.util.List<java.lang.String> getAllDefinedBusinessCases()
public static java.lang.String getJobType()
The returned String can be further passed as an argument while creating a
JobDefinition
object for running the Scenario Rollup.
public java.util.Map<java.lang.String,java.util.List<oracle.epm.api.model.ScenarioRollupRunParameters>> getRollup()
The returned Map can be further passed as an argument while creating the
JobDefinition
object for running the Scenario Rollup.
public java.util.List<java.lang.String> getRootNodeScenarios() throws java.lang.Exception
java.lang.Exception
- if an unexpected fault occurspublic boolean hasBusinessCase(java.lang.String businessCaseName)
businessCaseName
- name of the business case and is case insensitivepublic void removeRootBusinessCase(java.lang.String businessCaseName) throws java.lang.Exception
businessCaseName
- name of the business case to be removedjava.lang.Exception
- if an unexpected fault occurspublic java.util.List<java.lang.String> setExecuteBusinessCases(oracle.epm.api.model.ScenarioRollupRunBusinessCase... businessCases)
The call to this method will clear existing run business cases assigned if any. If the specified business case didn't exist within the Scenario Rollup then the business case will be considered invalid and gets removed from the run list.
businessCases
- ScenarioRollupRunBusinessCase object
returned from addBusinessCaseToExecute(String)
or
addBusinessCaseToExecute(String, boolean, boolean)
methodsCopyright © 2017, 2024, Oracle and/or its affiliates. All rights reserved.