本文整理汇总了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;
}
示例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;
}
示例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);
}
}
示例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);
}
}
}
示例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>();
}
示例6: getFilterVariables
import org.camunda.bpm.engine.impl.QueryVariableValue; //导入依赖的package包/类
public List<QueryVariableValue> getFilterVariables() {
return filterVariables;
}
示例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);
}