Package org.enhydra.shark.xpdl.elements

Examples of org.enhydra.shark.xpdl.elements.ExtendedAttribute


            // CUSTOM: grab every available workflow variable from the workflow process that it belongs to and add as extended attribute (view only)
            WorkflowProcess process = (WorkflowProcess) act.getParent().getParent();
            Map m = XMLUtil.getPossibleVariables(process);
            XMLCollectionElement dataFields[] = (XMLCollectionElement[]) m.values().toArray(new XMLCollectionElement[0]);
            for (int i = 0; i < dataFields.length; i++) {
                ExtendedAttribute attribute = this.createXPDLObject(act.getExtendedAttributes(), null, true);
                attribute.setName("VariableToProcess_UPDATE");
                attribute.setVValue(dataFields[i].getId());
            }
            // END CUSTOM
        }
        return act;
    }
View Full Code Here


    }

    public ExtendedAttribute createXPDLObject(ExtendedAttributes eas,
            String type,
            boolean addToCollection) {
        ExtendedAttribute ea = (ExtendedAttribute) eas.generateNewElement();
        adjustType(ea, type);

        JaWETypes jts = JaWEManager.getInstance().getJaWEController().getJaWETypes();
        boolean hasTemplate = jts.hasTemplateId(type);
        if (hasTemplate) {
View Full Code Here

    public boolean canInsertElement(XMLCollection col, XMLElement el) {
        if (el == null) {
            return true;
        }
        ExtendedAttribute ea = null;
        if (el instanceof ExtendedAttribute) {
            ea = (ExtendedAttribute) el;
        } else if (el.getParent() instanceof ExtendedAttribute) {
            ea = (ExtendedAttribute) el.getParent();
        }
View Full Code Here

    public boolean canModifyElement(XMLElement el) {
        if (el == null) {
            return true;
        }
        ExtendedAttribute ea = null;
        if (el instanceof ExtendedAttribute) {
            ea = (ExtendedAttribute) el;
        } else if (el.getParent() instanceof ExtendedAttribute) {
            ea = (ExtendedAttribute) el.getParent();
        }
View Full Code Here

    public boolean canRemoveElement(XMLCollection col, XMLElement el) {
        if (el == null) {
            return true;
        }
        ExtendedAttribute ea = null;
        if (el instanceof ExtendedAttribute) {
            ea = (ExtendedAttribute) el;
        } else if (el.getParent() instanceof ExtendedAttribute) {
            ea = (ExtendedAttribute) el.getParent();
        }
        if (ea != null) {
            boolean isMyEA = GraphUtilities.isMyKindOfExtendedAttribute(ea);
            if (isMyEA) {
                String eaName = ea.getName();
                if (eaName.equals(GraphEAConstants.EA_JAWE_GRAPH_END_OF_WORKFLOW) ||
                        eaName.equals(GraphEAConstants.EA_JAWE_GRAPH_START_OF_WORKFLOW) ||
                        eaName.equals(GraphEAConstants.EA_JAWE_GRAPH_START_OF_BLOCK) ||
                        eaName.equals(GraphEAConstants.EA_JAWE_GRAPH_END_OF_BLOCK)) {
                    return true;
View Full Code Here

    public boolean canDuplicateElement(XMLCollection col, XMLElement el) {
        if (el == null) {
            return true;
        }
        ExtendedAttribute ea = null;
        if (el instanceof ExtendedAttribute) {
            ea = (ExtendedAttribute) el;
        } else if (el.getParent() instanceof ExtendedAttribute) {
            ea = (ExtendedAttribute) el.getParent();
        }
View Full Code Here

    public boolean canRepositionElement(XMLCollection col, XMLElement el) {
        if (el == null) {
            return true;
        }
        ExtendedAttribute ea = null;
        if (el instanceof ExtendedAttribute) {
            ea = (ExtendedAttribute) el;
        } else if (el.getParent() instanceof ExtendedAttribute) {
            ea = (ExtendedAttribute) el.getParent();
        }
View Full Code Here

                Point partLoc = getGraphManager().getBounds(gpar, null).getBounds().getLocation();
                Point offset = new Point(whereTo.x - partLoc.x, whereTo.y - partLoc.y);
                String partId = gpar.getPropertyObject().get("Id").toValue();
                graphController.setUpdateInProgress(true);
                JaWEManager.getInstance().getJaWEController().startUndouableChange();
                ExtendedAttribute ea = GraphUtilities.createStartOrEndExtendedAttribute(getGraph().getXPDLObject(), true, partId, offset, subType,
                        true);
                getGraphManager().insertStart(ea);
                List toSelect = new ArrayList();
                toSelect.add(ea);
                JaWEManager.getInstance().getJaWEController().endUndouableChange(toSelect);
                getGraph().selectBubble(ea, false);
                graphController.setUpdateInProgress(false);
            }
        }

        // if end button is selected
        if (isEndButtonSelected()) {
            if (!getGraphManager().doesRootParticipantExist()) {
                JaWEFrame frame = JaWEManager.getInstance().getJaWEController().getJaWEFrame();
                JOptionPane.showMessageDialog(frame, getGraphController().getSettings().getLanguageDependentString(
                        "WarningInvalidOperation"), frame.getAppTitle(),
                        JOptionPane.WARNING_MESSAGE);

            } else {
                GraphParticipantInterface gpar = getGraphManager().findParentActivityParticipantForLocation(whereTo, null,
                        null);
                Point partLoc = getGraphManager().getBounds(gpar, null).getBounds().getLocation();
                Point offset = new Point(whereTo.x - partLoc.x, whereTo.y - partLoc.y);
                String partId = gpar.getPropertyObject().get("Id").toValue();
                graphController.setUpdateInProgress(true);
                JaWEManager.getInstance().getJaWEController().startUndouableChange();
                ExtendedAttribute ea = GraphUtilities.createStartOrEndExtendedAttribute(getGraph().getXPDLObject(), false, partId, offset, subType,
                        true);
                getGraphManager().insertEnd(ea);
                List toSelect = new ArrayList();
                toSelect.add(ea);
                JaWEManager.getInstance().getJaWEController().endUndouableChange(toSelect);
View Full Code Here

            return false;
        } else if (XMLUtil.getParentElement(ExternalPackage.class, el) != null) {
            if (el.toName().equals("href")) {
                return false;
            }
            ExtendedAttribute ea = (ExtendedAttribute) XMLUtil.getParentElement(ExtendedAttribute.class,
                    el);
            if (ea != null) {
                if (ea.getName().equals(JaWEEAHandler.EA_JAWE_EXTERNAL_PACKAGE_ID)) {
                    return false;
                }
            }
        }
View Full Code Here

TOP

Related Classes of org.enhydra.shark.xpdl.elements.ExtendedAttribute

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.