Package org.camunda.bpm.engine.impl.persistence.entity

Examples of org.camunda.bpm.engine.impl.persistence.entity.VariableInstanceEntity


    } else {
      VariableType type = getVariableTypeForValue(value);

      // create variable instance
      VariableInstanceEntity variableInstance = VariableInstanceEntity.createAndInsert(variableName, type, value);
      initializeVariableInstanceBackPointer(variableInstance);
      variableInstances.put(variableName, variableInstance);

      // fire CREATE event
      if(isAutoFireHistoryEvents()) {
View Full Code Here


    if (!type.isAbleToStoreSerializedValue(value, configuration)) {
      throw new BadUserRequestException("Variable type " + variableTypeName + " cannot store provided serialized value and "
          + "configuration");
    }

    VariableInstanceEntity variableInstance = VariableInstanceEntity.createFromSerializedValue(variableName, type, value, configuration);
    VariableInstanceEntity.insert(variableInstance);
    initializeVariableInstanceBackPointer(variableInstance);
    variableInstances.put(variableName, variableInstance);

    // fire CREATE event
View Full Code Here

    return type;
  }

  public void clearForNewValue(PersistentVariableInstance variableInstance, VariableType newType) {
    VariableInstanceEntity variableInstanceEntity = (VariableInstanceEntity) variableInstance;

    VariableType currentType = variableInstanceEntity.getType();

    // clear the variable only if the types are different
    if (currentType.getTypeName().equals(newType.getTypeName())) {
      return;
    }

    variableInstanceEntity.clear();

    // set the new type
    variableInstanceEntity.setType(newType);
  }
View Full Code Here

      return result;
    }

    // iterate over the result array to initialize the value and serialized value of the variable
    for (VariableInstance variableInstance : result) {
      VariableInstanceEntity variableInstanceEntity = (VariableInstanceEntity) variableInstance;

      if (shouldFetchSerializedValueFor(variableInstanceEntity)) {
        try {
          variableInstanceEntity.getSerializedValue();

          if (shouldFetchValueFor(variableInstanceEntity)) {
            variableInstanceEntity.getValue();
          }

        } catch(Exception t) {
          // do not fail if one of the variables fails to load
          LOGGER.log(Level.FINE, "Exception while getting value for variable", t);
View Full Code Here

TOP

Related Classes of org.camunda.bpm.engine.impl.persistence.entity.VariableInstanceEntity

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.