Skip to content

Improve modelling of conditions in Metamorph #151

@cboehme

Description

@cboehme

Currently, conditions can be modelled in Metamorph by adding extra statements to a combine-element which only need to fire but are not included in the output of the combine element. Even not-operations can be modelled using "choose".

However, these constructs are difficult to understand and not very intuitive. We should add language features to Metamorph which allow for more expressive formulation of conditions.

One way this could be implemented would be an if-then-else construct such as:

<if>
   <!-- a single NamedValueReceiver. If it fires the condition is met -->
</if><then>
   <!-- arbitrary collection of collectors and data statements which generate output if the condition is met -->
</then><else>
   <!-- arbitrary collection of collectors and data statements which generate output if the condition is not met -->
</else>

In addition to the if-construct. A set of quantor- and logical-operation collectors should be implemented. Such as that conditions like the following could be written:

<all>
    <data source="x" />
    <not>
        <data source="y" />
    <not>
</all>

What I do not like about the if-then-else-construction is that the whole statement is not held together within a single element. An alternative to the if-then-else could be an only-if-element which can be embedded in other elements (similar to ):

<combine ...>
    <only-if>
         <!-- same condition formulation as above -->
    </only-if>
    <data source=... />
</combine>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions