Package org.joget.report.model

Examples of org.joget.report.model.ReportWorkflowProcessInstance


        WorkflowManager workflowManager = (WorkflowManager) AppUtil.getApplicationContext().getBean("workflowManager");
        ReportManager reportManager = (ReportManager) AppUtil.getApplicationContext().getBean("reportManager");
        AppService appService = (AppService) AppUtil.getApplicationContext().getBean("appService");

        if (wfTrackProcess != null) {
            ReportWorkflowProcessInstance pInstance = reportManager.getReportWorkflowProcessInstance(processInstanceId);
            if (pInstance == null) {
                pInstance = new ReportWorkflowProcessInstance();
                pInstance.setInstanceId(processInstanceId);

                //get app
                AppDefinition appDef = appService.getAppDefinition(appId, appVersion);
                ReportApp reportApp = reportManager.getReportApp(appId, appVersion, appDef.getName());

                //get package
                ReportWorkflowPackage reportPackage = reportManager.getReportWorkflowPackage(reportApp, wfProcess.getPackageId(), wfProcess.getVersion(), wfProcess.getName());

                //get process
                ReportWorkflowProcess reportProcess = reportManager.getReportWorkflowProcess(reportPackage, wfProcess.getIdWithoutVersion(), wfProcess.getName());
                pInstance.setReportWorkflowProcess(reportProcess);
            }

            pInstance.setRequester(wfTrackProcess.getRequesterId());
            pInstance.setState(wfProcess.getState());
            pInstance.setDue(wfTrackProcess.getDue());
            pInstance.setStartedTime(wfTrackProcess.getStartedTime());
            pInstance.setFinishTime(wfTrackProcess.getFinishTime());
            pInstance.setDelay(wfTrackProcess.getDelayInSeconds());
            pInstance.setTimeConsumingFromStartedTime(wfTrackProcess.getTimeConsumingFromDateStartedInSeconds());

            reportManager.saveReportWorkflowProcessInstance(pInstance);

            return reportManager.getReportWorkflowProcessInstance(processInstanceId);
        }
View Full Code Here


                aInstance.setInstanceId(activityInstanceId);

                //set process Instance
                String processInstanceId = wfActivity.getProcessId();

                ReportWorkflowProcessInstance processInstance = reportManager.getReportWorkflowProcessInstance(processInstanceId);
                if (processInstance == null) {
                    processInstance = updateProcessData(wfProcess, wfTrackProcess, appId, appVersion);
                }
                aInstance.setReportWorkflowProcessInstance(processInstance);

                //set activity
                ReportWorkflowActivity reportActivtiy = reportManager.getReportWorkflowActivity(processInstance.getReportWorkflowProcess(), wfActivity.getActivityDefId(), wfActivity.getName());
                aInstance.setReportWorkflowActivity(reportActivtiy);

                //get assignment users
                try {
                    Thread.sleep(2000);
View Full Code Here

TOP

Related Classes of org.joget.report.model.ReportWorkflowProcessInstance

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.