...
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.
...
...
<aspect>
...
Back to Top ^
...
...
<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 execution element defines the event and the execution class that is invoked at runtime. |
---|
Mandatory/Optional | Optional |
---|
...
Code Block |
---|
<execution forEvent="Promote" class="org.wso2.jaggery.scxml.generic.GenericExecutor"> |
Back to Top ^
...
...
...
<parameter>
XML Syntax | <parameter name="" value=""/> |
---|
Description | The name attribute defines the name of the parameter and value attribute defines the corresponding value of the parameter. This parameter element is defined under the <execution> element. |
---|
Mandatory/Optional | Optional |
---|
Attributes
...
Attribute | Description | Default Value | Fixed Values | Mandatory/ Optional |
---|
name | This attribute defines the name of the parameter. - If you use the
org.wso2.jaggery.scxml.generic.GenericExecutor executor, it is mandatory to specify the following default permissions as it is needed for the ES permission model.PERMISSION:get PERMISSION:add
PERMISSION:delete
PERMISSION:authorize
- In addition, you can specify custom rules for specific user roles that are executed when various state transitions take place.
| | - ES permission model related values
- PERMISSION:get
PERMISSION:add PERMISSION:delete PERMISSION:authorize
| The first four parameters are mandatory. |
value | This attribute defines the value held by the parameter.
- If you use the
org.wso2.jaggery.scxml.generic.GenericExecutor executor, it is mandatory to specify the following default permissions names together with their corresponding values as it is needed for the ES permission model.PERMISSION:get PERMISSION:add
PERMISSION:delete
PERMISSION:authorize
- In addition, you can specify custom rules for specific user roles that are executed when various state transitions take place. In each of these rules you can specify as to which permission is added or removed when the state transition takes place. Permissions are added and removed in the following manner:
+ <PERMISSION>
For example, + delete means that the delete permission is added when the lifecycle state transition occurs.- <PERMISSION>
For example, - delete means that the delete permission is removed when the lifecycle state transition occurs.
For example: Code Block |
---|
<parameter name="STATE_RULE1:Created" value="Internal/private_{asset_author}:+get,+add,+delete,+authorize" /> |
This means that when the lifecycle state changes to Created, the get, add, delete and authorize permissions are added to the private_{asset_author} user permission. Code Block |
---|
<parameter name="STATE_RULE2:Created" value="Internal/reviewer:-get,-add,-delete,-authorize" /> |
This means that when the lifecycle state changes to Created, the get, add, delete and authorize permissions are removed from the Internal/reviewer user permission. Code Block |
---|
<parameter name="STATE_RULE3:Created" value="Internal/everyone:-get,-add,-delete,-authorize" /> |
This means that when the lifecycle state changes to Created, the get, add, delete and authorize permissions are removed from the Internal/everyone user permission.
| | | |
...
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 |
---|
...
Attribute | Description | Default Value | Fixed Values | Mandatory/ OptionalNotes |
---|
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 forEvent to trigger a specific event, before this transition this going on. | N/A | | Mandatory |
target | Defines the target state of the transition. | N/A | | Mandatory |
Sample implementations
Code Block |
---|
|
<transition event="Promote" target="Tested"/> |
...