Package com.mossle.bpm.cmd

Examples of com.mossle.bpm.cmd.CompleteTaskWithCommentCmd


            if ((userId != null) && userId.equals(assignee)) {
                logger.debug("auto complete first task : {}", delegateTask);

                // ((TaskEntity) delegateTask).complete();
                // Context.getCommandContext().getHistoryManager().recordTaskId((TaskEntity) delegateTask);
                new CompleteTaskWithCommentCmd(delegateTask.getId(), null,
                        "发起流程").execute(Context.getCommandContext());
            }
        }
    }
View Full Code Here


                // 比较
                if (initiatorLevel >= assigneeLevel) {
                    logger.info("skip task : {}", delegateTask.getId());
                    logger.info("initiatorLevel : {}, assigneeLevel : {}",
                            initiatorLevel, assigneeLevel);
                    new CompleteTaskWithCommentCmd(delegateTask.getId(),
                            Collections.<String, Object> emptyMap(), "跳过")
                            .execute(Context.getCommandContext());
                }
            } else {
                Boolean result = (Boolean) expressionManager.createExpression(
                        value).getValue(mapVariableScope);

                logger.info("value : {}, result : {}", value, result);

                if (result) {
                    logger.info("skip task : {}", delegateTask.getId());
                    new CompleteTaskWithCommentCmd(delegateTask.getId(),
                            Collections.<String, Object> emptyMap(), "跳过")
                            .execute(Context.getCommandContext());
                }
            }
        }
View Full Code Here

        String processInstanceId = task.getProcessInstanceId();
        Record record = keyValue.findByRef(processInstanceId);
        Map<String, Object> processParameters = new HashMap<String, Object>();

        if (record == null) {
            new CompleteTaskWithCommentCmd(taskId, processParameters,
                    OPERATION_COMMENT).execute(commandContext);

            return null;
        }

        // 如果有表单,就从数据库获取数据
        for (Prop prop : record.getProps().values()) {
            String key = prop.getCode();
            String value = prop.getValue();
            String formType = this.getFormType(formTypeMap, key);

            if ("userpicker".equals(formType)) {
                processParameters.put(key,
                        new ArrayList(Arrays.asList(value.split(","))));
            } else if (formType != null) {
                processParameters.put(key, value);
            }
        }

        new CompleteTaskWithCommentCmd(taskId, processParameters,
                OPERATION_COMMENT).execute(commandContext);
        record = new RecordBuilder().build(record, STATUS_RUNNING,
                processInstanceId);
        keyValue.save(record);
View Full Code Here

TOP

Related Classes of com.mossle.bpm.cmd.CompleteTaskWithCommentCmd

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.