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

AbstractIterationOperation's variable is not obeyed by hidden Iteration.over()

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • Undefined
    • None
    • 2.4.0.CR2
    • None
    • None

    Description

      This doesn't work:

      .when(
      Query.(...).as("a"), Query.(...).as("b"),
      )
      .perform(
      new AbstractIterationOperation("b")

      { ... }

      ,
      IterationProgress.monitoring("Deleted archive unzip directory", 1),
      Commit.every(1)
      )

      That's because there's a hidden Iteration.over() which expects exactly one variable on the top of the stack, see Iteration#getPayloadVariableName()
      It needs this:

      .perform(
      Iteration.over("b").perform(
      DeleteWorkDirsOperation.delete(),
      IterationProgress.monitoring("Deleted archive unzip directory", 1),
      Commit.every(1)
      ).endIteration()
      )

      If it would be easy to make it work without explicitely creating the Iteration, it would make Java rules easier to write.
      The Iteration could look into the operations to perform, and if the first one is AbstractIterationOperation with variable name set, it could use that one.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: