Uploaded image for project: 'WINDUP - Red Hat Application Migration Toolkit'
  1. WINDUP - Red Hat Application Migration Toolkit
  2. WINDUP-1057

Composite conditions (not, and, or) need to pass the name of the payload variable to its nested conditions

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Critical
    • 2.6.0.Final
    • 2.5.0.Final
    • None
    • None

    Description

      In cases when a GraphCondition (Windup) is wrapped inside of a CompositeCondition (Rewrite),

                  <when>
                      <xmlfile matches="//*[local-name()='jboss-app']" in="jboss-app.xml"/>
                  </when>
                  <perform>
                      <iteration>
                          <when>
                              <not>
                                  <xmlfile public-id="JBoss.+DTD Java EE.+5"/>
                              </not>
                          </when>
      

      the nested GraphCondition doesn't get the payload variable name:

      Iteration.perform @ 253:

                      if (condition != null)
                      {
                          // automatically set the input variable to point to the current payload
                          if (condition instanceof GraphCondition)
                          {
                              ((GraphCondition) condition).setInputVariablesName(getPayloadVariableName(event, context));
                          }
                          conditionResult = condition.evaluate(event, context);
      

      We need to pass this "manually" to the nested conditions.

      Attachments

        Issue Links

          Activity

            People

              ozizka_jira Ondrej Zizka (Inactive)
              ozizka_jira Ondrej Zizka (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: