Package org.enhydra.shark.api.client.wfmodel

Examples of org.enhydra.shark.api.client.wfmodel.WfProcess


        try {

            sc = connect();

            WfProcess wfProcess = sc.getProcess(instanceId);
            processDefId = (wfProcess != null ? wfProcess.manager().name() : null);


        } catch (Exception ex) {

            LogUtil.error(getClass().getName(), ex, "");
View Full Code Here


            pi.set_query_expression(query_expression);

            WfProcess[] wfRunningProcessList = pi.get_next_n_sequence(0);

            for (int i = 0; i < wfRunningProcessList.length; ++i) {
                WfProcess wfProcess = wfRunningProcessList[i];
                WfProcessMgr manager = wfProcess.manager();

                WorkflowProcess workflowProcess = new WorkflowProcess();
                workflowProcess.setId(manager.name());
                workflowProcess.setInstanceId(wfProcess.key());
                workflowProcess.setName(wfProcess.name());
                workflowProcess.setState(wfProcess.state());
                workflowProcess.setPackageId(MiscUtilities.getProcessMgrPkgId(manager.name()));
                workflowProcess.setVersion(manager.version());
                workflowProcess.setRequesterId(getUserByProcessIdAndActivityDefId(workflowProcess.getId(), workflowProcess.getInstanceId(), WorkflowUtil.ACTIVITY_DEF_ID_RUN_PROCESS));

                WorkflowProcess trackWflowProcess = getRunningProcessInfo(wfProcess.key());
                workflowProcess.setStartedTime(trackWflowProcess.getStartedTime());
                workflowProcess.setDue(trackWflowProcess.getDue());

                runningProcessList.add(workflowProcess);
            }
View Full Code Here

            String query_expression = "(" + sharkExpression + ")" + " /*sql (" + sqlExpression + ") " + sortStr + " sql*/ " + queryExpression;
            pi.set_query_expression(query_expression);
            WfProcess[] wfRunningProcessList = pi.get_next_n_sequence(0);

            for (int i = 0; i < wfRunningProcessList.length; ++i) {
                WfProcess wfProcess = wfRunningProcessList[i];
                WfProcessMgr manager = wfProcess.manager();

                WorkflowProcess workflowProcess = new WorkflowProcess();
                workflowProcess.setId(manager.name());
                workflowProcess.setInstanceId(wfProcess.key());
                workflowProcess.setName(wfProcess.name());
                workflowProcess.setState(wfProcess.state());
                workflowProcess.setPackageId(MiscUtilities.getProcessMgrPkgId(manager.name()));
                workflowProcess.setVersion(manager.version());
                workflowProcess.setRequesterId(getUserByProcessIdAndActivityDefId(workflowProcess.getId(), workflowProcess.getInstanceId(), WorkflowUtil.ACTIVITY_DEF_ID_RUN_PROCESS));

                WorkflowProcess trackWflowProcess = getRunningProcessInfo(wfProcess.key());
                workflowProcess.setStartedTime(trackWflowProcess.getStartedTime());
                workflowProcess.setDue(trackWflowProcess.getDue());

                runningProcessList.add(workflowProcess);
            }
View Full Code Here

            pi.set_query_expression(pieb.toIteratorExpression(sessionHandle, filter));
            WfProcess[] wfProcessList = pi.get_next_n_sequence(0);

            if (wfProcessList.length > 0) {
                WfProcess wfProcess = wfProcessList[0];
                WfProcessMgr manager = wfProcess.manager();

                workflowProcess.setId(manager.name());
                workflowProcess.setInstanceId(wfProcess.key());
                workflowProcess.setName(wfProcess.name());
                workflowProcess.setState(wfProcess.state());
                workflowProcess.setPackageId(MiscUtilities.getProcessMgrPkgId(manager.name()));
                workflowProcess.setVersion(manager.version());
                workflowProcess.setRequesterId(getUserByProcessIdAndActivityDefId(workflowProcess.getId(), workflowProcess.getInstanceId(), WorkflowUtil.ACTIVITY_DEF_ID_RUN_PROCESS));
            }
View Full Code Here

                workflowActivity.setId(wfActivity.key());
                WMEntity entity = admin.getActivityDefinitionInfo(sessionHandle, wfActivity.container().key(), wfActivity.key());
                workflowActivity.setActivityDefId(entity.getId());

                WfProcess process = wfActivity.container();
                WfProcessMgr manager = process.manager();

                workflowActivity.setName(wfActivity.name());
                workflowActivity.setState(wfActivity.state());
                workflowActivity.setProcessDefId(wfActivity.container().manager().name());
                workflowActivity.setProcessId(wfActivity.container().key());
                workflowActivity.setProcessName(wfActivity.container().name());
                workflowActivity.setProcessVersion(manager.version());
                workflowActivity.setPriority(String.valueOf(wfActivity.priority()));
                workflowActivity.setProcessStatus(process.state());
                // check for hash variable
                if (WorkflowUtil.containsHashVariable(wfActivity.name())) {
                    WorkflowAssignment ass = new WorkflowAssignment();
                    ass.setProcessId(workflowActivity.getProcessId());
                    ass.setProcessDefId(workflowActivity.getProcessDefId());
View Full Code Here

                return null;
            }

            sc = connect();

            WfProcess wfProcess = sc.getProcess(processInstanceId);

            if (wfProcess != null) {
                Map varMap = wfProcess.process_context();
                LogUtil.debug(getClass().getName(), "varMap: " + varMap);

                if (!varMap.isEmpty()) {
                    return String.valueOf(varMap.get(variableId));
                }
View Full Code Here

        try {

            sc = connect();

            WfProcess wfProcess = sc.getProcess(processId);

            if (wfProcess != null) {
                Map varMap = wfProcess.process_context();
                LogUtil.debug(getClass().getName(), "varMap: " + varMap);
                for (Iterator i = varMap.keySet().iterator(); i.hasNext();) {
                    String key = (String) i.next();
                    Object val = varMap.get(key);
                    WorkflowVariable wv = new WorkflowVariable();
View Full Code Here

            WMSessionHandle sessionHandle = sc.getSessionHandle();
            Shark shark = Shark.getInstance();
            XPDLBrowser xpdl = shark.getXPDLBrowser();

            String activityInstanceId = wfActivity.key();
            WfProcess wfProcess = wfActivity.container();
            WfProcessMgr wfProcessMgr = wfProcess.manager();
            String processInstanceId = wfProcess.key();
            String processDefId = wfProcessMgr.name();

            //get limit
            AdminMisc admin = shark.getAdminMisc();
            WMEntity actEnt = admin.getActivityDefinitionInfo(sessionHandle, processInstanceId, activityInstanceId);
View Full Code Here

            pi.set_query_expression(pfb.toIteratorExpression(sessionHandle, filter));
            WfProcess[] wfProcessList = pi.get_next_n_sequence(0);


            if (wfProcessList.length > 0) {
                WfProcess wfProcess = wfProcessList[0];
                Map processContext = wfProcess.process_context();
                processContext.put(variableId, variableValue);
                wfProcess.set_process_context(processContext);
            }

        } catch (Exception ex) {
            LogUtil.error(getClass().getName(), ex, "");
        } finally {
View Full Code Here

            WMFilter filter = pieb.addIdEquals(sessionHandle, procInstanceId);

            pi.set_query_expression(pieb.toIteratorExpression(sessionHandle, filter));

            WfProcess[] wfProcessList = pi.get_next_n_sequence(0);
            WfProcess wfProcess = null;
            if (wfProcessList != null && wfProcessList.length > 0) {
                wfProcess = wfProcessList[0];
            }

            if (wfProcess != null && !wfProcess.state().startsWith(SharkConstants.STATEPREFIX_CLOSED)) {
                WAPI wapi = Shark.getInstance().getWAPIConnection();
                wapi.terminateProcessInstance(sessionHandle, procInstanceId);
            }

            ea.deleteProcessesWithFiltering(sessionHandle, filter);
View Full Code Here

TOP

Related Classes of org.enhydra.shark.api.client.wfmodel.WfProcess

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.