The configuration model of the WSO2 Governance Registry lifeCycles lifecycles gives users the ability to define custom behavior to a registry lifecycle operation. This model is capable of defining the following custom behaviors:
- Define permissions for each check item
- Define custom validations for each check item
- Define a set of check items for each state transition
- Define a custom colour for the current lifecycle state
- Define permissions for each state transition
- Define custom validations for each state transition
- Define state duration in the dd:hh:mm:ss format for each lifecycle state
- Define programmable executions for each state transition
- Define custom UIs accepting user input for each state transition
- Define a Lifecycle lifecycle approval for state transition
Configuration Model
Code Block |
---|
<aspect name="SampleLifeCycle" class="org.wso2.carbon.governance.registry.extensions.aspects.DefaultLifeCycle" name=""> <configuration type="literal"> <lifecycle> <scxml initialstate="" version="1.0" xmlns="http://www.w3.org/2005/07/scxml" version="1.0" initialstate="Development"> <state id="Development"> <datamodel> <data name="checkItems"> <item forEventname="Code Completed" nameforEvent=""> <!--<permissions> <permission roles=""/> </permissions> </permission> <validations> </permissions> <validation forEvent="" class=""> <validations> <validation<parameter classname="" forEventvalue=""/> </validation> <parameter name="" value=""> </validations>--> </parameter>item> <item name="WSDL, Schema Created" forEvent=""> </validation>item> <item name="QoS </validations>Created" forEvent=""> </item> </data> <!--<data name="transitionValidation"> <validation classforEvent="" forEventclass=""> <parameter name="" value=""/> </validation> </parameter>data> <data name="transitionPermission"> </validation><permission forEvent="" roles=""/> </data> <data name="transitionPermissiontransitionScripts"> <permission<js forEvent="" roles> <console function=""> </permission> <script type="text/javascript"> </data> </script> <data name="transitionScripts"> </console> <js forEvent=""> <console<server function=""> <script type="text/javascript">></script> </server> </script> </js> </console> </data> <server<data functionname="transitionApproval"> <approval forEvent="Promote" roles="" votes="2"/> <script type="text/javascript"> </data>--> </script>datamodel> <transition event="Promote" target="Tested"/> </server> <checkpoints> </js> <checkpoint id="DevelopmentOne" durationColour="green"> </data> <data name="transitionExecution"><boundary min="0d:0h:0m:0s" max="1d:0h:00m:20s"/> </checkpoint> <execution class <checkpoint id="DevelopmentTwo" forEventdurationColour="red"> <boundary <parameter namemin="1d:0h:00m:20s" valuemax="23d:2h:5m:52s"/> </checkpoint> </parameter>checkpoints> </state> </execution> <state id="Tested"> </data><datamodel> <data name="transitionUIcheckItems"> <ui<item hrefname="Effective Inspection Completed" forEvent=""/> </data> <data name="transitionApproval">item> <approval forEvent="" roles="" votes=""/><item name="Test Cases Passed" forEvent=""> </item> <approval forEvent="" roles="" votes=""/> </data> <item name="Smoke Test Passed" forEvent=""> </item> </data> </datamodel> <transition event="Promote" target="Production"/> <transition event="Demote" target="Development"/> </transition>/state> <state id="Production"> <transition event="Demote" target="Tested"/> </state> </scxml> </lifecycle> </configuration> </aspect> |
For details of each element of the configuration, refer to see Lifecycle Configuration Elements. For For a sample of Lifecycle lifecycle configurations in actions, see herethe Lifecycle Sample.