Environment: On premises only
Context Object Parameters
Parameter Name | Type | Read/Write | Comments |
---|
Policy | String |
Read | Policy name. |
Sample
The following sample shows you how to check that the object has no children in IN_WORK maturity state.
/*The following rule is an example of what can be done*/
/* ----------------- */
/* Declare */
/* ----------------- */
let ListInstance (List)
let ListInstanceSize (Integer)
let FilterList (List)
let FilterListSize (Integer)
/* ----------------------------------------------------------------------------- */
/* By default, we validate the operation */
/* ----------------------------------------------------------------------------- */
Validation = true
/* ----------------------------------------------------------------------------- */
/* If the object has at least one child, the clone is not allowed */
/* ----------------------------------------------------------------------------- */
ListInstance = ThisObject.Children
ListInstanceSize = ListInstance.Size()
if ( ListInstanceSize > 0 )
{
/* ------------------------------------- */
/* Check Children's maturity state */
/* */
/* We first navigate from the instances */
/* to their references */
/* ------------------------------------- */
FilterList = ListInstance.Extract("VPMInstance", "VPMReference", "y = x.Children.GetItem(1)")
.Filter("VPMReference", "x.current == \"IN_WORK\" ")
FilterListSize = FilterList.Size()
}