]
Marek Novotny closed JBSEAM-3703.
---------------------------------
Resolution: Done
replaced used base input parameter by property parameter
bug in JbpmElResolver
---------------------
Key: JBSEAM-3703
URL:
https://jira.jboss.org/jira/browse/JBSEAM-3703
Project: Seam
Issue Type: Bug
Components: BPM
Affects Versions: 2.2.0.GA
Reporter: Gergely Nagy
Assignee: Marek Novotny
Fix For: 2.2.1.CR1
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: