use of org.activiti.engine.impl.variable.VariableType in project Activiti by Activiti.
the class IbatisVariableTypeHandler method getResult.
public VariableType getResult(CallableStatement cs, int columnIndex) throws SQLException {
String typeName = cs.getString(columnIndex);
VariableType type = getVariableTypes().getVariableType(typeName);
if (type == null) {
throw new ActivitiException("unknown variable type name " + typeName);
}
return type;
}
use of org.activiti.engine.impl.variable.VariableType in project Activiti by Activiti.
the class IbatisVariableTypeHandler method getResult.
public VariableType getResult(ResultSet resultSet, int columnIndex) throws SQLException {
String typeName = resultSet.getString(columnIndex);
VariableType type = getVariableTypes().getVariableType(typeName);
if (type == null) {
throw new ActivitiException("unknown variable type name " + typeName);
}
return type;
}
use of org.activiti.engine.impl.variable.VariableType in project Activiti by Activiti.
the class VariableScopeImpl method updateVariableInstance.
protected void updateVariableInstance(VariableInstanceEntity variableInstance, Object value, ExecutionEntity sourceActivityExecution) {
// Always check if the type should be altered. It's possible that the previous type is lower in the type
// checking chain (e.g. serializable) and will return true on isAbleToStore(), even though another type
// higher in the chain is eligible for storage.
VariableTypes variableTypes = Context.getProcessEngineConfiguration().getVariableTypes();
VariableType newType = variableTypes.findVariableType(value);
if ((variableInstance != null) && (!variableInstance.getType().equals(newType))) {
variableInstance.setValue(null);
variableInstance.setType(newType);
variableInstance.forceUpdate();
variableInstance.setValue(value);
} else {
variableInstance.setValue(value);
}
Context.getCommandContext().getHistoryManager().recordHistoricDetailVariableCreate(variableInstance, sourceActivityExecution, isActivityIdUsedForDetails());
Context.getCommandContext().getHistoryManager().recordVariableUpdate(variableInstance);
}
Aggregations