Intelligent Groovy Rule Set to camouflage Action menu process of Oracle EPM Planning Web Form
In Planning Webform, business rules can be triggered by attaching them to the Action menu. If the data is frozen after the approval workflow process, data should not be modified. But EPM Planning doesn’t have a default feature to lock the Action Menu to avoid triggering of rule/rule set which subsequently triggers the rule/ruleset to update data in the web form.
Action Menu is an artifact in EPM Planning using which users can perform a specific action in web form on an ad-hoc basis. Users can’t be restricted from running the Action Menu if in case data is approved in the system. To tackle such system limitations, Groovy custom rule/ruleset could be created by editing rules in the EPM Planning workspace.
Below is the process flow of Groovy Action Menu for gathering intelligence from webform and accordingly taking action:
Create Groovy Rule-> Add Groovy Rule in Rule Set -> Add Ruleset in Action menu-> Add Groovy Action Menu in Webform-> Execute Action Menu on WebForm
Steps involved for gathering intelligence using Groovy Action Menu:
· Create Groovy Business Rule in EPM workspace –
· Add Groovy Rules in Ruleset to run multiple rules one after another –
· Create Action Menu and add ruleset in it –
· Add Action menu in webform –
· Run Action Menu on webform –
· Approval Workflow process for data –
Groovy Ruleset will take decision whether data is freeze or not –
· If freeze, don’t act by exiting the rule
· If not freeze, perform adhoc action requested by user
Below is the logic to gather intelligence on whether data is freeze or not :
· Check how many cells are in read-only mode and store it into count variable –
int icount;
operation.grid.dataCellIterator(“Percentage(%)”).each {
if(it.isReadOnly())
{
icount++;
}
· If count of read-only is equal or more than specified number , form is freeze else available for modification –
IF (“Percentage(%)”>=0)
@RETURN(“Form is frozen and modifications are not allowed” ,ERROR);
ENDIF
Benefits –
· This custom solution is use to tackle limitations of Action menu which can be reused in other Planning processes
· Groovy Rule editor is freely available in Planning Business rule editor
· Groovy rule is easy to maintain and develop
· Saves client budget from purchasing additional tools to handle limitations of default system functionalities
· Use for close-process or locking the forms from modifications
Reference(s) –
https://www.oracle.com/webfolder/technetwork/tutorials/obe/cloud/epm/Groovy/Introduction/index.html
https://blogs.oracle.com/proactivesupportepm/post/groovy-best-practices