[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-3703) bug in JbpmElResolver

Gergely Nagy (JIRA) jira-events at lists.jboss.org
Fri Nov 14 09:59:36 EST 2008


bug in JbpmElResolver
---------------------

                 Key: JBSEAM-3703
                 URL: https://jira.jboss.org/jira/browse/JBSEAM-3703
             Project: Seam
          Issue Type: Bug
          Components: BPM
            Reporter: Gergely Nagy


I could not pass a jbpm context variable to a seam component. I'm using seam 2.0.2.SP1, but the same code is still present in trunk. I tracked down the bug to the following method in class org.jboss.seam.bpm.JbpmELResolver

   public Object getValue(ELContext context, Object base, Object property) 
   {
      if ( base==null && property!=null )
      {
         return resolver.resolveVariable( (String) base );
      }
      else
      {
         return null;
      }
   }

note that base is passed into resolveVariable instead of property. I think it should be property. also, the isResolved property of ELContext is not set to true.

If i manually set these two values in a debugging session, the code worked as expected.

Proposed fix:

   public Object getValue(ELContext context, Object base, Object property) 
   {
      if ( base==null && property!=null )
      {
         context.setPropertyResolved(true);
         return resolver.resolveVariable( (String) property );
      }
      else
      {
         return null;
      }
   }

A bit more context:

I had this in my workflow description:

	<task-node name="importanttask">
		<task name="justdoit">
			<assignment pooled-actors="#seamcomponent.getActor(taskInstance)}"/>
		</task>
		<transition to="nextstep" name="donext"/>
	</task-node>

Without the above fix, the getActor() method on seamcomponent is called with null, with the fix i get passed in the actual task instance.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the seam-issues mailing list