logger.debug("processInstanceId : {}", processInstanceId);
logger.debug("bpmConfRules : {}", bpmConfRules);
UserConnector userConnector = ApplicationContextHelper
.getBean(UserConnector.class);
OrgConnector orgConnector = (OrgConnector) ApplicationContextHelper
.getBean(OrgConnector.class);
ExpressionManager expressionManager = Context
.getProcessEngineConfiguration().getExpressionManager();
MapVariableScope mapVariableScope = new MapVariableScope();
String initiator = historicProcessInstanceEntity.getStartUserId();
mapVariableScope.setVariable("initiator",
userConnector.findById(initiator));
for (BpmConfRule bpmConfRule : bpmConfRules) {
String value = bpmConfRule.getValue();
if ("职位".equals(value)) {
// 获得发起人的职位
int initiatorLevel = orgConnector
.getJobLevelByUserId(initiator);
// 获得审批人的职位
int assigneeLevel = orgConnector
.getJobLevelByUserId(delegateTask.getAssignee());
// 比较
if (initiatorLevel >= assigneeLevel) {
logger.info("skip task : {}", delegateTask.getId());