Versions Compared

Key

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

...

Code Block
<execution forEvent="Promote" class="org.wso2.jaggery.scxml.generic.GenericExecutor">

 

Back to Top ^

...

Anchor

...

parameter

...

parameter

<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/OptionalOptional
Attributes

...

AttributeDescriptionDefault ValueFixed ValuesMandatory/
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.
valueThis 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.

 
 
  • ES permission model related values

    • http://www.wso2.org/projects/registry/actions/get

    • http://www.wso2.org/projects/registry/actions/add

    • http://www.wso2.org/projects/registry/actions/delete

    • authorize

 

...