Hello together,
I am currently working with Henshin for model transformations. So far I used Henshin rules where I create a partial match first, set the parameter values and then use "findMatches(...)" method of the engine instance as follows (taken from https://www.eclipse.org/lists/henshin-dev/msg00516.html):
Rule rule = system.findRuleByName("createAccount");
Match partialMatch = new MatchImpl(rule);
partialMatch.setParameterValue(rule.getParameterByName("client"), "Alice");
partialMatch.setParameterValue(rule.getParameterByName("accountId"), 5);
for (Match match : engine.findMatches(rule, graph, partialMatch)) {
System.out.println(match);
}
I am wondering now how I can do the same but on the Henshin unit level? I have a priority unit with subunits and would like to find matches in an automated way that allow for execution of a rule/rules encompassed in my unit. The "findMatches(...)" method only takes rule instances as argument, however. Anyone an idea how to go about this?
Regards and thanks in advance for any suggestions!
[Updated on: Tue, 28 December 2021 08:05] by Moderator