Search code examples
javaspringspring-bootalfrescoactiviti

Unknown method used in expression in activiti 6


After the migration from activiti 5 to 6 I have this error when init the app:

Caused by: org.activiti5.engine.ActivitiException: Unknown method used in expression: #{elCorService.makePlat(corWorkflowService.buildContext(execution))}
    at org.activiti5.engine.impl.el.JuelExpression.getValue(JuelExpression.java:56)
    at org.activiti5.engine.impl.bpmn.behavior.ServiceTaskExpressionActivityBehavior.execute(ServiceTaskExpressionActivityBehavior.java:71)
    ... 199 more

... Caused by: javax.el.MethodNotFoundException: Method not found: class com.sun.proxy.$Proxy360.buildContext(org.activiti.engine.impl.persistence.entity.ExecutionEntityImpl)

Solution

  • Is it possible you have custom code that's referencing "org.activiti.engine.impl.persistence.entity.ExecutionEntity" instead of "org.activiti.engine.impl.persistence.entity.ExecutionEntityImpl"? Specifically "corWorkflowService.buildContext()".

    This is a documented change between 5 and 6: https://www.activiti.org/migration

    5.7. EntityManagers
    
    In Activiti version 5, all EntityManager (responsible for persistence but also certain 
    logic) classes did not have an interface. In version 6, all EntityManager classes have 
    been renamed to have Impl as suffix and an interface without the suffix. This 
    effectively means that the version 5 EntityManager class name is now the name of the 
    corresponding interface.
    
    All EntityManager interfaces extend the generic 
    org.activiti.engine.impl.persistence.entity.EntityManager interface. All 
    implementation classes extend a generic AbstractEntityManager interface.
    
    Also, for consistency: * The UserIdentityManager interface has been renamed to 
    UserEntityManager * The GroupIdentityManager interface has been renamed to 
    GroupEntityManager