Package org.camunda.bpm.engine.impl.el

Examples of org.camunda.bpm.engine.impl.el.ExpressionManager


    // get the caseDefinition...
    CaseDefinitionEntity caseDefinition = (CaseDefinitionEntity) context.getCaseDefinition();
    // ... and taskDefinition to caseDefinition
    caseDefinition.getTaskDefinitions().put(taskDefinition.getKey(), taskDefinition);

    ExpressionManager expressionManager = context.getExpressionManager();
    // create decorator
    TaskDecorator taskDecorator = new TaskDecorator(taskDefinition, expressionManager);

    // set taskDecorator on behavior
    HumanTaskActivityBehavior behavior = (HumanTaskActivityBehavior) activity.getActivityBehavior();
View Full Code Here


      HumanTask definition = getDefinition(element);
      name = definition.getName();
    }

    if (name != null) {
      ExpressionManager expressionManager = context.getExpressionManager();
      Expression nameExpression = expressionManager.createExpression(name);
      taskDefinition.setNameExpression(nameExpression);
    }

  }
View Full Code Here

  protected void initializeTaskDefinitionFormKey(CmmnElement element, TaskDefinition taskDefinition, CmmnHandlerContext context) {
    HumanTask definition = getDefinition(element);

    String formKey = definition.getCamundaFormKey();
    if (formKey != null) {
      ExpressionManager expressionManager = context.getExpressionManager();
      Expression formKeyExpression = expressionManager.createExpression(formKey);
      taskDefinition.setFormKey(formKeyExpression);
    }
  }
View Full Code Here

    } else {
      assignee = definition.getCamundaAssignee();
    }

    if (assignee != null) {
      ExpressionManager expressionManager = context.getExpressionManager();
      Expression assigneeExpression = expressionManager.createExpression(assignee);
      taskDefinition.setAssigneeExpression(assigneeExpression);
    }
  }
View Full Code Here

    }
  }

  protected void initializeTaskDefinitionCandidateUsers(CmmnElement element, TaskDefinition taskDefinition, CmmnHandlerContext context) {
    HumanTask definition = getDefinition(element);
    ExpressionManager expressionManager = context.getExpressionManager();

    List<String> candidateUsers = definition.getCamundaCandidateUsersList();
    for (String candidateUser : candidateUsers) {
      Expression candidateUserExpression = expressionManager.createExpression(candidateUser);
      taskDefinition.addCandidateUserIdExpression(candidateUserExpression);
    }
  }
View Full Code Here

    }
  }

  protected void initializeTaskDefinitionCandidateGroups(CmmnElement element, TaskDefinition taskDefinition, CmmnHandlerContext context) {
    HumanTask definition = getDefinition(element);
    ExpressionManager expressionManager = context.getExpressionManager();

    List<String> candidateGroups = definition.getCamundaCandidateGroupsList();
    for (String candidateGroup : candidateGroups) {
      Expression candidateGroupExpression = expressionManager.createExpression(candidateGroup);
      taskDefinition.addCandidateGroupIdExpression(candidateGroupExpression);
    }
  }
View Full Code Here

  protected void initializeTaskDefinitionDueDate(CmmnElement element, TaskDefinition taskDefinition, CmmnHandlerContext context) {
    HumanTask definition = getDefinition(element);

    String dueDate = definition.getCamundaDueDate();
    if (dueDate != null) {
      ExpressionManager expressionManager = context.getExpressionManager();
      Expression dueDateExpression = expressionManager.createExpression(dueDate);
      taskDefinition.setDueDateExpression(dueDateExpression);
    }
  }
View Full Code Here

  protected void initializeTaskDefinitionPriority(CmmnElement element, TaskDefinition taskDefinition, CmmnHandlerContext context) {
    HumanTask definition = getDefinition(element);

    String priority = definition.getCamundaPriority();
    if (priority != null) {
      ExpressionManager expressionManager = context.getExpressionManager();
      Expression priorityExpression = expressionManager.createExpression(priority);
      taskDefinition.setPriorityExpression(priorityExpression);
    }
  }
View Full Code Here

  }

  protected void initializeTaskDescription(CmmnElement element, TaskDefinition taskDefinition, CmmnHandlerContext context) {
    String description = getDesciption(element);
    if (description != null && ! description.isEmpty()) {
      ExpressionManager expressionManager = context.getExpressionManager();
      Expression descriptionExpression = expressionManager.createExpression(description);
      taskDefinition.setDescriptionExpression(descriptionExpression);
    }
  }
View Full Code Here

  protected TaskListener initializeTaskListener(CmmnElement element, CmmnActivity activity, CmmnHandlerContext context, CamundaTaskListener listener) {
    Collection<CamundaField> fields = listener.getCamundaFields();
    List<FieldDeclaration> fieldDeclarations = initializeFieldDeclarations(element, activity, context, fields);

    ExpressionManager expressionManager = context.getExpressionManager();

    TaskListener taskListener = null;

    String className = listener.getCamundaClass();
    String expression = listener.getCamundaExpression();
    String delegateExpression = listener.getCamundaDelegateExpression();
    CamundaScript scriptElement = listener.getCamundaScript();

    if (className != null) {
      taskListener = new ClassDelegateTaskListener(className, fieldDeclarations);

    } else if (expression != null) {
      Expression expressionExp = expressionManager.createExpression(expression);
      taskListener = new ExpressionTaskListener(expressionExp);

    } else if (delegateExpression != null) {
      Expression delegateExp = expressionManager.createExpression(delegateExpression);
      taskListener = new DelegateExpressionTaskListener(delegateExp, fieldDeclarations);

    } else if (scriptElement != null) {
      ExecutableScript executableScript = initializeScript(element, activity, context, scriptElement);
      if (executableScript != null) {
View Full Code Here

TOP

Related Classes of org.camunda.bpm.engine.impl.el.ExpressionManager

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.