Package org.activiti.rest.service.api.engine.variable.RestVariable

Examples of org.activiti.rest.service.api.engine.variable.RestVariable.RestVariableScope


  public RestVariable getVariableFromRequest(String taskId, String variableName,
      String scope, boolean includeBinary, String serverRootUrl) {
   
    boolean variableFound = false;
    Object value = null;
    RestVariableScope variableScope = RestVariable.getScopeFromString(scope);
    if (variableScope == null) {
      // First, check local variables (which have precedence when no scope is supplied)
      if (taskService.hasVariableLocal(taskId, variableName)) {
        value = taskService.getVariableLocal(taskId, variableName);
        variableScope = RestVariableScope.LOCAL;
View Full Code Here


        }
      } else {
        variableType = RestResponseFactory.BYTE_ARRAY_VARIABLE_TYPE;
      }
     
      RestVariableScope scope = RestVariableScope.LOCAL;
      if (variableScope != null) {
        scope = RestVariable.getScopeFromString(variableScope);
      }
     
      if (variableType.equals(RestResponseFactory.BYTE_ARRAY_VARIABLE_TYPE)) {
View Full Code Here

    if (restVariable.getName() == null) {
      throw new ActivitiIllegalArgumentException("Variable name is required");
    }

    // Figure out scope, revert to local is omitted
    RestVariableScope scope = restVariable.getVariableScope();
    if (scope == null) {
      scope = RestVariableScope.LOCAL;
    }
   
    Object actualVariableValue = restResponseFactory.getVariableValue(restVariable);
View Full Code Here

      @RequestParam(value="scope", required=false) String scopeString, HttpServletResponse response) {
   
    Task task = getTaskFromRequest(taskId);
   
    // Determine scope
    RestVariableScope scope = RestVariableScope.LOCAL;
    if (scopeString != null) {
      scope = RestVariable.getScopeFromString(scopeString);
    }

    if (!hasVariableOnScope(task, variableName, scope)) {
      throw new ActivitiObjectNotFoundException("Task '" + task.getId() + "' doesn't have a variable '" +
          variableName + "' in scope " + scope.name().toLowerCase(), VariableInstanceEntity.class);
    }
   
    if (scope == RestVariableScope.LOCAL) {
      taskService.removeVariableLocal(task.getId(), variableName);
    } else {
View Full Code Here

TOP

Related Classes of org.activiti.rest.service.api.engine.variable.RestVariable.RestVariableScope

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.