Package pl.net.bluesoft.rnd.processtool.bpm

Examples of pl.net.bluesoft.rnd.processtool.bpm.ProcessToolBpmSession


            throw new ProcessToolException("Unable to find process instance by internal id: " + internalId);
        }
        Set<ProcessDeadline> deadlines = pi.findAttributesByClass(ProcessDeadline.class);
        if (!deadlines.isEmpty()) {
            logger.info("Found deadline configurations for process: " + pi.getInternalId());
            ProcessToolBpmSession bpmSession = ctx.getProcessToolSessionFactory().createAutoSession();
            List<BpmTask> tasks = processInitiated || task == null ? bpmSession.findProcessTasks(pi, ctx) : new ArrayList<BpmTask>() {{
                add(task);
            }};
            if (!tasks.isEmpty()) {
                Set<String> taskNames = new HashSet<String>();
                Collections.collect(tasks, new Transformer<BpmTask, String>() {
View Full Code Here


    }

    private void signalDeadline(ProcessToolContext ctx, String processInstanceId, ProcessDeadline processDeadline) throws Exception {
       
      ProcessInstance pi = ctx.getProcessInstanceDAO().getProcessInstanceByInternalId(processInstanceId);
        ProcessToolBpmSession bpmSession = ctx.getProcessToolSessionFactory().createAutoSession();
        List<BpmTask> tasks = bpmSession.findProcessTasks(pi, ctx);
        for (BpmTask task : tasks) {
            if (task.getTaskName().equals(processDeadline.getTaskName())) {
                String assigneeLogin = task.getAssignee();
        Map<String, UserData> notifyUsers = prepareUsersForNotification(ctx, assigneeLogin, processDeadline);
View Full Code Here

        }

        UserProcessQueuesSizeProvider.this.ctx = ctx;

        /* Fill queues for main user */
        ProcessToolBpmSession mainUserSession = ctx.getProcessToolSessionFactory().createSession(userData, userData.getRoleNames());
       
        fillUserQueues(mainUserSession);
       
        /* Fill queues for substitutedUsers */
        List<UserData> substitutedUsers =
            ProcessToolContext.Util.getThreadProcessToolContext().getUserSubstitutionDAO().getSubstitutedUsers(userData,DateUtil.truncHours(new Date()));
       
        for(UserData substitutedUser: substitutedUsers)
        {
          ProcessToolBpmSession substitutedUserSession = ctx.getProcessToolSessionFactory().createSession(substitutedUser, substitutedUser.getRoleNames());
          fillSubstitutionUserQueues(substitutedUserSession);
        }
      }
     
    });
View Full Code Here

TOP

Related Classes of pl.net.bluesoft.rnd.processtool.bpm.ProcessToolBpmSession

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.