Obsolete Pages{{Obsolete}}
The official documentation is at: http://docs.alfresco.com
Web ServicesActions
Back to Alfresco Content Management Web Services.
History:
Action Web Service Version 1.3
This service provides CRUD for actions and rules. It also allows actions to be executed.
Data Types
ParameterDefintion
A parameter defintion contains the data about the nature of an action item parameter.
- xsd:string name - the name used to identify the parameter
- xsd:string type - the type of the parameter value
- xsd:boolean isMandatory - indicates whether the parameter is mandatory
- xsd:string displayLabel - the display label describing the parameter
ActionItemDefinitionType
Enum indicating the type of action item we are defining.
Values:
- Action - indicates we are defining an action
- Condition - indicates we are defining a condition
ActionItemDefinition
An action item defintion contains data that can be used to describe an action item be it an action or a condition.
- ActionItemDefintionType type - the action item defintion type
- xsd:string name - the name of the action item type used to identify it
- xsd:string title - the title of the action item type
- xsd:description - the description of the action item type
- xsd:boolean adHocPropertiesAllowed - indicates whether properties not defined are allowed or not
- ParameterDefintion[] parameterDefinitions - the parameters defined for this action item
Condition
A condition is used to evaluate whether an action can be executed given the current state of the content it is to be applied to:
- xsd:string id - the unique identifier
- xsd:string conditionName - the name of the action item definition that this condition relates to (must be a condition definition)
- xsd:boolean invertCondition - indicates whether the value of the evaluated condition should be inverted
- NamedValue[] parameters - an array of parameter values for the condition
Action
An action is a unit of work that can be applied to content.
- xsd:string id - the unique identifier. An action is given a unique identifier when it is saved. This attribute should be considered read-only.
- xsd:string actionName - the name of the aciotn item definition that this condition relates to (must be an action definition)
- xsd:string title - the title of the action
- xsd:string description - a description of the action
- asd:boolean executeAsynchronously - indicates whether the action is to be executed asynchronously or not
- NamedValue[] parameters - an array of parameter values for the action
- Condition[] conditions - an array of conditions to apply to this action
- Action compensatingAction - this is the compensating action. This is executed when an asynchonous failure occures and is designed to allow some compensating behaviour to take place.
- Action[] actions - if this action is defined as a composite action (by setting the type of action appropriatly) then this provides the actions that make up the composite action
- Reference reference - a reference to the node that this action has been saved against. Empty if the action has not been saved. This attribute should be considered read-only.
RuleType
The rule type indicates the collections of events that will cause a rule of that type to trigger.
- xsd:string name - the unique name of the rule type
- sxd:string displayLabel - the displayable name of the rule type
Rule
A rule is a collection of actions that will be executed when specific events are triggered within the repository.
- xsd:string id - the unique identifier. A rule is given a unique identifier when it is saved. It should be considered a read-only attribute.
- xsd:string ruleType - the rule type indicates the group of events that will cause this rule to be executed.
- xsd:string title - the title.
- xsd:string description - the description.
- xsd:boolean executeAsynchronously - indicates whether the rule should be executed asychronously.
- Condition[] conditions - the conditions that should be evaluated before the rule is executed.
- Action[] actions - the actions that will be executed when the rule is triggered.
- xsd:string runAsUserName - the name of the user that the rule will be 'run as'. If unset this will be the currently authenticated user.
- Reference reference - the reference to the content node that the rule is stored against.
ActionFilter
Used to filter the results when retrieving actions from the repository. (more filter parameters may be supported in the future)
- xsd:string[] ids - the id of a returned rule must match a value in this array
RuleFilter
Used to filter the results when retrieving rules from the repository. (more filter prarameters may be supported in the future)
- xsd:string[] ids - the id of a returned rule must match a value in this array
- xsd:string[] ruleTypeNames ruleTypeNames - the name of the rule type of a returned rule must match a value in this array
- xsd:boolean includeInherited - if set to false then only rules that are defined on the passed reference will be returned otherwise all rule, including those inherited, will be returned.
ActionExecutionResult
Used to contain the result of an action execution.
- Reference reference - a reference to the node that has been actioned upon
- Action[] actions - an array containing the executed actions
Methods
getConditionDefintions
Get the available condition definitions.
ActionItemDefinitionType[] getConditionDefintions()
Return:
- An array containg the definitions of all the available conditions
getActionDefintions
Get the available action defintions.
ActionItemDefinitionType[] getActionDefintions()
Return:
- An array containing the definitions of all the available actions
getActionItemDefintion
Get the named action item defintion.
ActionItemDefintion getActionItemDefintion (xsd:string name, ActionItemDefinitionType defintionType)
Parameters:
- name - the name of the required condition defintion
- defintionType - the type of definition required
Return:
- The action item defintion that relates to the name specified (null if no match found)
getRuleTypes
Get the availble rule types.
RuleType[] getRuleTypes()
Return:
- An array of available rule types
getRuleType
Get the named rule type.
RuleType getRuleType(xsd:string name)
Parameters:
- The name of the requested rule type
Return:
- The requested rule type (null if no match found)
getActions
Get the actions saved against a reference. The action filter can be used to narrow the resulting list. If no filter is provided then all the saved actions will be returned.
Action[] getActions(Reference reference, ActionFilter filter)
Parameters:
- reference - a reference to the content node where the actions have been saved.
- filter - an optional filter which can be used to narrow the result returned.
Return:
saveActions
Save actions against a given reference.
Action[] saveActions(Reference reference, Action[] actions)
Parameters:
- reference - the reference
- actions - a list of actions to save. If these actions are already saves against this reference then they will be updated.
Return:
- a list of the saved (updated) actions. If they have been saved for the first time they will have been updated with a unique id and a reference ot the node that they are saved against.
removeActions
void removeActions(Reference reference, Action[] actions)
executeActions
ActionExecutionResult[] executeActions(Predicate predicate, Action[] actions)
getRules
Rule[] getRules(Reference reference, RuleFilter ruleFilter)
saveRules
Rule[] saveRules(Reference reference, Rule[] rules)
removeRules
void removeRules(Reference reference, Rule[] rules)