Package org.activiti.engine.delegate

Examples of org.activiti.engine.delegate.Expression


                logger.debug("activityId : {}", targetActivity.getId());

                TaskDefinition taskDefinition = processDefinitionEntity
                        .getTaskDefinitions().get(taskDefinitionKey);

                Expression expression = taskDefinition.getAssigneeExpression();

                if (expression != null) {
                    String expressionText = expression.getExpressionText();
                    logger.debug("{}", expressionText);
                    logger.debug("{}", startActivity.getProperties());
                    logger.debug("{}", processDefinitionEntity.getProperties());

                    String initiatorVariableName = (String) processDefinitionEntity
View Full Code Here


    }
  }
 
  protected TimerDeclarationImpl createTimer(BpmnParse bpmnParse, TimerEventDefinition timerEventDefinition, ScopeImpl timerActivity, String jobHandlerType) {
    TimerDeclarationType type = null;
    Expression expression = null;
    ExpressionManager expressionManager = bpmnParse.getExpressionManager();
    if (StringUtils.isNotEmpty(timerEventDefinition.getTimeDate())) {
      // TimeDate
      type = TimerDeclarationType.DATE;
      expression = expressionManager.createExpression(timerEventDefinition.getTimeDate());
View Full Code Here

      SimpleDataInputAssociation dataAssociation = new SimpleDataInputAssociation(
          dataAssociationElement.getSourceRef(), dataAssociationElement.getTargetRef());

      for (org.activiti.bpmn.model.Assignment assigmentElement : dataAssociationElement.getAssignments()) {
        if (StringUtils.isNotEmpty(assigmentElement.getFrom()) && StringUtils.isNotEmpty(assigmentElement.getTo())) {
          Expression from = bpmnParse.getExpressionManager().createExpression(assigmentElement.getFrom());
          Expression to = bpmnParse.getExpressionManager().createExpression(assigmentElement.getTo());
          Assignment assignment = new Assignment(from, to);
          dataAssociation.addAssignment(assignment);
        }
      }
      return dataAssociation;
View Full Code Here

 
  public AbstractDataAssociation createDataOutputAssociation(BpmnParse bpmnParse, DataAssociation dataAssociationElement) {
    if (StringUtils.isNotEmpty(dataAssociationElement.getSourceRef())) {
      return new MessageImplicitDataOutputAssociation(dataAssociationElement.getTargetRef(), dataAssociationElement.getSourceRef());
    } else {
      Expression transformation = bpmnParse.getExpressionManager().createExpression(dataAssociationElement.getTransformation());
      AbstractDataAssociation dataOutputAssociation = new TransformationDataOutputAssociation(null, dataAssociationElement.getTargetRef(), transformation);
      return dataOutputAssociation;
    }
  }
View Full Code Here

      formPropertyHandler.setReadable(formProperty.isReadable());
      formPropertyHandler.setWritable(formProperty.isWriteable());
      formPropertyHandler.setVariableName(formProperty.getVariable());

      if (StringUtils.isNotEmpty(formProperty.getExpression())) {
        Expression expression = expressionManager.createExpression(formProperty.getExpression());
        formPropertyHandler.setVariableExpression(expression);
      }

      if (StringUtils.isNotEmpty(formProperty.getDefaultExpression())) {
        Expression defaultExpression = expressionManager.createExpression(formProperty.getDefaultExpression());
        formPropertyHandler.setDefaultExpression(defaultExpression);
      }

      formPropertyHandlers.add(formPropertyHandler);
    }
View Full Code Here

 
  private void addAuthorizationsFromIterator(Set<Expression> exprSet, ProcessDefinitionEntity processDefinition, ExprType exprType) {
    if (exprSet != null) {
      Iterator<Expression> iterator = exprSet.iterator();
      while (iterator.hasNext()) {
        Expression expr = (Expression) iterator.next();
        IdentityLinkEntity identityLink = new IdentityLinkEntity();
        identityLink.setProcessDef(processDefinition);
        if (exprType.equals(ExprType.USER)) {
           identityLink.setUserId(expr.toString());
        } else if (exprType.equals(ExprType.GROUP)) {
          identityLink.setGroupId(expr.toString());
        }
        identityLink.setType(IdentityLinkType.CANDIDATE);
        identityLink.insert();
      }
    }
View Full Code Here

    StatefulKnowledgeSession ksession = knowledgeBase.newStatefulKnowledgeSession();
   
    if (variablesInputExpressions != null) {
      Iterator<Expression> itVariable = variablesInputExpressions.iterator();
      while (itVariable.hasNext()) {
        Expression variable = itVariable.next();
        ksession.insert(variable.getValue(execution));
      }
    }
   
    if (!rulesExpressions.isEmpty()) {
      RulesAgendaFilter filter = new RulesAgendaFilter();
      Iterator<Expression> itRuleNames = rulesExpressions.iterator();
      while (itRuleNames.hasNext()) {
        Expression ruleName = itRuleNames.next();
        filter.addSuffic(ruleName.getValue(execution).toString());
      }
      filter.setAccept(!exclude);
      ksession.fireAllRules(filter);
     
    } else {
View Full Code Here

  public ClassDelegate createClassDelegateServiceTask(ServiceTask serviceTask) {
    return new ClassDelegate(serviceTask.getImplementation(), createFieldDeclarations(serviceTask.getFieldExtensions()));
  }
 
  public ServiceTaskDelegateExpressionActivityBehavior createServiceTaskDelegateExpressionActivityBehavior(ServiceTask serviceTask) {
    Expression delegateExpression = expressionManager.createExpression(serviceTask.getImplementation());
    return new ServiceTaskDelegateExpressionActivityBehavior(delegateExpression, createFieldDeclarations(serviceTask.getFieldExtensions()));
  }
View Full Code Here

    Expression delegateExpression = expressionManager.createExpression(serviceTask.getImplementation());
    return new ServiceTaskDelegateExpressionActivityBehavior(delegateExpression, createFieldDeclarations(serviceTask.getFieldExtensions()));
  }
 
  public ServiceTaskExpressionActivityBehavior createServiceTaskExpressionActivityBehavior(ServiceTask serviceTask) {
    Expression expression = expressionManager.createExpression(serviceTask.getImplementation());
    return new ServiceTaskExpressionActivityBehavior(expression, serviceTask.getResultVariableName());
  }
View Full Code Here

      callActivityBehaviour = new CallActivityBehavior(callActivity.getCalledElement());
    }

    for (IOParameter ioParameter : callActivity.getInParameters()) {
      if (StringUtils.isNotEmpty(ioParameter.getSourceExpression())) {
        Expression expression = expressionManager.createExpression(ioParameter.getSourceExpression().trim());
        callActivityBehaviour.addDataInputAssociation(new SimpleDataInputAssociation(expression, ioParameter.getTarget()));
      } else {
        callActivityBehaviour.addDataInputAssociation(new SimpleDataInputAssociation(ioParameter.getSource(), ioParameter.getTarget()));
      }
    }
   
    for (IOParameter ioParameter : callActivity.getOutParameters()) {
      if (StringUtils.isNotEmpty(ioParameter.getSourceExpression())) {
        Expression expression = expressionManager.createExpression(ioParameter.getSourceExpression().trim());
        callActivityBehaviour.addDataOutputAssociation(new MessageImplicitDataOutputAssociation(ioParameter.getTarget(), expression));
      } else {
        callActivityBehaviour.addDataOutputAssociation(new MessageImplicitDataOutputAssociation(ioParameter.getTarget(), ioParameter.getSource()));
      }
    }
View Full Code Here

TOP

Related Classes of org.activiti.engine.delegate.Expression

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.