Multi Instance loop using collection-Cannot resolve identifier 'com'

1,933 views
Skip to first unread message

Gopan Sugathan

unread,
Mar 20, 2014, 9:17:54 AM3/20/14
to camunda-...@googlegroups.com
Hi,

I am trying to model multi instance loop to assign user tasks in parallel using the following example in documentation

<userTask id="miTasks" name="My Task" camunda:assignee="${assignee}">
  <multiInstanceLoopCharacteristics isSequential="true"
     camunda:collection="${myService.resolveUsersForTask()}" camunda:elementVariable="assignee" >
  </multiInstanceLoopCharacteristics>
</userTask>

The bpmn generated looks like this  <bpmn2:userTask id="UserTask_1" camunda:assignee="$assignee" camunda:formKey="embedded:app:forms/approve-loan.html" name="Approve Loan">
      <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
      <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>
      <bpmn2:multiInstanceLoopCharacteristics camunda:elementVariable="assignee" camunda:collection="${com.camunda.user.assignment.UserAssignement.getLabTechnicians()}"/>
    </bpmn2:userTask>

When I try to execute this I am getting the following error 
Caused by: org.camunda.bpm.engine.impl.javax.el.PropertyNotFoundException: Cannot resolve identifier 'com'
at org.camunda.bpm.engine.impl.juel.AstIdentifier.eval(AstIdentifier.java:83)
at org.camunda.bpm.engine.impl.juel.AstProperty.eval(AstProperty.java:52)
at org.camunda.bpm.engine.impl.juel.AstProperty.eval(AstProperty.java:52)
at org.camunda.bpm.engine.impl.juel.AstProperty.eval(AstProperty.java:52)
at org.camunda.bpm.engine.impl.juel.AstProperty.eval(AstProperty.java:52)
at org.camunda.bpm.engine.impl.juel.AstMethod.invoke(AstMethod.java:79)
at org.camunda.bpm.engine.impl.juel.AstMethod.eval(AstMethod.java:75)
at org.camunda.bpm.engine.impl.juel.AstEval.eval(AstEval.java:50)
at org.camunda.bpm.engine.impl.juel.AstNode.getValue(AstNode.java:26)
at org.camunda.bpm.engine.impl.juel.TreeValueExpression.getValue(TreeValueExpression.java:114)
at org.camunda.bpm.engine.impl.delegate.ExpressionGetInvocation.invoke(ExpressionGetInvocation.java:33)
at org.camunda.bpm.engine.impl.delegate.DelegateInvocation.proceed(DelegateInvocation.java:39)
at org.camunda.bpm.engine.impl.delegate.DefaultDelegateInterceptor.handleInvocation(DefaultDelegateInterceptor.java:42)
at org.camunda.bpm.engine.impl.el.JuelExpression.getValue(JuelExpression.java:50)



The java class I have defined looks like this 

public class UserAssignement {
public static Collection<String> getLabTechnicians()  {
List<String> users = new ArrayList<String>();
users.add("john");
users.add("mary");
users.add("peter");
return users;
}

Is there something that I am doing wrong

Kind regards,
Gopan

hassan....@gmail.com

unread,
Mar 22, 2014, 11:47:17 PM3/22/14
to camunda-...@googlegroups.com
Hi Gopan,

You can't resolve a class. You can either resolve a spring bean or a cdi bean
Please review the below expression resolving sections of User Guide

-Resolving spring bean
http://docs.camunda.org/latest/guides/user-guide/#spring-framework-integration-expression-resolving

-Resolving cdi bean
http://docs.camunda.org/latest/guides/user-guide/#cdi-and-java-ee-integration-expression-resolving

or you can assign a process variable of type Collection as below
camunda:collection="assigneeList"

Gopan Sugathan

unread,
Mar 24, 2014, 3:39:22 AM3/24/14
to camunda-...@googlegroups.com, hassan....@gmail.com
Thank You very much the one with collection worked for me 
Reply all
Reply to author
Forward
0 new messages