Package org.joget.workflow.model.service

Examples of org.joget.workflow.model.service.WorkflowManager


        try {
            LogUtil.debug(getClass().getName(), "Checking deadlines for profile " + profile);
            long start = System.currentTimeMillis();

            HostManager.setCurrentProfile(profile);
            WorkflowManager workflowManager = (WorkflowManager) WorkflowUtil.getApplicationContext().getBean("workflowManager");
           
            int sizeToCheck = 0;
            List<String> instancesFailed2check = new ArrayList<String>();
            Collection<String> instancesToCheck = workflowManager.getRunningProcessIds();
           
            if (instancesToCheck != null && !instancesToCheck.isEmpty()) {
                sizeToCheck = instancesToCheck.size();
                Iterator iterProcesses = instancesToCheck.iterator();
                List<String> currentBatch = null;
                do {
                    currentBatch = new ArrayList<String>();
                    try {
                        for (int n = 0; n < this.instancesPerTransaction; ++n) {
                            if (!iterProcesses.hasNext()) {
                                break;
                            }
                            String procId = (String) iterProcesses.next();
                            iterProcesses.remove();
                            currentBatch.add(procId);
                        }
                        String[] pids = new String[currentBatch.size()];
                        currentBatch.toArray(pids);
                       
                        workflowManager.internalCheckDeadlines(pids);
                    } catch (Exception ex) {
                        LogUtil.error(getClass().getName(), ex, "Profile : " + profile);
                        instancesFailed2check.addAll(currentBatch);
                    }
                } while (instancesFailed2check.size() <= this.failuresToIgnore && iterProcesses.hasNext());
View Full Code Here


            PerformerData xpdlParticipant, List xpdlResponsibleParticipants)
            throws Exception {

        //initialization
        ApplicationContext appContext = WorkflowUtil.getApplicationContext();
        WorkflowManager workflowManager = (WorkflowManager) appContext.getBean("workflowManager");

        String procDefId = workflowManager.getProcessDefIdByInstanceId(instanceId);
        WorkflowProcess process = workflowManager.getProcess(procDefId);
        String currentUsername = (String) shandle.getVendorData();

        if (currentUsername.equals(WorkflowUserManager.ROLE_ANONYMOUS)) {
            currentUsername = processRequesterId;
        }
View Full Code Here

TOP

Related Classes of org.joget.workflow.model.service.WorkflowManager

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.