Versions Compared

Key

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

...

Attributes
 
AttributeDescriptionTypeDefault 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 
classDefines the class that is associated with the lifecycle. 
  • org.wso2.jaggery.scxml.aspects.
    JaggeryTravellingPermissionLifeCycle
  • org.wso2.carbon.governance.registry.
    extensions.aspects.DefaultLifeCycle 

 

 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.

...

Attributes
AttributeDescriptionTypeDefault ValueFixed ValuesMandatory/
Optional
Notes
typeDefines how the lifecycle is configured. N/A
  • literal - Use this option when 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 

...

Attributes
Type 
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 lifecycle.

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

...

Attributes
 
AttributeDescriptionTypeDefault ValueFixed ValuesMandatory/
Optional
Notes
idDefines the name of the lifecycle state.N/A Mandatory 
Sample implementations

...

Attributes
Type 
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 - 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 

...

Attributes
AttributeDescriptionTypeDefault ValueFixed ValuesMandatory/
Optional
Notes
nameDefines the name of the check item. ES allows you to define check items for each transition. N/A Optional 
forEventDefines whether the check item is required for a specific transition. A check item can be required for more than one event, in which case, a user can give a comma (",") separated list for the forEvent attribute. Null : Keeping the forEvent attribute empty means that a specific check item is not required for any transition event. OptionalThe forEvent value is defined under the <transition> element with the event  attribute.

...

Attributes
Type 
AttributeDescriptionDefault ValueFixed ValuesMandatory/
Optional
Notes
rolesDefines the name of the user role to do the specified action.  MandatoryYou can define multiple user roles as comma (",") separated.

...

Attributes
Type
AttributeDescriptionDefault ValueFixed ValuesMandatory/
Optional
Notes
forEvent

Defines the event for which this validation should be performed. This gives you the flexibility to define validations for each event. As you have the ability to define validations for check items, it makes it easy to validate different things at different levels.

 N/A MandatoryThe forEvent value is defined under the <transition> element with the event  attribute.
classDefines the class that is executed at runtime to perform the validation. You must give the full, qualified name of a class that implements the CustomValidations interface, as the value for the class attribute. N/A Mandatory 
Sample implementations

...

Attributes
Type 
AttributeDescriptionDefault ValueFixed ValuesMandatory/
Optional
Notes
name

Defines the name used to identify the parameter.

N/A Mandatory 
valueDefines the value of the defined parameter. N/A Mandatory 
Sample implementations

...

Attributes
AttributeDescriptionTypeDefault ValueFixed ValuesMandatory/OptionalNotes
forEvent

Defines the respective transition for which the JavaScript function is executed.

   MandatoryThe forEvent value is defined under the <transition> element with the event  attribute.

...

Attributes
 
AttributeDescriptionTypeDefault ValueFixed ValuesMandatory/OptionalNotes
function

Defines the name of the function that is executed when an asset moves from one lifecycle state to another.

  Mandatory 
Sample implementations

...

Attributes
Type 
AttributeDescriptionDefault ValueFixed ValuesMandatory/
Optional
Notes
type

The scripting language that is supported by ES.

 Set to text/javascript because at the time of this writing, ES only supports JavaScript as a scripting language.Mandatory 

...

Attributes
AttributeDescriptionTypeDefault ValueFixed ValuesMandatory/
Optional
Notes
function

Defines the name of the function that is executed at an asset transition from one state to another.

   MandatoryThe function should be a ES supported scripting language.

...

Attributes
Type 
AttributeDescriptionDefault ValueFixed ValuesMandatory/
Optional
Notes
forEvent

Defines the event for which this execution is performed. This gives you the flexibility to define executions for each event.

  MandatoryThe forEvent value is defined under the <transition> element with the event attribute.
classDefines 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.    MandatoryThis 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.

...

Attributes
AttributeDescriptionTypeDefault ValueFixed ValuesMandatory/
Optional
Notes
name

This attribute defines the name of the parameter. 

  
  • currentEnvironment - This defines the fully qualified path of the underlying resource at its current state (before the transition takes place).

  • targetEnvironment - This parameter defines the fully qualified path to which the particular resource is transited when a particular state transition takes place which is defined in the "forevent" attribute of the <execution> element. 
     
  • service.mediatype - This parameter denotes the MIME mediatype of the given service under the state transition.

  • wsdl.mediatype - This parameter denotes the MIME mediatype of the WSDL file for the corresponding service under the state transition.

  • endpoint.mediatype - This parameter denotes the MIME mediatype of the endpoint for the given asset type when the particular state transition takes place.
all these parameters are mandatory. 
valueThis attribute defines the value held by 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>

...

Attributes
Type 
AttributeDescriptionDefault ValueFixed ValuesMandatory/
Optional
Notes
forEvent

Defines the event for which the UI appears.

N/A OptionalThe forEvent value is defined under the <transition> element with the event  attribute.
hrefDefines 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

...

Attributes
AttributeDescriptionTypeDefault ValueFixed ValuesMandatory/
Optional
Notes
event

Defines the transition event name, e.g., Promote, Demote or any name that the user specifies.

 N/A MandatoryThis event name is used in the forEvent to trigger a specific event, before this transition this going on.
targetDefines the target state of the transition. N/A Mandatory 
Sample implementations

...