4 Replies Latest reply on Jul 5, 2006 7:30 AM by kukeltje

    ELParser not working for me

    bentins

      Here is what I'm trying to do:

      I have my own actionhandler. It recieves key-value pairs into a HashMap:

      Here is the configuration;

      <action name="SetUpSearchFolder" class="com.emi.framework.client.workflow.MyActionAssignmentHandler">
       <requestParams>
       <entry>
       <key>someKey1</key>
       <value>true</value>
       </entry>
       <entry>
       <key>someKey2</key>
       <value>#{taskInstance.variables['PathToDocument']}</value>
       </entry>
       </requestParams>
      </action>
      


      As you can see I want to put a runtime variable from the current taskInstance on the executionContext into this Map. I realize that Jbpm does not support this variable expression passing so I've written the code into the actionHandler.

      So in the actionHandler there is code that takes this expression value:
      #{taskInstance.variables['PathToDocument']} and passes it to
      JbpmExpressionEvaluator.evaluate(value, ctx);
      


      Now I expected that this would work, however the ELParser itself returns null even before I get into the JbpmVariableResolver.

      Can anyone think what is wrong with this expression, and why it is not being parsed correctly?

      I have also tried othe formats:

      taskInstance.variables.PathToDocument
      taskInstance.variables[PathToDocument]
      taskInstance.getVariable("PathToDocument") - which should work i know

      any ideas?



        • 1. Re: ELParser not working for me
          kukeltje

           

          "bentins" wrote:

          any ideas?


          Yes, EL does not work within the information you pass to actionhandlers afaik

          • 2. Re: ELParser not working for me
            bentins

            As I said I called the parser from the actionhandler delegate. I got it to work too.

            Had a simple spelling mistake. The proper format was


            
            <action name="SetUpSearchFolder" class="com.emi.framework.client.workflow.MyActionAssignmentHandler">
             <requestParams>
             <entry>
             <key>someKey1</key>
             <value>true</value>
             </entry>
             <entry>
             <key>someKey2</key>
             <value>#{taskInstance.variables[PathToDocument]}</value>
             </entry>
             </requestParams>
            </action>
            


            • 3. Re: ELParser not working for me
              kukeltje

              I'm ashamed of myself. Have to admid I totally mist the second part. Thanks for reporting back.

              • 4. Re: ELParser not working for me
                kukeltje

                Imo it would be a nice generic enhancement if this was basic functionality of the mapping parser. Can you raise a jira issue for this so? Let's see what Tom thinks of this then.