本文整理匯總了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);
}