Rule REST API Design Notes - Action Parameter List Constraints

cancel
Showing results for 
Search instead for 
Did you mean: 

Rule REST API Design Notes - Action Parameter List Constraints

resplin
Intermediate
0 0 1,473

Obsolete Pages{{Obsolete}}

The official documentation is at: http://docs.alfresco.com




Update web scripts


  • Update action definition to contain constraint list name.  Note the added 'constraint' property to the parameter definitions objects for both the ActionDefinition payload and the ActionConditionDefinition payload.

ActionDefinition Update


{
   'name' : string,
   'displayLabel' : string,
   'description' : string,
   'adHocPropertiesAllowed' : boolean,
   'parameterDefinitions' :
   [
      {
         'name' : string,
         'displayLabel' : string,
         'type' : string,
         'constraint' : string,
         'isMultiValued' : boolean,
         'isMandatory' : boolean
      },
      ...
   ],
   'applicableTypes' :
   [
      string,
      string,
      ...
   ]
}

ActionConditionDefinition Update


{
   'name' : string,
   'displayLabel' : string,
   'description' : string,
   'adHocPropertiesAllowed' : boolean,
   'parameterDefinitions' :
   [
      {
         'name' : string,
         'displayLabel' : string,
         'type' : string,
         'constraint' : string,
         'isMultiValued' : boolean,
         'isMandatory' : boolean
      },
      ...
   ]
}

  • Add web script to get the list of values for an action constraint.

Action Constraint Data Payload


{
   'name' : string,
   'values' : 
   [
      {
         'value' : string,
         'displayLabel' : string
      },
      ...  
   ]
}

Action Constraint Collection Resource


A collection of action constraints.


Get Action Constraints Collection


GET /api/actionConstraints
   ?name={name?}