Package org.enhydra.shark.api.client.wfservice

Examples of org.enhydra.shark.api.client.wfservice.WMEntityIterator


                wa.setType(WorkflowActivity.TYPE_NORMAL);
                wa.setProcessVersion(entity.getPkgVer());
                //check activity type

                //check for tool
                WMEntityIterator activityEntityIterator = xpdlBrowser.listEntities(sessionHandle, entity, null, true);
                while (activityEntityIterator.hasNext()) {
                    WMEntity actEnt = (WMEntity) activityEntityIterator.next();
                    if (actEnt.getType().equalsIgnoreCase("tool")) {
                        wa.setType(WorkflowActivity.TYPE_TOOL);
                        break;
                    } else if (actEnt.getType().equalsIgnoreCase("route")) {
                        wa.setType(WorkflowActivity.TYPE_ROUTE);
View Full Code Here


            XPDLBrowser xpdlBrowser = shark.getXPDLBrowser();

            // get package variables
            WMFilter vfilter = new WMFilter("Type", WMFilter.EQ, "DataField");
            vfilter.setFilterType(XPDLBrowser.SIMPLE_TYPE_XPDL);
            WMEntityIterator ei = xpdlBrowser.listEntities(sessionHandle, packageEntity, vfilter, true);
            WMEntity[] variables = ei.getArray();
            for (int i = 0; i < variables.length; i++) {
                WMEntity entity = variables[i];
                WorkflowVariable wv = new WorkflowVariable();
                wv.setId(entity.getId());
                wv.setName(entity.getName());
                wv.setPackageLevel(true);
                variableList.add(wv);
            }

            // get process variables
            WMEntityIterator ei2 = xpdlBrowser.listEntities(sessionHandle, processEntity, vfilter, true);
            WMEntity[] variables2 = ei2.getArray();
            for (int i = 0; i < variables2.length; i++) {
                WMEntity entity = variables2[i];
                WorkflowVariable wv = new WorkflowVariable();
                wv.setId(entity.getId());
                wv.setName(entity.getName());
View Full Code Here

            filter = new WMFilter();
            filter.setFilterType(XPDLBrowser.SIMPLE_TYPE_XPDL);
            filter.setAttributeName("Type");
            filter.setFilterString("ProcessHeader");

            WMEntityIterator processLimitEntityIterator = xpdl.listEntities(sessionHandle, processLimitEnt, filter, true);
            WMEntity[] processLimitEntityList = null;
            if (processLimitEntityIterator != null) {
                processLimitEntityList = processLimitEntityIterator.getArray();
            }

            if (processLimitEntityList != null) {
                WMEntity processLimitEntity = processLimitEntityList[0];

                filter.setFilterType(XPDLBrowser.SIMPLE_TYPE_XPDL);
                filter.setAttributeName("Name");
                filter.setFilterString("Limit");

                WMAttributeIterator procAttributeIterator = xpdl.listAttributes(sessionHandle, processLimitEntity, filter, true);
                WMAttribute[] procAttributeList = null;
                if (procAttributeIterator != null) {
                    procAttributeList = procAttributeIterator.getArray();
                }

                if (procAttributeList[0].getValue() != null && !procAttributeList[0].getValue().equals("")) {
                    try {
                        limit = Double.parseDouble((String) procAttributeList[0].getValue());
                    } catch (Exception e) {}
                }
            }

            String durationUnit = "";
            if (limit != -1) {
                //get duration unit
                filter = new WMFilter();
                filter.setFilterType(XPDLBrowser.SIMPLE_TYPE_XPDL);
                filter.setAttributeName("Type");
                filter.setFilterString("ProcessHeader");

                WMEntity processDurationEnt = admin.getProcessDefinitionInfo(sessionHandle, processInstanceId);
                WMEntityIterator processDurationEntityIterator = xpdl.listEntities(sessionHandle, processDurationEnt, filter, true);
                WMEntity[] processDurationEntityList = null;
                if (processDurationEntityIterator != null) {
                    processDurationEntityList = processDurationEntityIterator.getArray();
                }

                if (processDurationEntityList != null) {
                    WMEntity entity = processDurationEntityList[0];
View Full Code Here

                filter.setFilterType(XPDLBrowser.SIMPLE_TYPE_XPDL);
                filter.setAttributeName("Type");
                filter.setFilterString("ProcessHeader");

                WMEntity procEnt = admin.getProcessDefinitionInfo(sessionHandle, processInstanceId);
                WMEntityIterator procEntityIterator = xpdl.listEntities(sessionHandle, procEnt, filter, true);
                WMEntity[] procEntityList = null;
                if (procEntityIterator != null) {
                    procEntityList = procEntityIterator.getArray();
                }

                if (procEntityList != null) {
                    WMEntity ent = procEntityList[0];
View Full Code Here

            for (WfActivity wfAct : activityList) {
                String activityId = wfAct.key();
                WMEntity activityEntity = admin.getActivityDefinitionInfo(sessionHandle, processId, activityId);

                //check for tool
                WMEntityIterator activityEntityIterator = xpdl.listEntities(sessionHandle, activityEntity, null, true);
                while (activityEntityIterator.hasNext()) {
                    WMEntity entity = (WMEntity) activityEntityIterator.next();
                    if (entity.getType().equalsIgnoreCase("tool") || entity.getType().equalsIgnoreCase("route")) {
                        break;
                    } else if (entity.getType().equalsIgnoreCase("subflow")) { //redirect to the first activity id from sub flow
                        WfProcess[] wfProcesses = wfAct.get_sequence_performer(0);
                        WfProcess wfProcess = (wfProcesses.length > 0 ? wfProcesses[0] : null);
View Full Code Here

TOP

Related Classes of org.enhydra.shark.api.client.wfservice.WMEntityIterator

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.