1 Reply Latest reply on Oct 11, 2007 9:52 AM by David Roberts

    Assignment expressions

    Antonio Soldat Newbie

      I am trying to use the value of a variable to determine the assignment of a task.

      According to the documentation the syntax is as follows:

      <assignment expression='previous --> group(hierarchy) --> member(boss)' />


      In my usage my syntax looks like:

      <assignment expression="variable(WORCostCentre) --> group(Department)"></assignment>


      WORCostCentre is a variable from a previous task which has a String value equal to the name of a Group with a group-type of Department.

      I am using the environment:
      Environment: Eclipse 3.3, EMF: 2.3.1, GEF: 3.3.1, DTP: 1.5, WTP: 2.0, jbpm-jpdl-designer-3.1.0.sp1

      When I complete the task and it follows the transition to the block with the above mentioned assignment expression I get a ExpressionAssignmentException and it states the user does not exist. According to the documentation the variable tag can be used for User or Group objects.

      Is my method incorrect or is this a bug?


        • 1. Re: Assignment expressions
          David Roberts Apprentice

          I have the same problem, using Jbpm 3.2.2.

          If I use the expression:

          <assignment expression="group(MyGroup) --> member(Team Leader)"></assignment>
          It works fine, and is assigned to the actor who is in the group "MyGroup", and has the role in that group of "Team Leader".

          But, if I use:
          <assignment expression="variable(group) --> member(Team Leader)"></assignment>
          It says the user "MyGroup" cannot be found in user db. But the variable "group" I used which has the value "MyGroup", is not a user, it's a group. And the documentation at http://docs.jboss.com/jbpm/v3.2/userguide/html/taskmanagement.html#assignmentexpressions does state:
          "variable(variable-name) means the user or group is taken from the specified variable instance. The variable instance can contain a java.lang.String, in which case that user or group is fetched from the identity component. Or the variable instance contains a User or Group object."

          Anyone know what we are doing wrong?