Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [henshin-dev] Execute rules according to parameter values

Hello Johannes,

you can check for a specific value with an  empty rule. For example if
you want to check whether a paramter "x" is null or not, you create an
empty rule with an attribute condition x == null.
In your case this empty rule would be put as the if-clause of a
ConditionalUnit and the other rule sets in when and else.

Regards,
Enrico

On 08.04.2011 10:38, Johannes Tietje wrote:
> Hello,
>
> I have a transformation unit with a parameter which will be set under
> special circumstances by some (but not all) the contained rules---which
> means, that after the transformation unit has been executed, the
> parameter could be "null" or not. (Am I right?)
>
> Later, I want to execute one set of rules if this parameter is "null"
> and another set, if not---is this possible through a condition unit
> checking the parameter value?
>
> If this causes too much trouble, another solution could be a kind of
> "default" value for a parameter, so that if no rule changes the
> parameter it has at least its previously set default value.
>
> Regards,
> Johannes
>
> _______________________________________________
> henshin-dev mailing list
> henshin-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/henshin-dev


Back to the top