Package org.camunda.bpm.engine.impl.core.variable

Examples of org.camunda.bpm.engine.impl.core.variable.VariableMapImpl


*
*/
public class Variables {

  public static VariableMap createVariables() {
    return new VariableMapImpl();
  }
View Full Code Here


  public static VariableMap fromMap(Map<String, Object> map) {
    if(map instanceof VariableMap) {
      return (VariableMap) map;
    }
    else {
      return new VariableMapImpl(map);
    }
  }
View Full Code Here

    }
  }

  protected void ensureVariablesInitialized() {
    if (this.variables == null) {
      this.variables = new VariableMapImpl();
    }
  }
View Full Code Here

    }
  }

  protected void ensureVariablesLocalInitialized() {
    if (this.variablesLocal == null) {
      this.variablesLocal = new VariableMapImpl();
    }
  }
View Full Code Here

      .getCaseExecutionManager()
      .findCaseExecutionById(caseExecutionId);

    ensureNotNull(CaseExecutionNotFoundException.class, "case execution " + caseExecutionId + " doesn't exist", "caseExecution", caseExecution);

    VariableMapImpl result = new VariableMapImpl();
    // collect variables
    caseExecution.collectVariables(result, variableNames, isLocal, deserializeValues);

    return result;
  }
View Full Code Here

      .getTaskManager()
      .findTaskById(taskId);

    ensureNotNull("task " + taskId + " doesn't exist", "task", task);

    VariableMapImpl variables = new VariableMapImpl();

    // collect variables from task
    task.collectVariables(variables, variableNames, isLocal, deserializeValues);

    return variables;
View Full Code Here

    if(task == null) {
      throw new BadUserRequestException("Cannot find task with id '"+resourceId+"'.");
    }

    VariableMapImpl result = new VariableMapImpl();

    // first, evaluate form fields
    TaskFormData taskFormData = task.getTaskDefinition().getTaskFormHandler().createTaskForm(task);
    for (FormField formField : taskFormData.getFormFields()) {
      if(formVariableNames == null || formVariableNames.contains(formField.getId())) {
        result.put(formField.getId(), createVariable(formField, task));
      }
    }

    // collect remaining variables from task scope and parent scopes
    task.collectVariables(result, formVariableNames, false, deserializeObjectValues);
View Full Code Here

  public VariableMap execute(CommandContext commandContext) {

    StartFormData startFormData = new GetStartFormCmd(resourceId)
      .execute(commandContext);

    VariableMap result = new VariableMapImpl();

    for (FormField formField : startFormData.getFormFields()) {
      if(formVariableNames == null || formVariableNames.contains(formField.getId())) {
        result.put(formField.getId(), createVariable(formField, null));
      }
    }

    return result;
  }
View Full Code Here

      formFields.add(formFieldHandler.createFormField(execution));
    }
  }

  public void submitFormVariables(VariableMap properties, VariableScope variableScope) {
    VariableMap propertiesCopy = new VariableMapImpl(properties);

    // support legacy form properties
    for (FormPropertyHandler formPropertyHandler: formPropertyHandlers) {
      // submitFormProperty will remove all the keys which it takes care of
      formPropertyHandler.submitFormProperty(variableScope, propertiesCopy);
    }

    // support form data:
    for (FormFieldHandler formFieldHandler : formFieldHandlers) {
      formFieldHandler.handleSubmit(variableScope, propertiesCopy, properties);
    }

    // any variables passed in which are not handled by form-fields or form
    // properties are added to the process as variables
    for (String propertyId: propertiesCopy.keySet()) {
      variableScope.setVariable(propertyId, propertiesCopy.getValueTyped(propertyId));
    }

    fireFormPropertyHistoryEvents(properties, variableScope);
  }
View Full Code Here

  public VariableMapImpl getVariablesTyped() {
    return getVariablesTyped(true);
  }

  public VariableMapImpl getVariablesTyped(boolean deserializeValues) {
    VariableMapImpl variableMap = new VariableMapImpl();
    collectVariables(variableMap, null, false, deserializeValues);
    return variableMap;
  }
View Full Code Here

TOP

Related Classes of org.camunda.bpm.engine.impl.core.variable.VariableMapImpl

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.