Pre-Check Maturity (PLMCheckMaturity)

An opening ID is an entry point used to customize business logic. Pre-Check Maturity describe conditions to be satisfied before operating the change of the maturity of a component, to prevent the operation.

Note: For more information about customization by business rules, see Installation and Setup: Customize: Behavior: Data Setup: Customization by Business Rules.
When the check fails, a message can be provided to the end user, explaining the reason why.

This page discusses:

Environment: On premises only

General Information

This opening ID is called before changing the maturity of a component.



The table below provides you with information related to the definition of the Opening ID.

Opening ID: PLMCheckMaturity
Customization intent: Validation

Input Objects

The opening ID can be invoked for all Object types. It means that your implementation can safely use the attributes of the default PLM Component. Input objects must be of the following types:

  • ThisObject
  • Parameters corresponds to the context object.
  • Validation

Context Object Parameters

Parameter NameTypeRead/WriteComments
TransitionString ReadThe name of the transition that is requested by the maturity change operation (ex: Close).
CurrentStateStringReadThe name of the maturity state of the object before the transition (ex: IN_WORK).
PolicyStringReadPolicy name.

Sample

The following sample The following sample shows you how to:

  1. Check the current state and the transition
  2. Check the object children maturity state. The rule fails if at least one child is in "WAIT_APP" maturity state.

/*The following rule is an example of what can be done*/
/* ----------------- */
/*      Declare      */
/* ----------------- */
let iFromState=""
let iTransition=""
let ListInstance (List)
let ListInstanceSize (Integer)
let FilterList (List)
let SonList(List)
let FilterListSize (Integer)


/* ----------------------------------------------- */
/*    By default, we validate the operation   */
/* ----------------------------------------------- */
Validation = true
/* ------------------------------------------- */
/*        */
/* ------------------------------------------- */

/* -------------------------------- */
/*    Retrieve parameters values    */
/* -------------------------------- */

iFromState = Parameters.GetAttributeString("CurrentState")
iTransition = Parameters.GetAttributeString("Transition")

/* -------------------------------------------------------------- */
/*    From IN_WORK to WAIT_APP, check Children's maturity state   */
/* -------------------------------------------------------------- */
if (iFromState == "IN_WORK" and iTransition == "Share") 
{
      /* -------------------------------- */
      /*    Retrieve object's Children    */
      /* -------------------------------- */
       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.V_maturity == \"IN_WORK\" ")
                FilterListSize = FilterList.Size()
       }
}