Thursday, February 6, 2014

Dynamic Scripting

Oracle introduces Dynamic Scripting in DRM 11.1.2.3. This functionality makes drm much more powerful and flexible in deriving properties and validating business rules.

What is dynamic scripting?
Dynamic script is Java Script programming in DRM. This feature is introduced in DRM 11.1.2.3 version. It enables you to develop business logic for derived properties and validations.

Why do we need it?
Dynamic scripts provide
1.    Robust and better performing alternative to formulas.
2.    Better organization and less complexity of logic through the use of
a.    Multiple statements
b.    Variables
c.    In-line comments.
d.    Loops & regular expressions.

Where can we use it?
Dynamic scripts can be used in one of two ways
  • Derived Properties
  • Validations


Derived Properties: We can now use script instead of formula to derive property values. Bonus addition in this 11.1.2.3 is deriving Hierarchy and Version level properties.
Script can derive property values at node (Global, Local), Hierarchy and Version level.

Validations: Script and formula are now available in validations.We dont have to create properties and reference them in validations, instead we can directly use the formulas or script within validation.

How should we use?
DRM provides parameters (node, hierarchy, version, validation etc.). All applicable properties and methods can be referenced using these parameters. Check the example in later sections.

Pros and Cons
Pros
Cons
Programming Capabilities
Need to know/learn java scripting
Variables can be used to replace some properties

Customize error messages in validations.

Can use one validation to perform multiple validations.

Performance improvement and easy debugging



No comments:

Post a Comment