Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Make sure to go through the following lifecycle configuration definitions when adding a new custom lifecycle via the ES Management Console. When a lifecycle is added, ES stores the corresponding definition in the <ES_HOME>/repository/deployment/server/jaggeryapps/publisher/extensions directory 

Note

WSO2 Enterprise Store uses the lifecycle API provided by WSO2 Governance Registry. However, ES does not support all the lifecycle elements provided by the WSO2 Governance Registry.

XML elements  

Click on an element to view its details along with sub-element details if any.

Anchor
Top
Top

...

AttributeDescriptionDefault ValuesFixed ValuesMandatory/
Optional
Notes 
nameDefines the name of the lifecycle. As ES does not allow you to create two lifecycles with the same name, the name of the lifecycle should be unique.N/A Mandatory 
class

Defines the class that is associated with the lifecycle.

org.wso2.jaggery.scxml.aspects.
JaggeryTravellingPermissionLifeCycle

 

 MandatoryYou can define your own class as shown here, but the default class provided with the ES distribution has the capability to handle any configuration that follows the above template.
Sample implementations

...

languagehtml/xml

...

Note
  • The default class in ES extends the default WSO2 Governance Registry aspect class and includes the ES permission model. Therefore, if you wish to use the ES permission model, it is mandatory to use the default ES class for the aspect.
  • As ES uses the lifecycle API provided by WSO2 Governance Registry, if required you can define your own class, but by doing this you will not have access to the permission model in ES.

org.wso2.jaggery.scxml.aspects.
JaggeryTravellingPermissionLifeCycle

...

Back to Top ^

...

<configuration> 

XML Syntax<configuration type="">
DescriptionThis

 

 Mandatory
Sample implementations
Code Block
languagehtml/xml
<aspect name="Test" class="org.wso2.jaggery.scxml.aspects.JaggeryTravellingPermissionLifeCycle">

Back to Top ^

...

Anchor
configuration
configuration

<configuration> 

XML Syntax<configuration type="">
DescriptionThis element describes the way in which the lifecycle configurations are setup.
Mandatory/OptionalMandatory

...

AttributeDescriptionDefault ValueFixed ValuesMandatory/
Optional
Notes
typeDefines how the lifecycle is configured.N/A

literal -

Use this

This option

when

depicts that the lifecycle configurations are setup using the ES Management Console.

  • resource - Use this option when the lifecycle configurations are setup via the registry.xml file.
  • Mandatory 
    Sample implementations

    ...

    Mandatory
    Sample implementations
    Code Block
    languagehtml/xml
    <configuration type="literal">

    ...

    AttributeDescriptionDefault ValueFixed ValuesMandatory/OptionalNotes
    xmlnsState Chart XML (SCXML) specification. 
    http://www.w3.org/2005/07/scxml
    Mandatory 
    versionVersion number of the State Chart XML (SCXML). 1.0Optional 
    initialstate

    Defines the initial state of the lifecycle. The initial state does not have to be the first state of the configuration. Furthermore, by changing the value of this attribute, you can easily modify the initial state and the flow of the your lifecycle.

        
    Sample implementations
    Code Block
    languagehtml/xml
    <scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0" initialstate="">

    ...

    AttributeDescriptionDefault ValueFixed ValuesMandatory/
    Optional
    Notes
    id

    Defines the name of the lifecycle state.

    N/A Mandatory 
    Sample implementations
    Code Block
    languagehtml/xml
    <state id="Development"></state>

    ...

    Note

    ES does not support multiple lifecycle states with the same name. Therefore, make sure to have unique names for all the

    ...

    state names within a lifecycle.

    Back to Top ^

    ...

    <datamodel> 

    XML Syntax<datamodel>
    DescriptionN/A Mandatory
    Sample implementations
    Code Block
    languagehtml/xml
    <state id="Development"></state>

     

    Back to Top ^

    ...

    Anchor
    datamodel
    datamodel

    <datamodel> 

    XML Syntax<datamodel>
    Description

    This element contains all the custom elements, which are defined in the lifecycle model. Based on the SCXML specification, you can define a data model to a lifecycle state and you can use this extension to define custom elements.

    Mandatory/OptionalOptional

    ...

    XML Syntax<data name="">
    Description

    Custom data elements (according to the SCXML specification) serve to define check items , transition permission, transition validations, transition scripts, transition executions and transition UIsand transition executions. This element describes the data of its child elements.

    Mandatory/OptionalOptional

    ...

    checkItems -
    AttributeDescriptionDefault ValueFixed ValuesMandatory/
    Optional
    Notes
    name

    Defines the extension point (e.g., Transition Validators, Transition Executors, Transition User Interfaces and Transition Scripts) that is used in the lifecycle.

    You can define only one extension point of a kind, because the underlined implementation ignores multiple elements and takes only one into consideration.

    For transitionApproval, the following rules apply regarding roles and votes:

      • roles="" - Any user can vote
      • roles="admin" - Only users with an admin role can vote
         
      • votes="2" - Two votes are required for approval.
     

     
    • checkItems - If the user is defining check items as its child elements.
    • transitionValidations transitionExecution - If the data element defines transition validations.
    • transitionPermission - If the data element defines transition permissions.
    • transitionScripts - If the data element describes the transition scripts.
    • transitionExecution - If the data element defines programmable executions for transitions.
    • transitionUI - If the data element defines custom UIs that accept user input for transitions.
    • transitionApproval - If the data element defines lifecycle transitions that need user approvals.
    Mandatory 

    ...

    • programmable executions for transitions.
    Mandatory 
    Sample implementations
    checkItems
    Code Block
    <data name="checkItems">
       <item name="Effective Inspection Completed" forEvent="" />
       <item name="Test Cases Passed" forEvent="" />
       <item name="Smoke Test Passed" forEvent="" />
    </data>

    The above code snippet based on checkItems renders as follows in the Publisher:

     

    transitionExecution
    Code Block
     
    Code Block
    languagehtml/xml
    <data name="checkItems">
    	<item name="Code Completed" forEvent="">
    	<item name="WSDL, Schema Created" forEvent="">
    </data>
    
    <data name="transitionValidation">
    	<validation forEvent="" class="">
    		<parameter name="" value=""/>
    	</validation>
    </data>
    
    <data name="transitionPermission">
    	<permission forEvent="" roles=""/>
    </data>
    
    <data name="transitionScripts">
        <js forEvent="">
            <console function="">
                <script type="text/javascript">
                </script>
            </console>
            <server function="">
                <script type="text/javascript"></script>
            </server>
        </js>
    </data>
    
    <data name="transitionExecution">
    	<execution forEvent="Promote" class="org.wso2.jaggery.scxml.generic.GenericExecutor">
    </data>
    
    <data name="transitionUI">
    	<ui forEvent="Promote" href="../lifecycles/pre_invoke_aspect_ajaxprocessor.jsp?currentEnvironment=/_system/governance/trunk/"/>
    </data>
    
    <data name="transitionApproval">
    	<approval forEvent="Promote" roles="" votes="5"/>
    	<approval forEvent="Demote" roles="admin" votes="5"/>
    </data>

    ...