Versions Compared

Key

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

...

  • <aspect>
  •       <configuration>
  •            <lifecycle>
  •                <scxml>
  •                     <state>
  •                          <datamodel>
  •                               <data>
  •                                     <item>
  •                                           <permissions>
  •                                                 <permission>
  •                                           <validations>
  •                                                 <validation>
  •                                                       <parameter>
  •                                     <js forEvent=""> <js>
  •                                           <console function="">
  •                                                 <script type="text/javascript">
  •                                           <server function="">
  •                                                 <script type="text/javascript">
  •                                     <execution forEvent="" class="">
  •                                           <parameter name="" value=""/>
  •                                     <ui forEvent="" href=""/>
  •                          <transition event="" target=""/>

...

XML Syntax<scxml xmlns="" version="" initialstate=""/>
Description

This is the element that contains the new, SCXML-based configuration. SCXML is one of many standards supported by the WSO2 Governance Registry. Read more on Supported APIs & Standards for a complete list of standards supported by WSO2 Governance Registry.

Up to this point of the configuration, there can be only one of each of the elements described above. They all provide meta data about the lifecycle (name, class, and other information). The elements that appear after this one contain the actual configuration.

Type 
Default Value 
Fixed Values 
Mandatory/Optional 

...

<data> 
Anchor
data
data

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 UIs. This element describes the data of its child elements.

Type 
Default Value 
Fixed Values 
Mandatory/Optional 

...

XML Syntax<item name="" forEvent=""/>
Description

 

Type 
Default Value 
Fixed Values 
Mandatory/Optional 

...

<validation> 
Anchor
validation
validation

XML Syntax <validation forEvent="" class=""/>
Description

Validations are an important part of lifeCycles. The validation element defines the event and the validation class that has to be invoked at runtime.

Type 
Default Value 
Fixed Values 
Mandatory/Optional 

...

Sample Implementations

 

Back to Top ^

...

<parameter>
Anchor
parameter
parameter

XML Syntax<parameter name="" value=""/>
Description

The parameter elements are used to give parameters to the validation and execution classes. It is up to the user to define the name value pairs, and the parameter element has attributes to define these values. A validation element or an execution element can have more than one parameter element and it is up to the user code to handle this. The underline implementation of the DefaultLifeCycle class will pass all the parameters in a map object.

Type 
Default Value 
Fixed Values 
Mandatory/Optional 
Attributes of the Element
AttributeDescriptionTypeDefault ValueFixed ValuesMandatory/OptionalNotes
name

 

     
value      
Sample Implementations

 

Back to Top ^

...

<js>
Anchor
js
js

XML Syntax 
Description

Governance Registry lifeCycle configuration has the ability to allow JavaScript functions to execute on both the server side and the client side. The js element defines the scripts that need to be executed for different events.

Type 
Default Value 
Fixed Values 
Mandatory/Optional 
Attributes of the Element
AttributeDescriptionTypeDefault ValueFixed ValuesMandatory/OptionalNotes
forEvent

 Defines the transition action where this JavaScript function needs to be executed.

     
Sample Implementations

 

Back to Top ^

...

 


 

<execution forEvent="" class="">

...

  • The forEvent attribute - Defines the event for which this execution should be performed. This gives user the flexibility to define executions for each event.
  • The class attribute - Defines the class that needs to be executed at runtime. A user must give the full, qualified name of a class that implements the Execution interface, as the value of the attribute class.
<parameter name="" value=""/>

The parameter elements are used to give parameters to the validation and execution classes. It is up to the user to define the name value pairs, and the parameter element has attributes to define these values. A validation element or an execution element can have more than one parameter element and it is up to the user code to handle this. The underline implementation of the DefaultLifeCycle class will pass all the parameters in a map object.

 

<ui forEvent="" href=""/>

...

  • The forEvent attribute - Defines the event for which this UI will be presented.
  • The href attribute - Defines the hyperlink that will be opened and presented to the user, when a lifecycle operation is performed from the Management Console.
<js forEvent="">

Governance Registry lifeCycle configuration has the ability to allow JavaScript functions to execute on both the server side and the client side. The js element defines the scripts that need to be executed for different events.

The forEvent attribute defines the transition action where this JavaScript function needs to be executed. 

<console function="">

The console element defines the JavaScript function that needs to be executed on the client side.
The function attribute defines the name of the function which will be executed at a transition of one state to another.

...