protected static ExpressionManager getExpressionManager() { return Context.getProcessEngineConfiguration().getExpressionManager(); }
protected static ExpressionManager getExpressionManager() { return Context.getProcessEngineConfiguration().getExpressionManager(); }
protected void registerFunctionMapper(ProcessEngineConfigurationImpl processEngineConfiguration) { processEngineConfiguration.getExpressionManager().addFunctionMapper(new SpinFunctionMapper()); }
protected void initializeExpressionManager() { if (processEngineConfiguration.getExpressionManager() == null && applicationContext != null) { processEngineConfiguration.setExpressionManager( new SpringExpressionManager(applicationContext, processEngineConfiguration.getBeans())); } }
.getExpressionManager() .createExpression(expression) .getValue(null);
.getExpressionManager() .createExpression(expression) .getValue(null);
public void parseConfiguration(Element activityElement, DeploymentEntity deployment, ProcessDefinitionEntity processDefinition, BpmnParse bpmnParse) { this.deploymentId = deployment.getId(); ExpressionManager expressionManager = Context .getProcessEngineConfiguration() .getExpressionManager(); Element extensionElement = activityElement.element("extensionElements"); if (extensionElement != null) { // provide support for deprecated form properties parseFormProperties(bpmnParse, expressionManager, extensionElement); // provide support for new form field metadata parseFormData(bpmnParse, expressionManager, extensionElement); } }
public Object getValue(VariableContext variableContext) { if(Context.getCommandContext() == null) { throw new ProcessEngineException("Expression can only be evaluated inside the context of the process engine"); } ELContext context = Context.getProcessEngineConfiguration() .getExpressionManager() .createElContext(variableContext); return valueExpression.getValue(context); }
public Object getValue(VariableContext variableContext) { if(Context.getCommandContext() == null) { throw new ProcessEngineException("Expression can only be evaluated inside the context of the process engine"); } ELContext context = Context.getProcessEngineConfiguration() .getExpressionManager() .createElContext(variableContext); return valueExpression.getValue(context); }
public void parseConfiguration(Element activityElement, DeploymentEntity deployment, ProcessDefinitionEntity processDefinition, BpmnParse bpmnParse) { this.deploymentId = deployment.getId(); ExpressionManager expressionManager = Context .getProcessEngineConfiguration() .getExpressionManager(); Element extensionElement = activityElement.element("extensionElements"); if (extensionElement != null) { // provide support for deprecated form properties parseFormProperties(bpmnParse, expressionManager, extensionElement); // provide support for new form field metadata parseFormData(bpmnParse, expressionManager, extensionElement); } }
@Override public void parseConfiguration(Element activityElement, DeploymentEntity deployment, ProcessDefinitionEntity processDefinition, BpmnParse bpmnParse) { super.parseConfiguration(activityElement, deployment, processDefinition, bpmnParse); ExpressionManager expressionManager = Context .getProcessEngineConfiguration() .getExpressionManager(); String formKeyAttribute = activityElement.attributeNS(BpmnParse.CAMUNDA_BPMN_EXTENSIONS_NS, "formKey"); if (formKeyAttribute != null) { this.formKey = expressionManager.createExpression(formKeyAttribute); } if (formKey != null) { processDefinition.setStartFormKey(true); } }
@Override public void parseConfiguration(Element activityElement, DeploymentEntity deployment, ProcessDefinitionEntity processDefinition, BpmnParse bpmnParse) { super.parseConfiguration(activityElement, deployment, processDefinition, bpmnParse); ExpressionManager expressionManager = Context .getProcessEngineConfiguration() .getExpressionManager(); String formKeyAttribute = activityElement.attributeNS(BpmnParse.CAMUNDA_BPMN_EXTENSIONS_NS, "formKey"); if (formKeyAttribute != null) { this.formKey = expressionManager.createExpression(formKeyAttribute); } if (formKey != null) { processDefinition.setStartFormKey(true); } }
ExpressionManager expressionManager = Context.getProcessEngineConfiguration().getExpressionManager(); Expression expression = expressionManager.createExpression(retryIntervals); return new FailedJobRetryConfiguration(expression);
ExpressionManager expressionManager = Context.getProcessEngineConfiguration().getExpressionManager(); Expression expression = expressionManager.createExpression(retryIntervals); return new FailedJobRetryConfiguration(expression);
public void setUp() { task = (TaskEntity) taskService.newTask(); taskService.saveTask(task); expressionManager = processEngineConfiguration .getExpressionManager(); taskDefinition = new TaskDefinition(null); taskDecorator = new TaskDecorator(taskDefinition, expressionManager); }
@Test public void testBuiltinFunctionMapperRegistration() { // given a process engine configuration with a custom function mapper ProcessEngineConfigurationImpl config = (ProcessEngineConfigurationImpl) ProcessEngineConfiguration.createStandaloneInMemProcessEngineConfiguration() .setJdbcUrl("jdbc:h2:mem:camunda" + getClass().getSimpleName()); CustomExpressionManager customExpressionManager = new CustomExpressionManager(); Assert.assertTrue(customExpressionManager.getFunctionMappers().isEmpty()); config.setExpressionManager(customExpressionManager); // when the engine is initialized engine = config.buildProcessEngine(); // then two default function mappers should be registered Assert.assertSame(customExpressionManager, config.getExpressionManager()); Assert.assertEquals(2, customExpressionManager.getFunctionMappers().size()); boolean commandContextMapperFound = false; boolean dateTimeMapperFound = false; for (FunctionMapper functionMapper : customExpressionManager.getFunctionMappers()) { if (functionMapper instanceof CommandContextFunctionMapper) { commandContextMapperFound = true; } if (functionMapper instanceof DateTimeFunctionMapper) { dateTimeMapperFound = true; } } Assert.assertTrue(commandContextMapperFound && dateTimeMapperFound); }
private static ExpressionManager getExpressionManager(ProcessEngineConfigurationImpl processEngineConfigurationImpl) { ExpressionManager em = processEngineConfigurationImpl.getExpressionManager(); em.addFunctionMapper(new FunctionMapper() { @Override public Method resolveFunction(String prefix, String localName) { if (currentEvaluationWrapperClass == null || !"g".equals(prefix)) return null; return Arrays.stream(currentEvaluationWrapperClass.getMethods()).filter(m -> localName.equals(m.getName())).findFirst().orElse(null); } }); return em; }
public Object getValue(VariableContext variableContext) { if(Context.getCommandContext() == null) { throw new ProcessEngineException("Expression can only be evaluated inside the context of the process engine"); } ELContext context = Context.getProcessEngineConfiguration() .getExpressionManager() .createElContext(variableContext); return valueExpression.getValue(context); }
public void parseConfiguration(Element activityElement, DeploymentEntity deployment, ProcessDefinitionEntity processDefinition, BpmnParse bpmnParse) { this.deploymentId = deployment.getId(); ExpressionManager expressionManager = Context .getProcessEngineConfiguration() .getExpressionManager(); Element extensionElement = activityElement.element("extensionElements"); if (extensionElement != null) { // provide support for deprecated form properties parseFormProperties(bpmnParse, expressionManager, extensionElement); // provide support for new form field metadata parseFormData(bpmnParse, expressionManager, extensionElement); } }
public void setUp() { task = (TaskEntity) taskService.newTask(); taskService.saveTask(task); expressionManager = processEngineConfiguration .getExpressionManager(); taskDefinition = new TaskDefinition(null); taskDecorator = new TaskDecorator(taskDefinition, expressionManager); }