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 | ||||
---|---|---|---|---|
|
...
Attribute | Description | Default Values | Fixed Values | Mandatory/ Optional | Notes |
---|---|---|---|---|---|
name | Defines 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. |
| Mandatory | You 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
...
language | html/xml |
---|
...
|
|
...
...
<configuration>
XML Syntax | <configuration type=""> | ||
---|---|---|---|
Description | This
| Mandatory |
Sample implementations
Code Block | ||
---|---|---|
| ||
<aspect name="Test" class="org.wso2.jaggery.scxml.aspects.JaggeryTravellingPermissionLifeCycle"> |
...
Anchor | ||||
---|---|---|---|---|
|
<configuration>
XML Syntax | <configuration type=""> |
---|---|
Description | This element describes the way in which the lifecycle configurations are setup. |
Mandatory/Optional | Mandatory |
...
Attribute | Description | Default Value | Fixed Values | Mandatory/ Optional | Notes |
---|---|---|---|---|---|
type | Defines how the lifecycle is configured. | N/A | literal - Use thisThis option whendepicts that the lifecycle configurations are setup using the ES Management Console. registry.xml file. | Mandatory |
Sample implementations
...
Mandatory |
Sample implementations
Code Block | ||
---|---|---|
| ||
<configuration type="literal"> |
...
Attribute | Description | Default Value | Fixed Values | Mandatory/OptionalNotes | |
---|---|---|---|---|---|
xmlns | State Chart XML (SCXML) specification. | http://www.w3.org/2005/07/scxml | Mandatory | ||
version | Version number of the State Chart XML (SCXML). | 1.0 | Optional | ||
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 | ||
---|---|---|
| ||
<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0" initialstate=""> |
...
Attribute | Description | Default Value | Fixed Values | Mandatory/ Optional | Notes |
---|---|---|---|---|---|
id | Defines the name of the lifecycle state. | N/A | Mandatory |
Sample implementations
Code Block | ||
---|---|---|
| ||
<state id="Development"></state> |
...
|
...
|
...
<datamodel>
XML Syntax | <datamodel> | ||
---|---|---|---|
Description | N/A | Mandatory |
Sample implementations
Code Block | ||
---|---|---|
| ||
<state id="Development"></state> |
...
Anchor | ||||
---|---|---|---|---|
|
<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/Optional | Optional |
...
XML Syntax | <data name=""> |
---|---|
Description | Custom |
Mandatory/Optional | Optional |
...
Attribute | Description | Default Value | Fixed Values | Mandatory/ 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
|
| Mandatory |
...
| 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 | ||
---|---|---|
| ||
<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> |
...