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

Examples of org.camunda.bpm.engine.impl.variable.VariableType


    // type
    VariableTypes variableTypes = Context.getProcessEngineConfiguration()
      .getVariableTypes();

    VariableType variableType = variableTypes.getVariableType(formField.getTypeName());
    if(variableType == null) {
      throw new ProcessEngineException("Unsupported variable type '"+formField.getTypeName()+ "'.");
    }
    variableInstance.setType(variableType);
View Full Code Here


  protected VariableTypes variableTypes;

  public VariableType getResult(ResultSet rs, String columnName) throws SQLException {
    String typeName = rs.getString(columnName);
    VariableType type = getVariableTypes().getVariableType(typeName);
    ensureNotNull("unknown variable type name " + typeName, "type", type);
    return type;
  }
View Full Code Here

    return type;
  }

  public VariableType getResult(CallableStatement cs, int columnIndex) throws SQLException {
    String typeName = cs.getString(columnIndex);
    VariableType type = getVariableTypes().getVariableType(typeName);
    ensureNotNull("unknown variable type name " + typeName, "type", type);
    return type;
  }
View Full Code Here

    return variableTypes;
  }

  public VariableType getResult(ResultSet resultSet, int columnIndex) throws SQLException {
    String typeName = resultSet.getString(columnIndex);
    VariableType type = getVariableTypes().getVariableType(typeName);
    ensureNotNull("unknown variable type name " + typeName, "type", type);
    return type;
  }
View Full Code Here

      variableTypes.addType(new DoubleType());
      variableTypes.addType(new ByteArrayType());

      if (defaultSerializationFormat != null) {
        defaultSerializationFormat = defaultSerializationFormat.trim();
        VariableType serializationType = null;

        for (SerializationVariableTypeResolver resolver : serializationTypeResolvers) {
          serializationType = resolver.getTypeForSerializationFormat(defaultSerializationFormat);
          if (serializationType != null) {
            break;
          }
        }

        if (serializationType != null) {
          variableTypes.addType(serializationType);
        } else {
          throw new ProcessEngineException("Cannot find a VariableType that serializes objects"
              + " for the default format '" + defaultSerializationFormat + "'");
        }
      } else {
        variableTypes.addType(new SerializableType());
        if(ProcessEngineSpinSupport.isSpinAvailable()) {
          VariableType spinVariableType = ProcessEngineSpinSupport
            .getVariableTypeResolver()
            .getTypeForSerializationFormat("application/json; implementation=tree");
          variableTypes.addType(spinVariableType);
        }
      }
View Full Code Here

    if(jpaPersistenceUnitName!=null) {
      jpaEntityManagerFactory = JpaHelper.createEntityManagerFactory(jpaPersistenceUnitName);
    }
    if(jpaEntityManagerFactory!=null) {
      sessionFactories.put(EntityManagerSession.class, new EntityManagerSessionFactory(jpaEntityManagerFactory, jpaHandleTransaction, jpaCloseEntityManager));
      VariableType jpaType = variableTypes.getVariableType(ProcessEngineVariableType.JPA.getName());
      // Add JPA-type
      if(jpaType == null) {
        // We try adding the variable right before SerializableType, if available
        int serializableIndex = variableTypes.getTypeIndex(ProcessEngineVariableType.SERIALIZABLE.getName());
        if(serializableIndex > -1) {
View Full Code Here

    this.local = local;
  }
 
  public void initialize(VariableTypes types) {
    if(variableInstanceEntity == null) {
      VariableType type = types.findVariableType(value);
      if(type instanceof ByteArrayType) {
        throw new ProcessEngineException("Variables of type ByteArray cannot be used to query");
      } else if(type instanceof JPAEntityVariableType && operator != QueryOperator.EQUALS) {
        throw new ProcessEngineException("JPA entity variables can only be used in 'variableValueEquals'");
      } else {
View Full Code Here

TOP

Related Classes of org.camunda.bpm.engine.impl.variable.VariableType

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.