Package org.enhydra.shark.xpdl.elements

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


        setForeground(bordercolor);

        // display limit
        String limit = act.getLimit();
        if (limit != null && limit.trim().length() > 0) {
            WorkflowProcess process = (WorkflowProcess)act.getParent().getParent();
            String durationUnit = process.getProcessHeader().getDurationUnit();
            if (durationUnit == null) {
                durationUnit = "";
            } else {
                durationUnit = durationUnit.toLowerCase();
            }
View Full Code Here


                startUndouableChange();
                List temp = new ArrayList();
                XMLElement newEl = null;
                if (xpdlClass == Activities.class || xpdlClass == Activity.class) {
                    ActivitySet as = selectionMng.getWorkingActivitySet();
                    WorkflowProcess wp = selectionMng.getWorkingProcess();
                    if (as != null && !as.isReadOnly()) {
                        newEl = JaWEManager.getInstance().getXPDLObjectFactory().createXPDLObject(as.getActivities(), typeId, true);
                    } else if (wp != null && !wp.isReadOnly()) {
                        newEl = JaWEManager.getInstance().getXPDLObjectFactory().createXPDLObject(wp.getActivities(), typeId, true);
                    }
                } else if (xpdlClass == ActivitySet.class || xpdlClass == ActivitySets.class) {
                    WorkflowProcess wp = selectionMng.getWorkingProcess();
                    if (wp != null && !wp.isReadOnly()) {
                        newEl = JaWEManager.getInstance().getXPDLObjectFactory().createXPDLObject(wp.getActivitySets(), typeId, true);
                    }
                } else if (xpdlClass == Application.class || xpdlClass == Applications.class) {
                    Package workingPkg = selectionMng.getWorkingPKG();
                    if (workingPkg != null && !workingPkg.isReadOnly()) {
                        newEl = JaWEManager.getInstance().getXPDLObjectFactory().createXPDLObject(workingPkg.getApplications(), typeId, true);
                    }
                } else if (xpdlClass == DataField.class || xpdlClass == DataFields.class) {
                    Package workingPkg = selectionMng.getWorkingPKG();
                    if (workingPkg != null && !workingPkg.isReadOnly()) {
                        newEl = JaWEManager.getInstance().getXPDLObjectFactory().createXPDLObject(workingPkg.getDataFields(), typeId, true);
                    }
                } else if (xpdlClass == ExtendedAttribute.class || xpdlClass == ExtendedAttributes.class) {
                    Package workingPkg = selectionMng.getWorkingPKG();
                    if (workingPkg != null && !workingPkg.isReadOnly()) {
                        newEl = JaWEManager.getInstance().getXPDLObjectFactory().createXPDLObject(workingPkg.getExtendedAttributes(), typeId, true);
                    }
                } else if (xpdlClass == FormalParameter.class || xpdlClass == FormalParameters.class) {
                    WorkflowProcess wp = selectionMng.getWorkingProcess();
                    if (wp != null && !wp.isReadOnly()) {
                        newEl = JaWEManager.getInstance().getXPDLObjectFactory().createXPDLObject(wp.getFormalParameters(), typeId, true);
                    }
                } else if (xpdlClass == Namespace.class || xpdlClass == Namespaces.class) {
                    Package workingPkg = selectionMng.getWorkingPKG();
                    if (workingPkg != null && !workingPkg.isReadOnly()) {
                        newEl = JaWEManager.getInstance().getXPDLObjectFactory().createXPDLObject(workingPkg.getNamespaces(), typeId, true);
                    }
                } else if (xpdlClass == Participant.class || xpdlClass == Participants.class) {
                    Package workingPkg = selectionMng.getWorkingPKG();
                    if (workingPkg != null && !workingPkg.isReadOnly()) {
                        newEl = JaWEManager.getInstance().getXPDLObjectFactory().createXPDLObject(workingPkg.getParticipants(), typeId, true);
                    }
                } else if (xpdlClass == Responsible.class || xpdlClass == Responsibles.class) {
                    Package workingPkg = selectionMng.getWorkingPKG();
                    if (workingPkg != null && !workingPkg.isReadOnly()) {
                        newEl = JaWEManager.getInstance().getXPDLObjectFactory().createXPDLObject(workingPkg.getRedefinableHeader().getResponsibles(),
                                typeId,
                                true);
                    }
                } else if (xpdlClass == Transition.class || xpdlClass == Transitions.class) {
                    ActivitySet as = selectionMng.getWorkingActivitySet();
                    WorkflowProcess wp = selectionMng.getWorkingProcess();
                    if (as != null && !as.isReadOnly()) {
                        newEl = JaWEManager.getInstance().getXPDLObjectFactory().createXPDLObject(as.getTransitions(), typeId, true);
                    } else if (wp != null && !wp.isReadOnly()) {
                        newEl = JaWEManager.getInstance().getXPDLObjectFactory().createXPDLObject(wp.getTransitions(), typeId, true);
                    }
                } else if (xpdlClass == TypeDeclaration.class || xpdlClass == TypeDeclarations.class) {
                    Package workingPkg = selectionMng.getWorkingPKG();
                    if (workingPkg != null && !workingPkg.isReadOnly()) {
                        newEl = JaWEManager.getInstance().getXPDLObjectFactory().createXPDLObject(workingPkg.getTypeDeclarations(), typeId, true);
View Full Code Here

            if (changedElement instanceof WorkflowProcesses) {
                if (action == XMLElementChangeInfo.REMOVED) {
                    if (info.getChangedSubElements() != null) {
                        Iterator it = info.getChangedSubElements().iterator();
                        while (it.hasNext()) {
                            WorkflowProcess wp = (WorkflowProcess) it.next();
                            if (wp == selectionMng.getWorkingProcess()) {
                                // select package
                                selectionMng.setSelection(wp.getParent().getParent(), true);
                                break;
                            }
                        }
                    }
                }
View Full Code Here

        return selectionEvent;
    }

    public boolean confirmDelete(List sel, XMLElement firstSelected) {
        XMLComplexElement pkgOrWP = getMainPackage();
        WorkflowProcess wp = XMLUtil.getWorkflowProcess(firstSelected);
        if (wp != null && wp != firstSelected) {
            pkgOrWP = wp;
        }

        String doNotAskOnDeletionOfReferencedElements = getControllerSettings().doNotAskOnDeletionOfReferencedElementTypes();
View Full Code Here

     * @return name of the default variable, null if not created
     */
    protected String checkDefaultVariable(Transition transition) {
        String variableName = null;
        // check for existing variables
        WorkflowProcess process = (WorkflowProcess) transition.getParent().getParent();
        Map dataFieldMap = XMLUtil.getPossibleDataFields(process);
        if (dataFieldMap.isEmpty() || dataFieldMap.get(DEFAULT_VARIABLE) != null) {
            variableName = DEFAULT_VARIABLE;
        }
        return variableName;
View Full Code Here

    /**
     * Create default variable if no existing variables
     * @return name of the created variable, null if not created
     */
    protected void createDefaultVariable(Transition transition, String variableName) {
        WorkflowProcess process = (WorkflowProcess) transition.getParent().getParent();
        Map dataFieldMap = XMLUtil.getPossibleDataFields(process);
        if (dataFieldMap.isEmpty() || dataFieldMap.get(variableName) == null) {
            // default variable does not exist, create new one
            DataFields dfs = process.getDataFields();
            DataField df = (DataField)dfs.generateNewElement();
            df.setId(variableName);
            dfs.add(df);
        }
    }
View Full Code Here

TOP

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

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.