Examples of VariableInstanceEntity


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

          ProcessEngineVariableType.SPIN.getName(),
          serializedVariableValue.getConfig(),
          sourceActivityExecution);

    } else {
      VariableInstanceEntity variableInstanceEntity = (VariableInstanceEntity) variableInstance;

      if (!canStoreValue(variableInstanceEntity, value)) {
        clearForNewValue(variableInstanceEntity, getVariableTypeForValue(value));
      }

      variableInstanceEntity.setValue(value);

      // fire UPDATE event
      if(isAutoFireHistoryEvents()) {
        fireHistoricVariableInstanceUpdate(variableInstanceEntity, sourceActivityExecution);
      }
View Full Code Here

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

    }
  }

  public void setVariableInstanceValueFromSerialized(PersistentVariableInstance variableInstance, Object value, String variableTypeName,
      Map<String, Object> configuration, CoreVariableScope<PersistentVariableInstance> sourceActivityExecution) {
    VariableInstanceEntity variableInstanceEntity = (VariableInstanceEntity) variableInstance;

    if (!canStoreSerializedValue(variableInstanceEntity, value, configuration)) {
      clearForNewValue(variableInstanceEntity, getVariableTypeByName(variableTypeName));
    }

    variableInstanceEntity.setValueFromSerialized(value, configuration);

    // fire UPDATE event
    if(isAutoFireHistoryEvents()) {
      fireHistoricVariableInstanceUpdate(variableInstanceEntity, sourceActivityExecution);
    }
View Full Code Here

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

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

    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

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

    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

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

      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
Copyright © 2018 www.massapi.com. 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.