Package pl.net.bluesoft.rnd.processtool.model.processdata

Examples of pl.net.bluesoft.rnd.processtool.model.processdata.ProcessDeadline


    @Override
    public void execute(JobExecutionContext context) throws JobExecutionException {
        JobDataMap dataMap = context.getJobDetail().getJobDataMap();

        String processInstanceId = (String) dataMap.get("processInstanceId");
        ProcessDeadline pd = (ProcessDeadline) dataMap.get("deadlineAttribute");
        DeadlineEngine engine = (DeadlineEngine) dataMap.get("deadlineEngine");

        engine.handleDeadlineJob(processInstanceId, pd);
    }
View Full Code Here


        }

        for (String tn : taskNames)
        {
            String attrKey = "deadline_" + tn;
            ProcessDeadline pid = null;
            for (ProcessInstanceAttribute attr : processInstance.getProcessAttributes()) {
                if (attr.getKey() == null) {
                    logger.info("Attribute key is null! Process instance: " + processInstance.getInternalId());
                }
                if (attrKey.equals(attr.getKey())) {
                    pid = (ProcessDeadline) attr;
                    break;
                }
            }
            if (pid == null) {
                pid = new ProcessDeadline();
                pid.setKey("deadline_" + tn);
                pid.setProcessInstance(processInstance);
                processInstance.getProcessAttributes().add(pid);
            }
            pid.setProfileName(profileName);
            pid.setNotifyUsersWithLogin(notifyUsersWithLogin);
            pid.setNotifyUsersWithRole(notifyUsersWithRole);
            pid.setSkipAssignee("true".equalsIgnoreCase(skipAssignee));
            pid.setTemplateName(templateName);
            pid.setTaskName(tn);
            pid.setAlreadyNotified(false);
            pid.setDueDate(dueDate);
        }

        ctx.getProcessInstanceDAO().saveProcessInstance(processInstance);

        return STATUS_OK;
View Full Code Here

TOP

Related Classes of pl.net.bluesoft.rnd.processtool.model.processdata.ProcessDeadline

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.