-
Add configurable rules to check availabilty or specific expected values of properties of an Item by life cycle state at run time.
-
The checks according to rules run while an item is in a defined "stage” or gets promoted to a "stage”.
-
This allows to extend the options of checking for "required" data beyond just during the initial "save" action.
-
"Stages" are defined as one or more possible "Life Cycle States" of an item.
-
A generic "Server Method" (pev_ItemProperty_extValidations) is provided to read the rules of the ItemType specific configurations and execute the checks and generate an error message listing missing or non-conforming property values.
-
This method must be connected to the "onAfterUpdate" events of ItemTypes to enable its advanced property validations. Note: on error of server methods "onAfterXX" a roll-back takes place anyways !!!
-
To enable checking during a promotion to one of the defined stages, the same method must also be connected to ItemType server events "onBeforePromote" and "onAfterPromote"
- Note: The OnBeforePromote and OnAfterPromote events can be used to define a standard promote operation for an item regardless of the lifecycle transition selected by the user. Both events are triggered BEFORE the standard lifecycle pre/post events are invoked.
-
Also, an "Item Action" (pev_ItemProperty_extValidations) is provided to execute the validations upon user request to get a report of missing or non-conforming property values.
-
Error messages are template based and support multi-language configurations
-
Property Validation rules must be set to status "Active" (life cycle) to take effect.
Version | Comments |
---|---|
v1.0.0 | Initial version. (Replaces community project "Life Cycle Based Props and Fields") |
Project | Aras |
---|---|
v1.0.0 | 11.0 SP14, SP15 |
- Aras Import Package Tool
- Downloaded Package
- No code tree changes
- Aras Innovator Install (Supported Service Packs listed above)
- None
Important: Always back up your code tree and database before applying an import package or code tree patch!
-
Use the package import utility in your CD image to import the packages in this module.
-
Log on as root and use options Merge and Thorough for all steps
- Import the
imports.mf
file from the Imports folder.
- Import the
- Log in as admin and expand to Administration > Configuration
- Open ItemType Stages Definition. Create a New Item.
- Select the existing ItemType you wish to apply the rules to.
- For Each Definition:
- Select the Itemtype you wish to pull the LC states from.
- Map existing Lifecycle states to your custom stage names (Multi-lingual capable). This is a Many to One mapping.
- (Optional) Previous stages are used if you wish to define what the incoming state should be for the check. [For instance, if you have two branches coming into a state and you only want the validation to run if it came from Branch B and not Branch A.]
- Save/Unlock/Close the record.
- Open Property Validation Rules. Create a New Item.
- Select the existing ItemType you wish to apply the rules to.
- Select the stage definition created previously.
- Select an Owner.
- (Optional) Alter the default messages if you wish. Supported variables are:
- {propLabel}
- {propValue}
- {itemKeyedName}
- {itemTypeLabel}
- {itemStateLabel}
- Add the properties to be validated.
- Set expected values. (Default is not null.)
- Check if the property should be checked incoming from previous stages and stopped before getting to this stage if not valid.
- Set the stages to validate at (multi-select)
- Save and Lock the record.
- Promote the record to Active. (If you do not do this, the rules will not be in force!)
- For the ItemType(s) selected above, go to ItemTypes and set Server Events for the following Method: pev_ItemProperty_extValidations to the following Events:
- OnAfterPromote
- OnAfterUpdate
- OnBeforePromote
- Also, set the following Action: pav_ItemProperty_advValidations
- Save/Unlock/Close the ItemType.
- Test Validation.
- Checks will run on Promotions, and after the item is edited, before Save is applied.
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request
For more information on contributing to this project, another Aras Labs project, or any Aras Community project, shoot us an email at araslabs@aras.com.
Original Aras community project written by Rolf Laudenbach (rlaudenbach@aras.com) at Aras Corp.
Aras Labs projects are published to GitHub under the MIT license. See the LICENSE file for license rights and limitations.