Package org.enhydra.shark.api.common

Examples of org.enhydra.shark.api.common.ProcessFilterBuilder


            LogUtil.info(getClass().getName(), "Deleting running processes for " + packageId + " version " + version);
            Shark shark = Shark.getInstance();
            ExecutionAdministration ea = shark.getExecutionAdministration();
            WAPI wapi = shark.getWAPIConnection();
            WfProcessIterator wpi = sc.get_iterator_process();
            ProcessFilterBuilder fb = shark.getProcessFilterBuilder();
            WMSessionHandle sessionHandle = sc.getSessionHandle();
            WMFilter filter1 = fb.addPackageIdEquals(sessionHandle, packageId);
            WMFilter filter2 = fb.addVersionEquals(sessionHandle, version);
            WMFilter filter = fb.and(sessionHandle, filter1, filter2);
            wpi.set_query_expression(fb.toIteratorExpression(sessionHandle, filter));
            WfProcess[] procs = wpi.get_next_n_sequence(0);
            for (int i = 0; i < procs.length; i++) {
                String instanceId = procs[i].key();
                try {
                    if (procs[i].state().startsWith(SharkConstants.STATEPREFIX_OPEN)) {
View Full Code Here


            ExecutionAdministration ea = shark.getExecutionAdministration();
            WMSessionHandle sessionHandle = sc.getSessionHandle();
            PackageAdministration pa = getSharkPackageAdmin(sessionHandle);
            WAPI wapi = shark.getWAPIConnection();
            WfProcessIterator wpi = sc.get_iterator_process();
            ProcessFilterBuilder fb = shark.getProcessFilterBuilder();
            WMFilter filter = fb.addPackageIdEquals(sessionHandle, packageId);
            wpi.set_query_expression(fb.toIteratorExpression(sessionHandle, filter));
            WfProcess[] procs = wpi.get_next_n_sequence(0);
            for (int i = 0; i < procs.length; i++) {
                String instanceId = procs[i].key();
                if (procs[i].state().startsWith(SharkConstants.STATEPREFIX_OPEN)) {
                    wapi.terminateProcessInstance(sessionHandle, instanceId);
View Full Code Here

            sc = connect();

            Shark shark = Shark.getInstance();
            WfProcessIterator pi = sc.get_iterator_process();
            ProcessFilterBuilder pieb = shark.getProcessFilterBuilder();
            WMSessionHandle sessionHandle = sc.getSessionHandle();

            WMFilter filter = new WMFilter();

            if (processId != null && processId.trim().length() > 0) {
                filter = pieb.addIdEquals(sessionHandle, processId);
            }

            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();
View Full Code Here

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

            WfProcessIterator pi = sc.get_iterator_process();
            ProcessFilterBuilder pfb = shark.getProcessFilterBuilder();

            XPDLBrowser xpdl = shark.getXPDLBrowser();

            WMFilter filter = new WMFilter();

            if (processInstanceId != null && processInstanceId.trim().length() > 0) {
                filter = pfb.addIdEquals(sessionHandle, processInstanceId);
            }

            pi.set_query_expression(pfb.toIteratorExpression(sessionHandle, filter));
            WfProcess[] wfProcessArray = pi.get_next_n_sequence(0);
            WorkflowProcess wfProcess = new WorkflowProcess();


            double limit = -1;
View Full Code Here

            sc = connect();

            Shark shark = Shark.getInstance();
            WfProcessIterator pi = sc.get_iterator_process();
            ProcessFilterBuilder pfb = shark.getProcessFilterBuilder();
            WMSessionHandle sessionHandle = sc.getSessionHandle();

            WMFilter filter = new WMFilter();

            if (processInstanceId != null && processInstanceId.trim().length() > 0) {
                filter = pfb.addIdEquals(sessionHandle, processInstanceId);
            }

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


            if (wfProcessList.length > 0) {
                WfProcess wfProcess = wfProcessList[0];
View Full Code Here

            WMSessionHandle sessionHandle = sc.getSessionHandle();
            Shark shark = Shark.getInstance();
            ExecutionAdministration ea = shark.getExecutionAdministration();

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

            ea.reevaluateAssignmentsWithFiltering(sessionHandle, filter, true);


        } catch (Exception ex) {
View Full Code Here

            WMSessionHandle sessionHandle = sc.getSessionHandle();
            Shark shark = Shark.getInstance();
            ExecutionAdministration ea = shark.getExecutionAdministration();

            WfProcessIterator pi = sc.get_iterator_process();
            ProcessFilterBuilder pieb = shark.getProcessFilterBuilder();
            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];
View Full Code Here

            WMSessionHandle sessionHandle = sc.getSessionHandle();
            Shark shark = Shark.getInstance();
            ExecutionAdministration ea = shark.getExecutionAdministration();

            WfProcessIterator pi = sc.get_iterator_process();
            ProcessFilterBuilder pieb = shark.getProcessFilterBuilder();
            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) {
View Full Code Here

TOP

Related Classes of org.enhydra.shark.api.common.ProcessFilterBuilder

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.