...
Note |
---|
WSO2 Enterprise Store uses the lifecycle API provided by WSO2 Governance Registry, but 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 | ||||
---|---|---|---|---|
|
- <aspect>
- <configuration>
- <lifecycle>
- <scxml>
- <state>
- <datamodel>
- <data>
- <item>
- <permissions>
- <permission>
- <validations>
- <validation>
- <parameter>
- <js>
- <console>
- <script>
- <server>
- <script>
- <execution>
- <parameter>
- <ui>
- <transition>
...
Anchor | ||||
---|---|---|---|---|
|
<aspect>
...
Attribute | Description | Default Value | Fixed Values | Mandatory/ OptionalNotes |
---|---|---|---|---|
name | Defines the extension point (e.g., Transition Executors) 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. |
| Mandatory |
Sample implementations
Code Block |
---|
<data name="checkItems"> <item name="Effective Inspection Completed" forEvent="" /> <item name="Test Cases Passed" forEvent="" /> <item name="Smoke Test Passed" forEvent="" /> </data> <data name="transitionExecution"> <execution forEvent="Promote" class="org.wso2.jaggery.scxml.generic.GenericExecutor"> <parameter name="PERMISSION:get" value="http://www.wso2.org/projects/registry/actions/get" /> <parameter name="PERMISSION:add" value="http://www.wso2.org/projects/registry/actions/add" /> <parameter name="PERMISSION:delete" value="http://www.wso2.org/projects/registry/actions/delete" /> <parameter name="PERMISSION:authorize" value="authorize" /> <parameter name="STATE_RULE1:Created" value="Internal/private_{asset_author}:+get,+add,+delete,+authorize" /> <parameter name="STATE_RULE2:Created" value="Internal/reviewer:-get,-add,-delete,-authorize" /> <parameter name="STATE_RULE3:Created" value="Internal/everyone:-get,-add,-delete,-authorize" /> </execution> </data> |
...
Attribute | Description | Default Value | Fixed Values | Mandatory/ Optional | ||
---|---|---|---|---|---|---|
name | Defines the name of the check item. ES allows you to define check items for each transition. | N/A | Optional | |||
forEvent | Defines whether the check item is required for a specific transition. A check item can may be required needed for more than one event, in which case, a user you can give provide a comma (",") separated list for the
| Null : - Keeping the forEvent attribute empty means that a specific check item is not required for any transition event. | Optional |
...
The above code snippet based on checkItems renders as follows in the Publisher:
...
Anchor |
---|
...
|
...
|
...
<execution>
XML Syntax | <js <execution forEvent="" class=""/> |
---|---|
Description | ES lifecycle configuration has the ability to allow JavaScript functions to execute on both the server-side and the client-side. The |
Mandatory/Optional | Optional |
...
Attribute | Description | Default Value | Fixed Values | Mandatory/ OptionalNotes | ||
---|---|---|---|---|---|---|
forEvent | Defines the respective transition event for which the JavaScript function is executed. | Mandatory | this execution is performed. This gives you the flexibility to define executions for each event. | with using the | attribute.
...
...
...
Mandatory |
...
class | Defines the class that is executed at runtime. A user must give the full, qualified name of a class that implements the Execution interface, as the value of the class attribute. This class defines the business logic that is executed when the specified event takes place. This class manipulates the current and target environment of the underlying artifact when the state transition is performed on it. | Mandatory |
Sample implementations
Code Block |
---|
<execution forEvent="Promote" class="org.wso2.jaggery.scxml.generic.GenericExecutor"> |
...
Anchor |
---|
...
|
...
|
...
<parameter>
XML Syntax | <console function<parameter name="" value=""/> |
---|---|
Description | Defines the JavaScript function that ES needs to execute on the client-sideThe |
Mandatory/Optional | Optional |
...
Attribute | Description | Default Value | Fixed Values | Mandatory/ Optional | Notes | |
---|---|---|---|---|---|---|
function | Defines name | This attribute defines the name of the function that is executed when an asset moves from one lifecycle state to another. | Mandatory |
Sample implementations
Code Block | ||
---|---|---|
| ||
<console function="">
<script type="text/javascript"> </script>
</console> |
...
<server>
XML Syntax | <server function=""> |
---|---|
Description | This is the same as the |
Mandatory/Optional | Optional |
Attributes
Attribute | Description | Default Value | Fixed Values | Mandatory/ Optional | Notes |
---|---|---|---|---|---|
function | Defines the name of the function that is executed at an asset transition from one state to another. | Mandatory | The function should be a ES supported scripting language. |
Sample implementations
Code Block | ||
---|---|---|
| ||
<server function="">
<script type="text/javascript"></script>
</server> |
...
<Execution>
XML Syntax | <execution forEvent="" class=""/> |
---|---|
Description | An executor is business logic that is executed once a state transition takes place in a lifecycle. The |
Mandatory/Optional | Optional |
Attributes
Attribute | Description | Default Value | Fixed Values | Mandatory/ Optional | Notes |
---|---|---|---|---|---|
forEvent | Defines the event for which this execution is performed. This gives you the flexibility to define executions for each event. | Mandatory | The forEvent value is defined under the <transition> element with the event attribute. | ||
class | Defines the class that is executed at runtime. A user must give the full, qualified name of a class that implements the Execution interface, as the value of the class attribute. | Mandatory | This class defines the business logic that is executed when the specified event takes place. This class manipulates the current and target environment of the underlying artifact when the state transition is performed on it. |
Sample implementations
Code Block |
---|
<execution forEvent="Promote" class="org.wso2.carbon.governance.registry.extensions.executors.ServiceVersionExecutor"> |
...
<parameter>
XML Syntax | <parameter name="" value=""/> |
---|---|
Description | The |
Mandatory/Optional | Optional |
Attributes
...
This attribute defines the name of the parameter.
...
Sample implementations
Code Block |
---|
<data name="transitionExecution">
<execution forEvent="Promote" class="org.wso2.carbon.governance.registry.extensions.executors.ServiceVersionExecutor">
<parameter name="currentEnvironment" value="/_system/governance/trunk/{@resourcePath}/{@resourceName}"/>
<parameter name="targetEnvironment" value="/_system/governance/branches/testing/{@resourcePath}/{@version}/{@resourceName}"/>
<parameter name="service.mediatype" value="application/vnd.wso2-service+xml"/>
<parameter name="wsdl.mediatype" value="application/wsdl+xml"/>
<parameter name="endpoint.mediatype" value="application/vnd.wso2.endpoint"/>
</execution>
</data> |
...
<ui>
XML Syntax | <ui forEvent="" href=""/> |
---|---|
Description | A UI element is a mechanism to associate a user interface with a particular event during a given transition. This allows you to pass inputs that would be utilized when performing a transition. Note that you can not define an external reference link as the |
Mandatory/Optional | Optional |
Attributes
Attribute | Description | Default Value | Fixed Values | Mandatory/ Optional | Notes |
---|---|---|---|---|---|
forEvent | Defines the event for which the UI appears. | N/A | Optional | The forEvent value is defined under the <transition> element with the event attribute. | |
href | Defines the hyperlink that is opened and presented to the user, when a lifecycle transition operation is performed from the ES Management Console. | N/A | Optional |
Sample implementations
Code Block | ||
---|---|---|
| ||
<ui forEvent="Promote" href="../lifecycles/pre_invoke_aspect_ajaxprocessor.jsp?currentEnvironment=/_system/governance/branches/testing/"/> |
...
parameter.
|
| The first four parameters are mandatory. | ||||||||
value | This attribute defines the value held by the parameter.
For example:
|
|
Sample implementations
Code Block |
---|
<data name="transitionExecution">
<execution forEvent="Promote" class="org.wso2.jaggery.scxml.generic.GenericExecutor">
<parameter name="PERMISSION:get" value="http://www.wso2.org/projects/registry/actions/get" />
<parameter name="PERMISSION:add" value="http://www.wso2.org/projects/registry/actions/add" />
<parameter name="PERMISSION:delete" value="http://www.wso2.org/projects/registry/actions/delete" />
<parameter name="PERMISSION:authorize" value="authorize" />
<parameter name="STATE_RULE1:Created" value="Internal/private_{asset_author}:+get,+add,+delete,+authorize" />
<parameter name="STATE_RULE2:Created" value="Internal/reviewer:-get,-add,-delete,-authorize" />
<parameter name="STATE_RULE3:Created" value="Internal/everyone:-get,-add,-delete,-authorize" />
</execution>
</data> |
...
Anchor | ||||
---|---|---|---|---|
|
...
XML Syntax | <transition event="" target=""/> |
---|---|
Description | Defines the transitions, by specifying the name of the lifecycle state and the target lifecycle state, instead of using static transitions. Any number of transitions for one lifecycle state are supported. |
Mandatory/Optional | Mandatory |
Attributes
Attribute | Description | Default Value | Fixed Values | Mandatory/ Optional | Notes | |||
---|---|---|---|---|---|---|---|---|
event | Defines the transition event name , (e.g., Promote, Demote or any name that the user specifies. | N/A | Mandatory | you wish to specify). This event name is used in the | N/A | Mandatory | ||
target | Defines the target state of the transition. | N/A | Mandatory |
Sample implementations
Code Block | ||
---|---|---|
| ||
<transition event="Promote" target="Tested"/> |
...