Uploaded image for project: 'JBoss Enterprise Application Platform 4 and 5'
  1. JBoss Enterprise Application Platform 4 and 5
  2. JBPAPP-3334

wrong use of input parameter in JbpmELResolver

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: EAP 5.0.0
    • Fix Version/s: EAP 5.0.1.CR1
    • Component/s: Seam
    • Labels:
      None
    • Affects:
      Release Notes

      Description

      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.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  manaRH Marek Novotny
                  Reporter:
                  manaRH Marek Novotny
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  0 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: