[jboss-user] [JBoss Seam] - How to use a Seam component in swimlane assignment

chawax do-not-reply at jboss.com
Tue Dec 4 06:00:41 EST 2007


My application uses a JBPM business process and I need to assign tasks on runtime. To do this I made a Seam component and I call it in the swimlane assignment expression.

To be more precise, the task is defined as following :

<task-node name="validation">
  |     <task swimlane="valideurs"></task>
  |     <transition to="acceptation" name="ok"></transition>
  |     <transition to="refus" name="nok"></transition>
  | </task-node>

And the swimlane is defined as following :

<swimlane name="valideurs">
  |     <assignment expression="#{assignmentHandler.assignByRole('USAGE')}"></assignment>
  | </swimlane>

The assignByRole method of my assignmentHandler component returns String[] (not sure it is correct, but I could not find any example).

But when I create a process instance, I have the following error :

11:55:04,241 ERROR [STDERR] Caused by: org.jbpm.identity.assignment.ExpressionAssignmentException: couldn't resolve assignment expression '#{assignmentHandler.assignByRole('USAGE')}'
  | 11:55:04,241 ERROR [STDERR] 	at org.jbpm.identity.assignment.ExpressionAssignmentHandler.assign(ExpressionAssignmentHandler.java:97)
  | 11:55:04,241 ERROR [STDERR] 	at org.jboss.seam.bpm.SeamUserCodeInterceptor$2.process(SeamUserCodeInterceptor.java:102)
  | 11:55:04,241 ERROR [STDERR] 	at org.jboss.seam.bpm.SeamUserCodeInterceptor$ContextualCall.run(SeamUserCodeInterceptor.java:33)
  | 11:55:04,241 ERROR [STDERR] 	at org.jboss.seam.bpm.SeamUserCodeInterceptor.executeAssignment(SeamUserCodeInterceptor.java:96)
  | 11:55:04,241 ERROR [STDERR] 	at org.jbpm.taskmgmt.exe.TaskMgmtInstance.performAssignmentDelegation(TaskMgmtInstance.java:226)
  | 11:55:04,241 ERROR [STDERR] 	at org.jbpm.taskmgmt.exe.TaskMgmtInstance.performAssignment(TaskMgmtInstance.java:201)
  | 11:55:04,241 ERROR [STDERR] 	... 171 more
  | 11:55:04,241 ERROR [STDERR] Caused by: org.jbpm.identity.assignment.ExpressionAssignmentException: couldn't interpret first term in expression '#{assignmentHandler.assignByRole('USAGE')}'
  | 11:55:04,241 ERROR [STDERR] 	at org.jbpm.identity.assignment.ExpressionAssignmentHandler.resolveFirstTerm(ExpressionAssignmentHandler.java:155)
  | 11:55:04,241 ERROR [STDERR] 	at org.jbpm.identity.assignment.ExpressionAssignmentHandler.assign(ExpressionAssignmentHandler.java:75)
  | 11:55:04,241 ERROR [STDERR] 	... 176 more

So it looks like you can not use EL expressions in swimlane assignment ... Anyone has an idea how I should do this ?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4110136#4110136

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4110136

More information about the jboss-user mailing list