• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java VariableTypes类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.activiti.engine.impl.variable.VariableTypes的典型用法代码示例。如果您正苦于以下问题:Java VariableTypes类的具体用法?Java VariableTypes怎么用?Java VariableTypes使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



VariableTypes类属于org.activiti.engine.impl.variable包,在下文中一共展示了VariableTypes类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: configure

import org.activiti.engine.impl.variable.VariableTypes; //导入依赖的package包/类
@Override
public void configure(ProcessEngineConfigurationImpl processEngineConfiguration)
{
    // There is an issue when using Activiti with Oracle. When workflow variables have a length greater then 2000 and smaller than 4001,
    // Activiti tries to store that as a String column, but the Oracle database column length (ACT_RU_VARIABLE.TEXT_, ACT_HI_VARINST.TEXT_) is 2000.
    // Since Activiti uses NVARCHAR as the column type which requires 2 bytes for every character, the maximum size Oracle allows for the column is
    // 2000 (i.e. 4000 bytes).

    // Replace the StringType and LongType to store greater than 2000 length variables as blob.
    VariableTypes variableTypes = processEngineConfiguration.getVariableTypes();

    VariableType stringType = new StringType(2000);
    int indexToInsert = replaceVariableType(variableTypes, stringType, 0);

    VariableType longStringType = new LongStringType(2001);
    replaceVariableType(variableTypes, longStringType, ++indexToInsert);
}
 
开发者ID:FINRAOS,项目名称:herd,代码行数:18,代码来源:HerdProcessEngineConfigurator.java


示例2: replaceVariableType

import org.activiti.engine.impl.variable.VariableTypes; //导入依赖的package包/类
/**
 * Inserts the variableType in variableTypes at the given index. If variableType already exists, then it replaces the type at the location where it already
 * exists.
 *
 * @param variableTypes the variableTypes
 * @param variableTypeToReplace the variableType to insert
 * @param indexToInsert the index to insert variableType
 *
 * @return the index where variableType was inserted.
 */
private int replaceVariableType(VariableTypes variableTypes, VariableType variableTypeToReplace, int indexToInsert)
{
    int indexToInsertReturn = indexToInsert;

    VariableType existingVariableType = variableTypes.getVariableType(variableTypeToReplace.getTypeName());
    if (existingVariableType != null)
    {
        indexToInsertReturn = variableTypes.getTypeIndex(existingVariableType.getTypeName());

        variableTypes.removeType(existingVariableType);
    }
    variableTypes.addType(variableTypeToReplace, indexToInsertReturn);

    return indexToInsertReturn;
}
 
开发者ID:FINRAOS,项目名称:herd,代码行数:26,代码来源:HerdProcessEngineConfigurator.java


示例3: createVariableLocal

import org.activiti.engine.impl.variable.VariableTypes; //导入依赖的package包/类
public void createVariableLocal(String variableName, Object value) {
  ensureVariableInstancesInitialized();
  
  if (variableInstances.containsKey(variableName)) {
    throw new ActivitiException("variable '"+variableName+"' already exists. Use setVariableLocal if you want to overwrite the value");
  }
  
  VariableTypes variableTypes = Context
    .getProcessEngineConfiguration()
    .getVariableTypes();
  
  VariableType type = variableTypes.findVariableType(value);
 
  VariableInstanceEntity variableInstance = VariableInstanceEntity.createAndInsert(variableName, type, value);
  initializeVariableInstanceBackPointer(variableInstance);
  variableInstances.put(variableName, variableInstance);
  
  setVariableInstanceValue(value, variableInstance);
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:20,代码来源:VariableScopeImpl.java


示例4: updateVariableInstance

import org.activiti.engine.impl.variable.VariableTypes; //导入依赖的package包/类
protected void updateVariableInstance(VariableInstanceEntity variableInstance, Object value, ExecutionEntity sourceActivityExecution) {

     // type should be changed
 if ((variableInstance != null) && (!variableInstance.getType().isAbleToStore(value))) {
	    VariableTypes variableTypes = Context
	    	      .getProcessEngineConfiguration()
	    	      .getVariableTypes();
	    VariableType newType = variableTypes.findVariableType(value);
	    variableInstance.setValue(null);
	    variableInstance.setType(newType);
	    variableInstance.forceUpdate();
  }
   variableInstance.setValue(value);

   Context.getCommandContext().getHistoryManager()
     .recordHistoricDetailVariableCreate(variableInstance, sourceActivityExecution, isActivityIdUsedForDetails());
   
   Context.getCommandContext().getHistoryManager()
     .recordVariableUpdate(variableInstance);
 }
 
开发者ID:springvelocity,项目名称:xbpm5,代码行数:21,代码来源:VariableScopeImpl.java


示例5: createVariableInstance

import org.activiti.engine.impl.variable.VariableTypes; //导入依赖的package包/类
protected VariableInstanceEntity createVariableInstance(String variableName, Object value, ExecutionEntity sourceActivityExecution) {
  VariableTypes variableTypes = Context
    .getProcessEngineConfiguration()
    .getVariableTypes();
  
  VariableType type = variableTypes.findVariableType(value);
 
  VariableInstanceEntity variableInstance = VariableInstanceEntity.createAndInsert(variableName, type, value);
  initializeVariableInstanceBackPointer(variableInstance);
  variableInstances.put(variableName, variableInstance);
  
  // Record historic variable
  Context.getCommandContext().getHistoryManager()
    .recordVariableCreate(variableInstance);

  // Record historic detail
  Context.getCommandContext().getHistoryManager()
    .recordHistoricDetailVariableCreate(variableInstance, sourceActivityExecution, isActivityIdUsedForDetails());

  return variableInstance;
}
 
开发者ID:springvelocity,项目名称:xbpm5,代码行数:22,代码来源:VariableScopeImpl.java


示例6: ensureVariablesInitialized

import org.activiti.engine.impl.variable.VariableTypes; //导入依赖的package包/类
protected void ensureVariablesInitialized() {
    VariableTypes types = Context.getProcessEngineConfiguration()
            .getVariableTypes();

    for (QueryVariableValue var : queryVariableValues) {
        var.initialize(types);
    }

    for (TaskQueryImpl orQueryObject : orQueryObjects) {
        orQueryObject.ensureVariablesInitialized();
    }
}
 
开发者ID:zhaojunfei,项目名称:lemon,代码行数:13,代码来源:TaskQueryImpl.java


示例7: ensureVariablesInitialized

import org.activiti.engine.impl.variable.VariableTypes; //导入依赖的package包/类
protected void ensureVariablesInitialized() {
  if (!queryVariableValues.isEmpty()) {
    VariableTypes variableTypes = Context
            .getProcessEngineConfiguration()
            .getVariableTypes();
    for(QueryVariableValue queryVariableValue : queryVariableValues) {
      queryVariableValue.initialize(variableTypes);
    }
  }
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:11,代码来源:ExecutionVariableQueryImpl.java


示例8: getVariableTypes

import org.activiti.engine.impl.variable.VariableTypes; //导入依赖的package包/类
protected VariableTypes getVariableTypes() {
  if (variableTypes==null) {
    variableTypes = Context
      .getProcessEngineConfiguration()
      .getVariableTypes();
  }
  return variableTypes;
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:9,代码来源:IbatisVariableTypeHandler.java


示例9: initialize

import org.activiti.engine.impl.variable.VariableTypes; //导入依赖的package包/类
public void initialize(VariableTypes types) {
  if(variableInstanceEntity == null) {
    VariableType type = types.findVariableType(value);
    if(type instanceof ByteArrayType) {
      throw new ActivitiException("Variables of type ByteArray cannot be used to query");
    } else if(type instanceof JPAEntityVariableType && operator != QueryOperator.EQUALS) {
      throw new ActivitiException("JPA entity variables can only be used in 'variableValueEquals'");
    } else {
      // Type implementation determines which fields are set on the entity
      variableInstanceEntity = VariableInstanceEntity.create(name, type, value);
    }
  }
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:14,代码来源:QueryVariableValue.java


示例10: initialize

import org.activiti.engine.impl.variable.VariableTypes; //导入依赖的package包/类
public void initialize(VariableTypes types) {
  if(variableInstanceEntity == null) {
    VariableType type = types.findVariableType(value);
    if(type instanceof ByteArrayType) {
      throw new ActivitiIllegalArgumentException("Variables of type ByteArray cannot be used to query");
    } else if(type instanceof JPAEntityVariableType && operator != QueryOperator.EQUALS) {
      throw new ActivitiIllegalArgumentException("JPA entity variables can only be used in 'variableValueEquals'");
    } else {
      // Type implementation determines which fields are set on the entity
      variableInstanceEntity = VariableInstanceEntity.create(name, type, value);
    }
  }
}
 
开发者ID:springvelocity,项目名称:xbpm5,代码行数:14,代码来源:QueryVariableValue.java


示例11: analyticsProcessing

import org.activiti.engine.impl.variable.VariableTypes; //导入依赖的package包/类
@Scheduled(cron = "${analytics.pollingInterval}")
public void analyticsProcessing() throws Exception {

	if (isEnterprise.equals("true")) {
		if (processEngine.getVariableTypes().getVariableType("data-model-type") == null) {
			// Adding the data model type variable type to engine config for
			// APS implementations.
			VariableTypes variableTypes = processEngine.getVariableTypes();
			int serializableIndex = variableTypes.getTypeIndex(SerializableType.TYPE_NAME);
			if (serializableIndex > -1) {
				variableTypes.addType(new VariableDataEntityType(), serializableIndex);
			} else {
				variableTypes.addType(new VariableDataEntityType());
			}
		}
	}

	customAnalyticsEndpoint.preProcessing();
	boolean newEventsExist = true;
	int loopSize = 0;
	while (newEventsExist == true) {
		loopSize++;
		logger.info("processing loop counter - " + loopSize);
		// Fetch latest watermark
		String timeStamp = watermark.fetchWatermark();

		Map<String, Object> processBatchMetadata = processBatchPreparation.getBatchMetadata(timeStamp);

		newEventsExist = (boolean) processBatchMetadata.get("newEventsExist");
		List<Map<String, Object>> processList = (List<Map<String, Object>>) processBatchMetadata
				.get("processIdList");

		if (processList != null) {
			logger.debug("process list is - " + processList.toString());
			for (Map<String, Object> processInstance : processList) {
				try {
					generateProcessAndTaskDocs.execute(processInstance);
				} catch (Exception e) {

				}
			}
			// Update watermark
			watermark.updateWatermark((String) processBatchMetadata.get("toTimestamp"));
		} else {
			logger.info("process list is null");
		}
	}

	logger.info(watermark.fetchWatermark());
}
 
开发者ID:cijujoseph,项目名称:activiti-analytics-spring-boot,代码行数:51,代码来源:ScheduledAnalyticsProcessing.java


示例12: getVariableTypes

import org.activiti.engine.impl.variable.VariableTypes; //导入依赖的package包/类
public VariableTypes getVariableTypes() {
  return variableTypes;
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:4,代码来源:ProcessEngineConfigurationImpl.java


示例13: setVariableTypes

import org.activiti.engine.impl.variable.VariableTypes; //导入依赖的package包/类
public ProcessEngineConfigurationImpl setVariableTypes(VariableTypes variableTypes) {
  this.variableTypes = variableTypes;
  return this;
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:5,代码来源:ProcessEngineConfigurationImpl.java


示例14: ensureVariablesInitialized

import org.activiti.engine.impl.variable.VariableTypes; //导入依赖的package包/类
protected void ensureVariablesInitialized() {    
  VariableTypes types = Context.getProcessEngineConfiguration().getVariableTypes();
  for(QueryVariableValue var : variables) {
    var.initialize(types);
  }
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:7,代码来源:TaskQueryImpl.java


示例15: ensureVariablesInitialized

import org.activiti.engine.impl.variable.VariableTypes; //导入依赖的package包/类
protected void ensureVariablesInitialized() {
  if (this.queryVariableValue != null) {
    VariableTypes variableTypes = Context.getProcessEngineConfiguration().getVariableTypes();
    queryVariableValue.initialize(variableTypes);
  }
}
 
开发者ID:springvelocity,项目名称:xbpm5,代码行数:7,代码来源:HistoricVariableInstanceQueryImpl.java



注:本文中的org.activiti.engine.impl.variable.VariableTypes类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java SplitReturn类代码示例发布时间:2022-05-23
下一篇:
Java StringNameHelper类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap