AnsweredAssumed Answered

Activiti Spring bean and overloaded method error.

Question asked by unsavory on Jul 27, 2011
Latest reply on Jun 15, 2015 by vasile.dirla
I have the following Spring bean methods:
/**
    * Whether or not to auto-reject this applicant based on the
    * AutoRejectConfigItem rules configured in the system.
    *
    * @param user - The user to check.
    * @return - Whether or not to auto-reject.
    */
   public boolean isUserAutoRejectCandidate(User user);
   
   /**
    * Whether or not to auto-reject this applicant based on the
    * AutoRejectConfigItem rules configured in the system.
    *
    * @param email - The email address of the {@link seah.model.User} to check.
    * @return - true/false
    * @throws AppException - If the user cannot be found.
    */
   public boolean isUserAutoRejectCandidate(String email) throws AppException;

I'm calling one of them like this:
<conditionExpression xsi:type="tFormalExpression">${ userService.isUserAutoRejectCandidate(email) }</conditionExpression>

But I get the following exception:
Caused by: org.activiti.engine.impl.javax.el.ELException: Cannot coerce from class java.lang.String to class seah.model.profile.User
   at org.activiti.engine.impl.juel.TypeConverterImpl.coerceStringToType(TypeConverterImpl.java:287)
   at org.activiti.engine.impl.juel.TypeConverterImpl.coerceToType(TypeConverterImpl.java:348)
   at org.activiti.engine.impl.juel.TypeConverterImpl.convert(TypeConverterImpl.java:365)
   at org.activiti.engine.impl.juel.ExpressionFactoryImpl.coerceToType(ExpressionFactoryImpl.java:418)
   at org.activiti.engine.impl.javax.el.BeanELResolver.coerceValue(BeanELResolver.java:582)
   at org.activiti.engine.impl.javax.el.BeanELResolver.coerceParams(BeanELResolver.java:574)
   at org.activiti.engine.impl.javax.el.BeanELResolver.invoke(BeanELResolver.java:479)
   at org.activiti.engine.impl.javax.el.CompositeELResolver.invoke(CompositeELResolver.java:397)
   at org.activiti.engine.impl.juel.AstMethod.invoke(AstMethod.java:91)
   at org.activiti.engine.impl.juel.AstMethod.eval(AstMethod.java:75)
   at org.activiti.engine.impl.juel.AstEval.eval(AstEval.java:50)
   at org.activiti.engine.impl.juel.AstNode.getValue(AstNode.java:26)
   at org.activiti.engine.impl.juel.TreeValueExpression.getValue(TreeValueExpression.java:114)
   at org.activiti.engine.impl.el.JuelExpression.getValue(JuelExpression.java:46)
   … 166 more

This seems like an issue with the reflection implementation in Activiti.

Outcomes