cancel
Showing results for 
Search instead for 
Did you mean: 

Error with EL ExpressManager

caoyongviper
Champ in-the-making
Champ in-the-making
I am developing with activiti 5.10 .

There are some condition sequence in my workflow. The expression on a condition sequence is "${fn:indexOf(testStr, "a")>0}" . It will check whether the variable 'testStr' contains character 'a'. But some exception was thrown when I deploy this workflow.

The exception detail is below:

org.activiti.engine.impl.javax.el.ELException: Expression uses functions, but no function mapper was provided
   at org.activiti.engine.impl.juel.Tree.bind(Tree.java:109)
   at org.activiti.engine.impl.juel.TreeValueExpression.<init>(TreeValueExpression.java:65)
   at org.activiti.engine.impl.juel.ExpressionFactoryImpl.createValueExpression(ExpressionFactoryImpl.java:428)
   at org.activiti.engine.impl.juel.ExpressionFactoryImpl.createValueExpression(ExpressionFactoryImpl.java:73)
   at org.activiti.engine.impl.el.ExpressionManager.createExpression(ExpressionManager.java:65)
   at org.activiti.engine.impl.bpmn.parser.BpmnParse.parseSequenceFlowConditionExpression(BpmnParse.java:4447)
   at org.activiti.engine.impl.bpmn.parser.BpmnParse.parseSequenceFlow(BpmnParse.java:4407)
   at org.activiti.engine.impl.bpmn.parser.BpmnParse.parseScope(BpmnParse.java:759)
   at org.activiti.engine.impl.bpmn.parser.BpmnParse.parseProcess(BpmnParse.java:684)
   at org.activiti.engine.impl.bpmn.parser.BpmnParse.parseProcessDefinitions(BpmnParse.java:599)
   at org.activiti.engine.impl.bpmn.parser.BpmnParse.parseRootElement(BpmnParse.java:280)
   at org.activiti.engine.impl.bpmn.parser.BpmnParse.execute(BpmnParse.java:252)
   at org.activiti.engine.impl.bpmn.deployer.BpmnDeployer.deploy(BpmnDeployer.java:90)
   at org.activiti.engine.impl.persistence.deploy.DeploymentCache.deploy(DeploymentCache.java:38)
   at org.activiti.engine.impl.persistence.entity.DeploymentManager.insertDeployment(DeploymentManager.java:42)
   at org.activiti.engine.impl.cmd.DeployCmd.execute(DeployCmd.java:59)
   at org.activiti.engine.impl.cmd.DeployCmd.execute(DeployCmd.java:31)
   at org.activiti.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:24)
   at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:42)
   at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33)
   at org.activiti.engine.impl.RepositoryServiceImpl.deploy(RepositoryServiceImpl.java:60)
   at org.activiti.engine.impl.repository.DeploymentBuilderImpl.deploy(DeploymentBuilderImpl.java:120)
   at com.smartdot.indiplatform.processengine.services.rest.helper.DeployServlet.doGet(DeployServlet.java:74)
   at com.smartdot.indiplatform.processengine.services.rest.helper.DeployServlet.doPost(DeployServlet.java:81)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
   at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
   at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
   at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
   at java.lang.Thread.run(Thread.java:662)
2013-7-16 9:55:45 org.activiti.engine.impl.bpmn.deployer.BpmnDeployer deploy

It seems that no funciton mapper be mapped. So how can I fix this problem? How can I configure funciton mappers for el expression?

Thanks a lot for some one helping
2 REPLIES 2

frederikherema1
Star Contributor
Star Contributor
Use a custom subclass of org.activiti.engine.impl.el.ExpressionManager (set it on the processEngineConfigurationBean as property "expressionManager") that adds the function-mapper you require to the ELContext/resolvers spawned by this class:

  protected ActivitiElContext createElContext(VariableScope variableScope) {
    // Your magic goos here…
  }

Hello,

I have the same issue. I followed what was described here : https://community.alfresco.com/thread/232467-adding-custom-functions-to-expressionmanager#comment-81... but I have the exception : org.activiti.engine.impl.javax.el.ELException: Expression uses functions, but no function mapper was provided

What kind of magic are you talking about ? 

Thank you for you answer !

Vincent