当前位置: 首页>>代码示例>>Java>>正文


Java DelegateTask.getTaskDefinitionKey方法代码示例

本文整理汇总了Java中org.activiti.engine.delegate.DelegateTask.getTaskDefinitionKey方法的典型用法代码示例。如果您正苦于以下问题:Java DelegateTask.getTaskDefinitionKey方法的具体用法?Java DelegateTask.getTaskDefinitionKey怎么用?Java DelegateTask.getTaskDefinitionKey使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.activiti.engine.delegate.DelegateTask的用法示例。


在下文中一共展示了DelegateTask.getTaskDefinitionKey方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: process

import org.activiti.engine.delegate.DelegateTask; //导入方法依赖的package包/类
public void process(DelegateTask delegateTask) {
    if (delegateTask.getAssignee() == null) {
        return;
    }

    String taskDefinitionKey = delegateTask.getTaskDefinitionKey();
    String processDefinitionId = delegateTask.getProcessDefinitionId();

    List<BpmConfNotice> bpmConfNotices = ApplicationContextHelper
            .getBean(BpmConfNoticeManager.class)
            .find("from BpmConfNotice where bpmConfNode.bpmConfBase.processDefinitionId=? and bpmConfNode.code=?",
                    processDefinitionId, taskDefinitionKey);

    for (BpmConfNotice bpmConfNotice : bpmConfNotices) {
        if (TYPE_ARRIVAL == bpmConfNotice.getType()) {
            processArrival(delegateTask, bpmConfNotice);
        }
    }
}
 
开发者ID:zhaojunfei,项目名称:lemon,代码行数:20,代码来源:ArrivalNotice.java

示例2: onCreate

import org.activiti.engine.delegate.DelegateTask; //导入方法依赖的package包/类
@Override
public void onCreate(DelegateTask delegateTask) throws Exception {
    String taskDefinitionKey = delegateTask.getTaskDefinitionKey();
    String processDefinitionId = delegateTask.getProcessDefinitionId();
    String processInstanceId = delegateTask.getProcessInstanceId();
    HistoricProcessInstanceEntity historicProcessInstanceEntity = Context
            .getCommandContext().getHistoricProcessInstanceEntityManager()
            .findHistoricProcessInstance(processInstanceId);

    List<BpmConfRule> bpmConfRules = ApplicationContextHelper
            .getBean(BpmConfRuleManager.class)
            .find("from BpmConfRule where bpmConfNode.bpmConfBase.processDefinitionId=? and bpmConfNode.code=?",
                    processDefinitionId, taskDefinitionKey);
    logger.debug("delegateTask.getId : {}", delegateTask.getId());
    logger.debug("taskDefinitionKey : {}", taskDefinitionKey);
    logger.debug("processDefinitionId : {}", processDefinitionId);
    logger.debug("processInstanceId : {}", processInstanceId);
    logger.debug("bpmConfRules : {}", bpmConfRules);

    for (BpmConfRule bpmConfRule : bpmConfRules) {
        String value = bpmConfRule.getValue();

        if ("职位".equals(value) || "高级职位自动跳过".equals(value)) {
            this.processPosition(delegateTask, value);
        } else if ("相邻相同人员自动跳过".equals(value)) {
            this.processNeighbor(delegateTask, value);
        } else {
            this.processExpression(delegateTask, value);
        }
    }
}
 
开发者ID:zhaojunfei,项目名称:lemon,代码行数:32,代码来源:SkipTaskListener.java

示例3: onCreate

import org.activiti.engine.delegate.DelegateTask; //导入方法依赖的package包/类
@Override
public void onCreate(DelegateTask delegateTask) throws Exception {
    String businessKey = delegateTask.getExecution()
            .getProcessBusinessKey();
    String taskDefinitionKey = delegateTask.getTaskDefinitionKey();

    ExpressionManager expressionManager = Context
            .getProcessEngineConfiguration().getExpressionManager();

    try {
        String sql = "select ASSIGNEE from BPM_TASK_CONF where BUSINESS_KEY=? and TASK_DEFINITION_KEY=?";
        String assignee = jdbcTemplate.queryForObject(sql, String.class,
                businessKey, taskDefinitionKey);

        if ((assignee == null) || "".equals(assignee)) {
            return;
        }

        if ((assignee.indexOf("&&") != -1)
                || (assignee.indexOf("||") != -1)) {
            logger.info("assignee : {}", assignee);

            List<String> candidateUsers = new Expr().evaluate(assignee,
                    this);
            logger.info("candidateUsers : {}", candidateUsers);
            delegateTask.addCandidateUsers(candidateUsers);
        } else {
            String value = expressionManager.createExpression(assignee)
                    .getValue(delegateTask).toString();
            delegateTask.setAssignee(value);
        }
    } catch (Exception ex) {
        logger.debug(ex.getMessage(), ex);
    }
}
 
开发者ID:zhaojunfei,项目名称:lemon,代码行数:36,代码来源:TaskConfTaskListener.java

示例4: onCreate

import org.activiti.engine.delegate.DelegateTask; //导入方法依赖的package包/类
public void onCreate(DelegateTask delegateTask) throws Exception {
    String taskDefinitionKey = delegateTask.getTaskDefinitionKey();
    String processDefinitionId = delegateTask.getProcessDefinitionId();
    String processInstanceId = delegateTask.getProcessInstanceId();
    HistoricProcessInstanceEntity historicProcessInstanceEntity = Context
            .getCommandContext().getHistoricProcessInstanceEntityManager()
            .findHistoricProcessInstance(processInstanceId);

    List<BpmConfRule> bpmConfRules = ApplicationContextHelper
            .getBean(BpmConfRuleManager.class)
            .find("from BpmConfRule where bpmConfNode.bpmConfBase.processDefinitionId=? and bpmConfNode.code=?",
                    processDefinitionId, taskDefinitionKey);
    logger.debug("delegateTask.getId : {}", delegateTask.getId());
    logger.debug("taskDefinitionKey : {}", taskDefinitionKey);
    logger.debug("processDefinitionId : {}", processDefinitionId);
    logger.debug("processInstanceId : {}", processInstanceId);
    logger.debug("bpmConfRules : {}", bpmConfRules);

    for (BpmConfRule bpmConfRule : bpmConfRules) {
        String value = bpmConfRule.getValue();

        if ("职位".equals(value) || "高级职位自动跳过".equals(value)) {
            this.processPosition(delegateTask, value);
        } else if ("相邻相同人员自动跳过".equals(value)) {
            this.processNeighbor(delegateTask, value);
        } else {
            this.processExpression(delegateTask, value);
        }
    }
}
 
开发者ID:zhaojunfei,项目名称:lemon,代码行数:31,代码来源:SkipEventListener.java

示例5: process

import org.activiti.engine.delegate.DelegateTask; //导入方法依赖的package包/类
public void process(DelegateTask delegateTask) {
    String taskDefinitionKey = delegateTask.getTaskDefinitionKey();
    String processDefinitionId = delegateTask.getProcessDefinitionId();

    List<BpmConfNotice> bpmConfNotices = ApplicationContextHelper
            .getBean(BpmConfNoticeManager.class)
            .find("from BpmConfNotice where bpmConfNode.bpmConfBase.processDefinitionId=? and bpmConfNode.code=?",
                    processDefinitionId, taskDefinitionKey);

    for (BpmConfNotice bpmConfNotice : bpmConfNotices) {
        if (TYPE_COMPLETE == bpmConfNotice.getType()) {
            processComplete(delegateTask, bpmConfNotice);
        }
    }
}
 
开发者ID:zhaojunfei,项目名称:lemon,代码行数:16,代码来源:CompleteNotice.java

示例6: process

import org.activiti.engine.delegate.DelegateTask; //导入方法依赖的package包/类
public void process(DelegateTask delegateTask) {
    String taskDefinitionKey = delegateTask.getTaskDefinitionKey();
    String processDefinitionId = delegateTask.getProcessDefinitionId();

    List<BpmConfNotice> bpmConfNotices = ApplicationContextHelper
            .getBean(BpmConfNoticeManager.class)
            .find("from BpmConfNotice where bpmConfNode.bpmConfBase.processDefinitionId=? and bpmConfNode.code=?",
                    processDefinitionId, taskDefinitionKey);

    for (BpmConfNotice bpmConfNotice : bpmConfNotices) {
        if (TYPE_TIMEOUT == bpmConfNotice.getType()) {
            processTimeout(delegateTask, bpmConfNotice);
        }
    }
}
 
开发者ID:zhaojunfei,项目名称:lemon,代码行数:16,代码来源:TimeoutNotice.java


注:本文中的org.activiti.engine.delegate.DelegateTask.getTaskDefinitionKey方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。