本文整理汇总了Java中org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.isProcessInstanceExecution方法的典型用法代码示例。如果您正苦于以下问题:Java ExecutionEntity.isProcessInstanceExecution方法的具体用法?Java ExecutionEntity.isProcessInstanceExecution怎么用?Java ExecutionEntity.isProcessInstanceExecution使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
的用法示例。
在下文中一共展示了ExecutionEntity.isProcessInstanceExecution方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: insert
import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity; //导入方法依赖的package包/类
public void insert(CassandraPersistenceSession session, ExecutionEntity entity) {
Session s = session.getSession();
if(entity.isProcessInstanceExecution()) {
session.addStatement(s.prepare(INSERT).bind(
entity.getId(),
entity.getRevision(),
entity.getBusinessKey()));
}
session.addStatement(createUpdateStatement(session, entity));
for(IndexHandler<ExecutionEntity> index:indexHandlers.values()){
session.addStatement(index.getInsertStatement(session,entity));
}
}
示例2: delete
import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity; //导入方法依赖的package包/类
public void delete(CassandraPersistenceSession session, ExecutionEntity entity) {
if(entity.isProcessInstanceExecution()) {
session.addStatement(QueryBuilder.delete().all()
.from(ProcessInstanceTableHandler.TABLE_NAME).where(eq("id", entity.getProcessInstanceId()))
.onlyIf(eq("version", entity.getRevision())),
entity.getProcessInstanceId());
session.batchShouldNotLock(entity.getProcessInstanceId());
}
else {
session.addStatement(QueryBuilder.delete().mapElt("executions", entity.getId())
.from(ProcessInstanceTableHandler.TABLE_NAME).where(eq("id", entity.getProcessInstanceId())),
entity.getProcessInstanceId());
}
for(IndexHandler<ExecutionEntity> index:indexHandlers.values()){
session.addIndexStatement(index.getDeleteStatement(session,entity), entity.getProcessInstanceId());
}
}
示例3: assignExecutionsToActivities
import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity; //导入方法依赖的package包/类
protected void assignExecutionsToActivities(List<ExecutionEntity> leaves) {
for (ExecutionEntity leaf : leaves) {
ScopeImpl activity = leaf.getActivity();
if (activity != null) {
if (leaf.getActivityInstanceId() != null) {
EnsureUtil.ensureNotNull("activity", activity);
submitExecution(leaf, activity);
}
mergeScopeExecutions(leaf);
}
else if (leaf.isProcessInstanceExecution()) {
submitExecution(leaf, leaf.getProcessDefinition());
}
}
}
示例4: getIndexValue
import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity; //导入方法依赖的package包/类
@Override
protected String getIndexValue(ExecutionEntity entity) {
if(entity.isProcessInstanceExecution()){
return entity.getBusinessKey();
}
return null;
}
示例5: getValue
import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity; //导入方法依赖的package包/类
@Override
protected String getValue(ExecutionEntity entity) {
if(entity.isProcessInstanceExecution()){
return entity.getProcessInstanceId();
}
return null;
}
示例6: filterProcessInstance
import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity; //导入方法依赖的package包/类
protected ExecutionEntity filterProcessInstance(List<ExecutionEntity> executionList) {
for (ExecutionEntity execution : executionList) {
if (execution.isProcessInstanceExecution()) {
return execution;
}
}
throw new ProcessEngineException("Could not determine process instance execution");
}
示例7: getEntityById
import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity; //导入方法依赖的package包/类
public LoadedCompositeEntity getEntityById(CassandraPersistenceSession session, String id) {
LoadedCompositeEntity loadedProcessInstance = new LoadedCompositeEntity();
Session s = session.getSession();
Row row = s.execute(select().all().from(TABLE_NAME).where(eq("id", id))).one();
if(row == null) {
return null;
}
int version = row.getInt("version");
String businessKey = row.getString("business_key");
CassandraSerializer<ExecutionEntity> executionSerializer = session.getSerializer(ExecutionEntity.class);
CassandraSerializer<EventSubscriptionEntity> eventSubscriptionSerializer = session.getSerializer(EventSubscriptionEntity.class);
CassandraSerializer<VariableInstanceEntity> variableSerializer = session.getSerializer(VariableInstanceEntity.class);
// deserialize all executions
Map<String, UDTValue> executionsMap = row.getMap(EXECUTIONS, String.class, UDTValue.class);
Map<String, ExecutionEntity> executions = new HashMap<String, ExecutionEntity>();
for (UDTValue serializedExecution : executionsMap.values()) {
ExecutionEntity executionEntity = executionSerializer.read(serializedExecution);
executions.put(executionEntity.getId(), executionEntity);
if(executionEntity.isProcessInstanceExecution()) {
loadedProcessInstance.setMainEntity(executionEntity);
}
}
loadedProcessInstance.put(EXECUTIONS, executions);
// deserialize all event subscription
Map<String, UDTValue> eventSubscriptionsMap = row.getMap(EVENT_SUBSCRIPTIONS, String.class, UDTValue.class);
Map<String, EventSubscriptionEntity> eventSubscriptions = new HashMap<String, EventSubscriptionEntity>();
for (UDTValue serializedEventSubscription : eventSubscriptionsMap.values()) {
EventSubscriptionEntity eventSubscriptionEntity = eventSubscriptionSerializer.read(serializedEventSubscription);
eventSubscriptions.put(eventSubscriptionEntity.getId(), eventSubscriptionEntity);
}
loadedProcessInstance.put(EVENT_SUBSCRIPTIONS, eventSubscriptions);
// deserialize all variables
Map<String, UDTValue> variablesMap = row.getMap(VARIABLES, String.class, UDTValue.class);
Map<String, VariableInstanceEntity> variables = new HashMap<String, VariableInstanceEntity>();
for (UDTValue serializedVariable : variablesMap.values()) {
VariableInstanceEntity variableEntity = variableSerializer.read(serializedVariable);
variables.put(variableEntity.getId(), variableEntity);
}
loadedProcessInstance.put(VARIABLES, variables);
reconstructEntityTree(loadedProcessInstance);
ExecutionEntity processInstance= (ExecutionEntity) loadedProcessInstance.getPrimaryEntity();
processInstance.setRevision(version);
processInstance.setBusinessKey(businessKey);
ProcessInstanceBatch batch = new ProcessInstanceBatch((ExecutionEntity) loadedProcessInstance.getPrimaryEntity());
LOG.fine("Loaded process instance, id="+processInstance.getId()+", version="+processInstance.getRevision());
session.addLockedBatch(loadedProcessInstance.getPrimaryEntity().getId(), batch);
return loadedProcessInstance;
}