当前位置: 首页>>代码示例>>Java>>正文


Java QueryVariableValue类代码示例

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


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

示例1: getIdsByVariables

import org.camunda.bpm.engine.impl.QueryVariableValue; //导入依赖的package包/类
protected Set<String> getIdsByVariables(CassandraPersistenceSession session, List<QueryVariableValue> queryVariables, Set<String> executionIdSet){
  ExecutionIdByVariableValueIndex allExecutionsIndex = (ExecutionIdByVariableValueIndex) VariableEntityOperations.getIndexHandler(ExecutionIdByVariableValueIndex.class);

  for(QueryVariableValue queryVariableValue : queryVariables){
    if(queryVariableValue.isLocal()){
      List<String> queriedExecutionIds = allExecutionsIndex.getValuesByTypedValue(session, queryVariableValue.getName(), queryVariableValue.getTypedValue());
      if(queriedExecutionIds.isEmpty()){
        return null;
      }
      executionIdSet = executionIdSet==null ? new HashSet<String>(queriedExecutionIds) :
          IndexUtils.crossCheckIndexes(executionIdSet, new HashSet<String>(queriedExecutionIds));
    }
    else{
      executionIdSet = getIdsByProcessVariable(session, queryVariableValue, executionIdSet);        
    }
    if(executionIdSet.isEmpty()){
      return null;
    }
  }    
  return executionIdSet;
}
 
开发者ID:camunda,项目名称:camunda-engine-cassandra,代码行数:22,代码来源:SelectExecutionsByQueryCriteria.java

示例2: getIdsByProcessVariable

import org.camunda.bpm.engine.impl.QueryVariableValue; //导入依赖的package包/类
protected Set<String> getIdsByProcessVariable(CassandraPersistenceSession session, QueryVariableValue queryVariable, Set<String> executionIdSet){
  ProcessIdByProcessVariableValueIndex processIdIndex = (ProcessIdByProcessVariableValueIndex) VariableEntityOperations.getIndexHandler(ProcessIdByProcessVariableValueIndex.class);
  ExecutionIdByProcessIdIndex processExecutionsIndex = (ExecutionIdByProcessIdIndex) ExecutionEntityOperations.getIndexHandler(ExecutionIdByProcessIdIndex.class);
  List<String> queriedProcessIds=processIdIndex.getValuesByTypedValue(session, queryVariable.getName(), queryVariable.getTypedValue());
  for(String processId:queriedProcessIds){
    List<String> queriedExecutionIds = processExecutionsIndex.getValues(null,session, processId);
    if(queriedExecutionIds.isEmpty()){
      return Collections.emptySet();
    }
    executionIdSet = executionIdSet==null ? new HashSet<String>(queriedExecutionIds) :
      IndexUtils.crossCheckIndexes(executionIdSet, new HashSet<String>(queriedExecutionIds));
    if(executionIdSet.isEmpty()){
      return executionIdSet;
    }
  }
  return executionIdSet;
}
 
开发者ID:camunda,项目名称:camunda-engine-cassandra,代码行数:18,代码来源:SelectExecutionsByQueryCriteria.java

示例3: filterByVariables

import org.camunda.bpm.engine.impl.QueryVariableValue; //导入依赖的package包/类
protected void filterByVariables(List<QueryVariableValue> variables, Map<String, ExecutionEntity> resultMap, CassandraPersistenceSession session) {
  Set<String> toRemove = new HashSet<String>();
  
  for(ExecutionEntity executionEntity:resultMap.values()){
    for(QueryVariableValue queryVariable:variables){
      Object var=null;
      if(queryVariable.isLocal()){
        var=executionEntity.getVariableLocal(queryVariable.getName());
      }
      else{
        LoadedCompositeEntity loadedProcessInstance = session.selectCompositeById(ProcessInstanceLoader.NAME, executionEntity.getProcessInstanceId());
        @SuppressWarnings("unchecked")
        Collection<VariableInstanceEntity> processVariables=(Collection<VariableInstanceEntity>) loadedProcessInstance.get(VARIABLES).values();            
        for(VariableInstanceEntity varEntity:processVariables){
          if(varEntity.getName().equals(queryVariable.getName())){
            var=varEntity.getValue();
          }
        }
      }
      if(var==null || !var.equals(queryVariable.getValue())){
        toRemove.add(executionEntity.getId());
        break;
      }
    }
  }
  
  for(String id:toRemove){
    resultMap.remove(id);
  }
}
 
开发者ID:camunda,项目名称:camunda-engine-cassandra,代码行数:31,代码来源:SelectExecutionsByQueryCriteria.java

示例4: ensureVariablesInitialized

import org.camunda.bpm.engine.impl.QueryVariableValue; //导入依赖的package包/类
public void ensureVariablesInitialized() {
  if (!filterVariables.isEmpty()) {
    VariableSerializers variableSerializers = Context
        .getProcessEngineConfiguration()
        .getVariableSerializers();
    for(QueryVariableValue queryVariableValue : filterVariables) {
      queryVariableValue.initialize(variableSerializers);
    }
  }
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:11,代码来源:TopicFetchInstruction.java

示例5: TopicFetchInstruction

import org.camunda.bpm.engine.impl.QueryVariableValue; //导入依赖的package包/类
public TopicFetchInstruction(String topicName, long lockDuration) {
  this.topicName = topicName;
  this.lockDuration = lockDuration;
  this.filterVariables = new ArrayList<QueryVariableValue>();
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:6,代码来源:TopicFetchInstruction.java

示例6: getFilterVariables

import org.camunda.bpm.engine.impl.QueryVariableValue; //导入依赖的package包/类
public List<QueryVariableValue> getFilterVariables() {
  return filterVariables;
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:4,代码来源:TopicFetchInstruction.java

示例7: addFilterVariable

import org.camunda.bpm.engine.impl.QueryVariableValue; //导入依赖的package包/类
public void addFilterVariable(String name, Object value) {
  QueryVariableValue variableValue = new QueryVariableValue(name, value, QueryOperator.EQUALS, true);
  this.filterVariables.add(variableValue);
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:5,代码来源:TopicFetchInstruction.java


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