Examples of Delegation


Examples of org.jbpm.instantiation.Delegation

  protected TaskController readTaskController(Element taskControllerElement) {
    TaskController taskController = new TaskController();

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

    } else {
      List variableAccesses = readVariableAccesses(taskControllerElement);
      taskController.setVariableAccesses(variableAccesses);
View Full Code Here

Examples of org.jbpm.instantiation.Delegation

    HashMap<Mapping, Object> getVariablesMapFromMessage(final Node node, final Message esbMessage) throws CallbackException
    {
        final Action jbpmAction = node.getAction();
        if (jbpmAction != null && esbMessage != null)
        {
            final Delegation actionDelegation = jbpmAction.getActionDelegation();
            if (actionDelegation != null)
            {
                final Object delegate = actionDelegation.getInstance();
                if (delegate instanceof EsbActionHandler)
                {
                    final EsbActionHandler handler = (EsbActionHandler)delegate;
                    final DefaultElement esbToBpmVars = handler.esbToBpmVars;
                    if (esbToBpmVars != null)
View Full Code Here

Examples of org.jbpm.instantiation.Delegation

       
        if (logger.isDebugEnabled())
        {
            logger.debug("Creating Callback action for process definition: " + processDefinition.getName() + ", id: " + processDefinition.getId()) ;
        }
        final Delegation delegation = new Delegation(AsyncSignalAction.class.getName()) ;
        delegation.setConfigType("constructor") ;
        final Action newAction = new Action(delegation) ;
        newAction.setName(ESB_ASYNC_SIGNAL_ACTION_NAME) ;
        processDefinition.addAction(newAction) ;
       
        return newAction ;
View Full Code Here

Examples of org.jbpm.instantiation.Delegation

        for (Node node : nodes) {

            Action action = node.getAction();
            if (action != null) {

                Delegation delegation = action.getActionDelegation();
                String configProps = delegation.getConfiguration();
                String actionHandlerClassName = delegation.getClassName();
                FieldInstantiator instantiator = new FieldInstantiator();

                BaseHandler handler = (BaseHandler) instantiator.instantiate(Class.forName(actionHandlerClassName),
                    configProps);
                handler.setPropertyDefaults();
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

    String template = element.attributeValue("template");
    String actors = element.attributeValue("actors");
    String to = element.attributeValue("to");
    String subject = jpdlReader.getProperty("subject", element);
    String text = jpdlReader.getProperty("text", element);
    Delegation delegation = jpdlReader.createMailDelegation(template, actors, to, subject, text);
    this.action = new Action(delegation);
  }
View Full Code Here

Examples of org.jbpm.instantiation.Delegation

            ) {
            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)
View Full Code Here

Examples of org.jbpm.instantiation.Delegation

         ) {
        task.setActorIdExpression(assignmentElement.attributeValue("actor-id"));
        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 warn him/her.
      addWarning("warning: 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);
      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.read(assignmentElement, this);
      }
    }
    return assignmentDelegation;
  }
View Full Code Here

Examples of org.jbpm.instantiation.Delegation

  protected TaskController readTaskController(Element taskControllerElement) {
    TaskController taskController = new TaskController();

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

    } else {
      List variableAccesses = readVariableAccesses(taskControllerElement);
      taskController.setVariableAccesses(variableAccesses);
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.