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.