Examples of Delegation


Examples of net.jini.core.constraint.Delegation

         */
        logger.log(Level.FINE,
                "\n\t+++++ TestCase #10:"
                + "  net.jini.core.constraint.Delegation");
        {
            Delegation obj1 = Delegation.YES;
            Delegation obj2 = Delegation.YES;
            Delegation obj3 = Delegation.NO;

            if (!checker(obj1, obj2, obj3)) {
                throw new TestException(
                        "" + " test failed");
            }
View Full Code Here

Examples of org.jbpm.instantiation.Delegation

    } else if (actionElement.attribute("ref-name")!=null) {
      jpdlReader.addUnresolvedActionReference(actionElement, this);

    } else if (actionElement.attribute("class")!=null) {
      actionDelegation = new Delegation();
      actionDelegation.read(actionElement, jpdlReader);
     
    } else {
      jpdlReader.addWarning("action does not have class nor ref-name attribute "+actionElement.asXML());
    }
View Full Code Here

Examples of org.jbpm.instantiation.Delegation

            swimlane.setPooledActorsExpression(assignmentElement.attributeValue("pooled-actors"));

          }
          else
          {
            Delegation assignmentDelegation = readAssignmentDelegation(assignmentElement);
            swimlane.setAssignmentDelegation(assignmentDelegation);
          }
        }
        taskMgmtDefinition.addSwimlane(swimlane);
      }
View Full Code Here

Examples of org.jbpm.instantiation.Delegation

        task.setPooledActorsExpression(assignmentElement.attributeValue("pooled-actors"));

      }
      else
      {
        Delegation assignmentDelegation = readAssignmentDelegation(assignmentElement);
        task.setAssignmentDelegation(assignmentDelegation);
      }

      // if no assignment or swimlane is specified
    }
    else
    {
      // the user has to manage assignment manually, so we better inform him/her.
      log.info("process xml information: no swimlane or assignment specified for task '" + taskElement.asXML() + "'");
    }

    // notify
    String notificationsText = taskElement.attributeValue("notify");
    if (notificationsText != null
        && ("true".equalsIgnoreCase(notificationsText) || "on".equalsIgnoreCase(notificationsText) || "yes".equalsIgnoreCase(notificationsText)))
    {
      String notificationEvent = Event.EVENTTYPE_TASK_ASSIGN;
      Event event = task.getEvent(notificationEvent);
      if (event == null)
      {
        event = new Event(notificationEvent);
        task.addEvent(event);
      }
      Delegation delegation = createMailDelegation(notificationEvent, null, null, null, null);
      Action action = new Action(delegation);
      action.setProcessDefinition(processDefinition);
      action.setName(task.getName());
      event.addAction(action);
    }
View Full Code Here

Examples of org.jbpm.instantiation.Delegation

    return task;
  }

  protected Delegation readAssignmentDelegation(Element assignmentElement)
  {
    Delegation assignmentDelegation = new Delegation();
    String expression = assignmentElement.attributeValue("expression");
    String actorId = assignmentElement.attributeValue("actor-id");
    String pooledActors = assignmentElement.attributeValue("pooled-actors");

    if (expression != null)
    {
      assignmentDelegation.setProcessDefinition(processDefinition);
      assignmentDelegation.setClassName("org.jbpm.identity.assignment.ExpressionAssignmentHandler");
      assignmentDelegation.setConfiguration("<expression>" + expression + "</expression>");

    }
    else if ((actorId != null) || (pooledActors != null))
    {
      assignmentDelegation.setProcessDefinition(processDefinition);
      assignmentDelegation.setClassName("org.jbpm.taskmgmt.assignment.ActorAssignmentHandler");
      String configuration = "";
      if (actorId != null)
      {
        configuration += "<actorId>" + actorId + "</actorId>";
      }
      if (pooledActors != null)
      {
        configuration += "<pooledActors>" + pooledActors + "</pooledActors>";
      }
      assignmentDelegation.setConfiguration(configuration);

    }
    else
    {
      assignmentDelegation = new Delegation();
      assignmentDelegation.read(assignmentElement, this);
    }

    return assignmentDelegation;
  }
View Full Code Here

Examples of org.jbpm.instantiation.Delegation

  {
    TaskController taskController = new TaskController();

    if (taskControllerElement.attributeValue("class") != null)
    {
      Delegation taskControllerDelegation = new Delegation();
      taskControllerDelegation.read(taskControllerElement, this);
      taskController.setTaskControllerDelegation(taskControllerDelegation);

    }
    else
    {
View Full Code Here

Examples of org.jbpm.instantiation.Delegation

    {
      action = readSingleAction(timerElement);
    }
    else
    {
      Delegation delegation = createMailDelegation("task-reminder", null, null, null, null);
      action = new Action(delegation);
    }
    createTimerAction.setTimerAction(action);
    addAction(task, Event.EVENTTYPE_TASK_CREATE, createTimerAction);
View Full Code Here

Examples of org.jbpm.instantiation.Delegation

    else if (JbpmConfiguration.Configs.hasObject("mail.class.name"))
    {
      mailClassName = JbpmConfiguration.Configs.getString("mail.class.name");
    }

    Delegation delegation = new Delegation(mailClassName);
    delegation.setProcessDefinition(processDefinition);
    delegation.setConfiguration(config.toString());
    return delegation;
  }
View Full Code Here

Examples of org.jbpm.instantiation.Delegation

    if (expression != null) {
      decisionExpression = expression;
    }
    else if (decisionHandlerElement != null) {
      decisionDelegation = new Delegation();
      decisionDelegation.read(decisionHandlerElement, jpdlReader);
    }
  }
View Full Code Here

Examples of org.jbpm.instantiation.Delegation

   
    processDefinition = saveAndReload(processDefinition);
    taskMgmtDefinition = processDefinition.getTaskMgmtDefinition();
    Swimlane boss = taskMgmtDefinition.getSwimlane("boss");
    assertNotNull(boss);
    Delegation bossAssignmentDelegation = boss.getAssignmentDelegation();
    assertNotNull(bossAssignmentDelegation);
    String assignmentHandlerClassName = bossAssignmentDelegation.getClassName();
    assertNotNull(assignmentHandlerClassName);
    assertEquals("org.jbpm.TheOneAndOnly", assignmentHandlerClassName);
  }
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.