Search in sources :

Example 1 with VariableScope

use of org.alfresco.rest.workflow.api.model.VariableScope in project alfresco-remote-api by Alfresco.

the class TaskVariablesRelation method readAll.

/**
 * List the tasks variables.
 *
 * @see org.alfresco.rest.framework.resource.actions.interfaces.RelationshipResourceAction.Read#readAll(java.lang.String, org.alfresco.rest.framework.resource.parameters.Parameters)
 */
@Override
@WebApiDescription(title = "Get Task Variables", description = "Get a paged list of the task variables")
public CollectionWithPagingInfo<TaskVariable> readAll(String taskId, Parameters parameters) {
    VariableScope scope = VariableScope.ANY;
    if (parameters.getQuery() != null) {
        TaskVariablesWalkerCallback callback = new TaskVariablesWalkerCallback();
        QueryHelper.walk(parameters.getQuery(), callback);
        scope = callback.getScope();
    }
    return tasks.getTaskVariables(taskId, parameters.getPaging(), scope);
}
Also used : TaskVariablesWalkerCallback(org.alfresco.rest.workflow.api.impl.TaskVariablesWalkerCallback) VariableScope(org.alfresco.rest.workflow.api.model.VariableScope) WebApiDescription(org.alfresco.rest.framework.WebApiDescription)

Aggregations

WebApiDescription (org.alfresco.rest.framework.WebApiDescription)1 TaskVariablesWalkerCallback (org.alfresco.rest.workflow.api.impl.TaskVariablesWalkerCallback)1 VariableScope (org.alfresco.rest.workflow.api.model.VariableScope)1