Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [henshin-dev] Problem in simple rule

Hi Javier,

if you set it to "Ignore", it should actually be applicable.

To translate all processes at once, you can change the rule in the following way: change all <<preserve>> actions to <<preserve*>>, and all <<create>> to <<create*>> (note the star). In the wizard, you can again ignore the procName parameter.

If you still cannot apply the rule using "Ignore", you can send us your example and we can check whether there problem is.

Cheers,
Christian 


2014-04-13 16:26 GMT+02:00 Javier Scayola <javier.scayola@xxxxxxxxx>:
Hi Christian,

Thank you very much for the quick response.

I tried that and now I can assign a value to the procName parameter and it works fine for one Process. 
For example if I assign a value to the parameter (shown in attachment ParameterSet.png) the result is what I would expect for one Process (as shown in ParameterSetResult.png).

But, what I need is the rule to create a class for each Process, that should be 3 classes, each with its corresponding name. So, in order to do that, I tried assigning "Ignore" to the parameter. But the result is again "The transformation could not be applied to the given model". 

Is there any value I can assign to the parameter to produce the behavior I expect?

Cheers,
Javier



On Sun, Apr 13, 2014 at 10:55 AM, Christian Krause <henshin.ck@xxxxxxxxx> wrote:
One more remark: you can also take a look at the bank example to see how parameters can be used:


Cheers,
Christian


2014-04-13 15:53 GMT+02:00 Christian Krause <henshin.ck@xxxxxxxxx>:

Hi Javier,

the problem here is that you are using a variable called "procName" which you haven't declared. The way to do it would be to add a parameter called "procName" to the rule. In the graphical editor, you can click on the rule name label in the top and change "aaaaa" to either:

aaaaa(procName)

or

aaaaa(procName : EString)

In both cases, a parameter "procName" is declared which the rule can then use to match the process name attribute. This parameter can (but does not have to be) typed, as shown in the second version.

I hope this helps.

Cheers,
Christian


2014-04-13 15:22 GMT+02:00 Javier Scayola <javier.scayola@xxxxxxxxx>:
Hi all,

I'm using henshin to do some basic transformations, but I'm having a problem I hope you can help me with.

I want to transform the model in the attachment ModelToTransform.png, applying the transformation in the attachment RuleToApply.png. But when I try to run the transformation, I receive the error: "The transformation could not be applied to the given model".

What I want to do is a rule to create a Class for each Process, assigning the process name to the created class name. There are 3 Processes in the model, so I expect the transformation to create 3 Classes with its process names.

Could you help me identify the problem?

Thanks in advance.

Regards,
Javier



_______________________________________________
henshin-dev mailing list
henshin-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/henshin-dev




_______________________________________________
henshin-dev mailing list
henshin-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/henshin-dev



_______________________________________________
henshin-dev mailing list
henshin-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/henshin-dev



Back to the top