Examples of Swimlane


Examples of org.jbpm.taskmgmt.def.Swimlane

      Element swimlaneElement = (Element) iter.next();
      String swimlaneName = swimlaneElement.attributeValue("name");
      if (swimlaneName==null) {
        addWarning("there's a swimlane without a name");
      } else {
        Swimlane swimlane = new Swimlane(swimlaneName);
        Element assignmentElement = swimlaneElement.element("assignment");

        if (assignmentElement!=null) {
         
          if ( (assignmentElement.attribute("actor-id")!=null)
              || (assignmentElement.attribute("pooled-actors")!=null)
            ) {
            swimlane.setActorIdExpression(assignmentElement.attributeValue("actor-id"));
            swimlane.setPooledActorsExpression(assignmentElement.attributeValue("pooled-actors"));
          
          } else {
            Delegation assignmentDelegation = readAssignmentDelegation(assignmentElement);
            swimlane.setAssignmentDelegation(assignmentDelegation);
          }
        } else {
          Task startTask = taskMgmtDefinition.getStartTask();
          if ( (startTask==null)
               || (startTask.getSwimlane()!=swimlane)
View Full Code Here

Examples of org.jbpm.taskmgmt.def.Swimlane

  public SwimlaneInstance getSwimlaneInstance(String swimlaneName) {
    return (SwimlaneInstance) (swimlaneInstances!=null ? swimlaneInstances.get(swimlaneName) : null );
  }

  public SwimlaneInstance createSwimlaneInstance(String swimlaneName) {
    Swimlane swimlane = (taskMgmtDefinition!=null ? taskMgmtDefinition.getSwimlane(swimlaneName) : null);
    if (swimlane!=null) {
      return createSwimlaneInstance(swimlane);
    }
    throw new JbpmException("couldn't create swimlane instance for non-existing swimlane "+swimlaneName);
  }
View Full Code Here

Examples of org.jbpm.taskmgmt.def.Swimlane

  public SwimlaneInstance getSwimlaneInstance(String swimlaneName) {
    return (SwimlaneInstance) (swimlaneInstances!=null ? swimlaneInstances.get(swimlaneName) : null );
  }

  public SwimlaneInstance createSwimlaneInstance(String swimlaneName) {
    Swimlane swimlane = (taskMgmtDefinition!=null ? taskMgmtDefinition.getSwimlane(swimlaneName) : null);
    if (swimlane!=null) {
      return createSwimlaneInstance(swimlane);
    }
    throw new JbpmException("couldn't create swimlane instance for non-existing swimlane "+swimlaneName);
  }
View Full Code Here

Examples of org.jbpm.taskmgmt.def.Swimlane

  }

  public void assign(ExecutionContext executionContext) {
    TaskMgmtInstance taskMgmtInstance = executionContext.getTaskMgmtInstance();
   
    Swimlane swimlane = task.getSwimlane();
    // if this task is in a swimlane
    if (swimlane!=null) {
     
      // if this is a task assignment for a start-state
      if (isStartTaskInstance()) {
View Full Code Here

Examples of org.jbpm.ui.common.model.Swimlane

        @Override
        public void widgetSelected(SelectionEvent e) {
            UpdateSwimlaneNameDialog dialog = new UpdateSwimlaneNameDialog(getDefinition(), true);
            if (dialog.open() == IDialogConstants.OK_ID) {
                Swimlane newSwimlane = JpdlVersionRegistry.getElementTypeDefinition(getDefinition().getJpdlVersion(), "swimlane").createElement();
                newSwimlane.setParent(getDefinition());
                newSwimlane.setName(dialog.getName());
                newSwimlane.setDelegationClassName(Swimlane.DELEGATION_CLASS_NAME);
                getDefinition().addSwimlane(newSwimlane);
                viewer.setSelection(new StructuredSelection(newSwimlane));
            }
        }
View Full Code Here

Examples of org.jbpm.ui.common.model.Swimlane

    private class ChangeSwimlaneSelectionListener extends SelectionAdapter {

        @Override
        public void widgetSelected(SelectionEvent e) {
            IStructuredSelection selection = (IStructuredSelection) viewer.getSelection();
            Swimlane swimlane = (Swimlane) selection.getFirstElement();

            String path = getDefinition().getSwimlaneGUIConfiguration().getEditorPath(swimlane.getName());
            SwimlaneConfigDialog dialog = new SwimlaneConfigDialog(getDefinition(), swimlane, path);
            if (dialog.open() == IDialogConstants.OK_ID) {
                swimlane.setDelegationConfiguration(dialog.getConfiguration());
                swimlane.setPublicVisibility(dialog.isPublicVisibility());
                getDefinition().getSwimlaneGUIConfiguration().putSwimlanePath(swimlane.getName(), dialog.getPath());
                viewer.setSelection(selection);
            }
        }
View Full Code Here

Examples of org.jbpm.ui.common.model.Swimlane

        @Override
        public void widgetSelected(SelectionEvent e) {
            List<Swimlane> newSwimlanes = (List<Swimlane>) Clipboard.getDefault().getContents();
            for (Swimlane swimlane : newSwimlanes) {
                boolean add = false;
                Swimlane newSwimlane = getDefinition().getSwimlaneByName(swimlane.getName());
                if (newSwimlane == null) {
                    newSwimlane = JpdlVersionRegistry.getElementTypeDefinition(getDefinition().getJpdlVersion(), "swimlane").createElement();
                    newSwimlane.setParent(getDefinition());
                    newSwimlane.setName(swimlane.getName());
                    add = true;
                }
                newSwimlane.setDelegationClassName(swimlane.getDelegationClassName());
                newSwimlane.setDelegationConfiguration(swimlane.getDelegationConfiguration());
                if (add) {
                    getDefinition().addSwimlane(newSwimlane);
                }
            }
        }
View Full Code Here

Examples of org.jbpm.ui.common.model.Swimlane

            swimlaneInitializerButton = new Button(gui, SWT.NONE);
            swimlaneInitializerButton.setText("...");
            swimlaneInitializerButton.addSelectionListener(new SelectionAdapter() {
                @Override
                public void widgetSelected(SelectionEvent e) {
                    Swimlane swimlane = new Swimlane();
                    swimlane.setName("TEST");
                    swimlane.setDelegationConfiguration(swimlaneInitializerText.getText());
                    SwimlaneConfigDialog dialog = new SwimlaneConfigDialog(definition, swimlane, "");
                    if (dialog.open() == IDialogConstants.OK_ID) {
                        swimlaneInitializerText.setText(dialog.getConfiguration());
                    }
                }
View Full Code Here

Examples of org.jbpm.ui.common.model.Swimlane

            String swimlaneName = element.getAttribute(SWIMLANE_ATTRIBUTE_NAME);
            String publicVisibilityStr = element.getAttribute(PUBLUC_ATTRIBUTE_NAME);
            boolean publicVisibility = "true".equals(publicVisibilityStr);
            if (swimlaneName != null && Boolean.parseBoolean(swimlaneName)) {
                try {
                    Swimlane swimlane = definition.getSwimlaneByName(variableName);
                    swimlane.setDescription(description);
                } catch (Exception e) {
                    DesignerLogger.logErrorWithoutDialog("No swimlane found for " + variableName, e);
                }
                continue;
            }
View Full Code Here

Examples of org.jbpm.ui.common.model.Swimlane

            NodeList stateChilds = node.getChildNodes();
            for (int j = 0; j < stateChilds.getLength(); j++) {
                Node stateNodeChild = stateChilds.item(j);
                if (TASK_NODE.equals(stateNodeChild.getNodeName())) {
                    String swimlaneName = getAttribute(stateNodeChild, SWIMLANE_NODE);
                    Swimlane swimlane = definition.getSwimlaneByName(swimlaneName);
                    startState.setSwimlane(swimlane);
                }
            }
        }

        NodeList actionNodeNodes = document.getElementsByTagName(ACTION_NODE_NODE);
        for (int i = 0; i < actionNodeNodes.getLength(); i++) {
            Node node = actionNodeNodes.item(i);
            ActionNode actionNode = create(node, definition);
            NodeList aaa = node.getChildNodes();
            for (int k = 0; k < aaa.getLength(); k++) {
                Node a = aaa.item(k);
                if (EVENT_NODE.equals(a.getNodeName())) {
                    String eventType = getAttribute(a, "type");
                    NodeList actionNodes = a.getChildNodes();
                    for (int l = 0; l < actionNodes.getLength(); l++) {
                        Node aa = actionNodes.item(l);
                        if (ACTION_NODE.equals(aa.getNodeName())) {
                            parseAction(aa, actionNode, eventType);
                        }
                    }
                }
            }
        }

        NodeList states = document.getElementsByTagName(TASK_STATE_NODE);
        for (int i = 0; i < states.getLength(); i++) {
            Node node = states.item(i);
            NodeList nodeList = node.getChildNodes();

            int transitionsCount = 0;
            boolean hasTimeOutTransition = false;
            for (int j = 0; j < nodeList.getLength(); j++) {
                Node childNode = nodeList.item(j);
                if (TRANSITION_NODE.equals(childNode.getNodeName())) {
                  String transitionName = getAttribute(childNode, NAME_ATTR);
                  if (PluginConstants.TIMER_TRANSITION_NAME.equals(transitionName)) {
                    hasTimeOutTransition = true;
                  }
                  transitionsCount++;
                }
            }
            GraphElement state;
            if (transitionsCount == 1 && hasTimeOutTransition) {
              state = create(node, definition, "waitState");
            } else {
              state = create(node, definition);
            }

            // TODO use SAX parser instead
            NodeList stateChilds = node.getChildNodes();
            for (int j = 0; j < stateChilds.getLength(); j++) {
                Node stateNodeChild = stateChilds.item(j);
                if (TASK_NODE.equals(stateNodeChild.getNodeName())) {
                    String swimlaneName = getAttribute(stateNodeChild, SWIMLANE_NODE);
                    if (swimlaneName != null && state instanceof SwimlanedNode) {
                      Swimlane swimlane = definition.getSwimlaneByName(swimlaneName);
                      ((SwimlanedNode) state).setSwimlane(swimlane);
                      String reassign = getAttribute(stateNodeChild, REASSIGN_ATTR);
                      if (reassign != null) {
                            boolean forceReassign = Boolean.parseBoolean(reassign);
                            ((State) state).setReassignmentEnabled(forceReassign);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.