CommandExecutor和Interceptor


在ProcessEngineConfiguration中创建了一个CommandExecutor。


这个CommandExecutor是CommandContextInterceptor的实例,同时在CommandContextInterceptor中的next设置为CommandExecutorImpl。


在执行CommandExecutor的execute方法时,先执行CommandContextInterceptor中的方法,然后由它来执行CommandExecutorImpl中的方法。

CommandExecutor在执行中为CommandExecutorImpl提供了commandContext。

// // Source code recreated from a .class file by IntelliJ IDEA // (powered by FernFlower decompiler) // package org.camunda.bpm.engine.impl; import java.util.Date; import java.util.List; import org.camunda.bpm.engine.history.HistoricIdentityLinkLog; import org.camunda.bpm.engine.history.HistoricIdentityLinkLogQuery; import org.camunda.bpm.engine.impl.interceptor.CommandContext; import org.camunda.bpm.engine.impl.interceptor.CommandExecutor; import org.camunda.bpm.engine.impl.util.EnsureUtil; public class HistoricIdentityLinkLogQueryImpl extends AbstractVariableQueryImpl<HistoricIdentityLinkLogQuery, HistoricIdentityLinkLog> implements HistoricIdentityLinkLogQuery { private static final long serialVersionUID = 1L; protected Date dateBefore; protected Date dateAfter; protected String type; protected String userId; protected String groupId; protected String taskId; protected String processDefinitionId; protected String processDefinitionKey; protected String operationType; protected String assignerId; protected String[] tenantIds; protected boolean isTenantIdSet; public HistoricIdentityLinkLogQueryImpl() { } public HistoricIdentityLinkLogQueryImpl(CommandExecutor commandExecutor) { super(commandExecutor); } public String getType() { return this.type; } public String getUserId() { return this.userId; } public String getGroupId() { return this.groupId; } public String getTaskId() { return this.taskId; } public String getProcessDefinitionId() { return this.processDefinitionId; } public String getProcessDefinitionKey() { return this.processDefinitionKey; } public String getOperationType() { return this.operationType; } public String getAssignerId() { return this.assignerId; } public boolean isTenantIdSet() { return this.isTenantIdSet; } public HistoricIdentityLinkLogQuery tenantIdIn(String... tenantIds) { EnsureUtil.ensureNotNull("tenantIds", (Object[])tenantIds); this.tenantIds = tenantIds; this.isTenantIdSet = true; return this; } public HistoricIdentityLinkLogQuery withoutTenantId() { this.tenantIds = null; this.isTenantIdSet = true; return this; } public Date getDateBefore() { return this.dateBefore; } public Date getDateAfter() { return this.dateAfter; } public HistoricIdentityLinkLogQuery type(String type) { EnsureUtil.ensureNotNull("type", type); this.type = type; return this; } public HistoricIdentityLinkLogQuery dateBefore(Date dateBefore) { EnsureUtil.ensureNotNull("dateBefore", dateBefore); this.dateBefore = dateBefore; return this; } public HistoricIdentityLinkLogQuery dateAfter(Date dateAfter) { EnsureUtil.ensureNotNull("dateAfter", dateAfter); this.dateAfter = dateAfter; return this; } public HistoricIdentityLinkLogQuery userId(String userId) { EnsureUtil.ensureNotNull("userId", userId); this.userId = userId; return this; } public HistoricIdentityLinkLogQuery groupId(String groupId) { EnsureUtil.ensureNotNull("groupId", groupId); this.groupId = groupId; return this; } public HistoricIdentityLinkLogQuery taskId(String taskId) { EnsureUtil.ensureNotNull("taskId", taskId); this.taskId = taskId; return this; } public HistoricIdentityLinkLogQuery processDefinitionId(String processDefinitionId) { EnsureUtil.ensureNotNull("processDefinitionId", processDefinitionId); this.processDefinitionId = processDefinitionId; return this; } public HistoricIdentityLinkLogQuery processDefinitionKey(String processDefinitionKey) { EnsureUtil.ensureNotNull("processDefinitionKey", processDefinitionKey); this.processDefinitionKey = processDefinitionKey; return this; } public HistoricIdentityLinkLogQuery operationType(String operationType) { EnsureUtil.ensureNotNull("operationType", operationType); this.operationType = operationType; return this; } public HistoricIdentityLinkLogQuery assignerId(String assignerId) { EnsureUtil.ensureNotNull("assignerId", assignerId); this.assignerId = assignerId; return this; } public HistoricIdentityLinkLogQuery orderByTime() { this.orderBy(HistoricIdentityLinkLogQueryProperty.TIME); return this; } public HistoricIdentityLinkLogQuery orderByType() { this.orderBy(HistoricIdentityLinkLogQueryProperty.TYPE); return this; } public HistoricIdentityLinkLogQuery orderByUserId() { this.orderBy(HistoricIdentityLinkLogQueryProperty.USER_ID); return this; } public HistoricIdentityLinkLogQuery orderByGroupId() { this.orderBy(HistoricIdentityLinkLogQueryProperty.GROUP_ID); return this; } public HistoricIdentityLinkLogQuery orderByTaskId() { this.orderBy(HistoricIdentityLinkLogQueryProperty.TASK_ID); return this; } public HistoricIdentityLinkLogQuery orderByProcessDefinitionId() { this.orderBy(HistoricIdentityLinkLogQueryProperty.PROC_DEFINITION_ID); return this; } public HistoricIdentityLinkLogQuery orderByProcessDefinitionKey() { this.orderBy(HistoricIdentityLinkLogQueryProperty.PROC_DEFINITION_KEY); return this; } public HistoricIdentityLinkLogQuery orderByOperationType() { this.orderBy(HistoricIdentityLinkLogQueryProperty.OPERATION_TYPE); return this; } public HistoricIdentityLinkLogQuery orderByAssignerId() { this.orderBy(HistoricIdentityLinkLogQueryProperty.ASSIGNER_ID); return this; } public HistoricIdentityLinkLogQuery orderByTenantId() { this.orderBy(HistoricIdentityLinkLogQueryProperty.TENANT_ID); return this; } public long executeCount(CommandContext commandContext) { this.checkQueryOk(); return commandContext.getHistoricIdentityLinkManager().findHistoricIdentityLinkLogCountByQueryCriteria(this); } public List<HistoricIdentityLinkLog> executeList(CommandContext commandContext, Page page) { this.checkQueryOk(); return commandContext.getHistoricIdentityLinkManager().findHistoricIdentityLinkLogByQueryCriteria(this, page); } } 我要怎么做呢?好像也不能通过流程实例来查询再过滤
09-16
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值