Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [henshin-user] Rule application via GUI ->OK, via API -> error

OK,
I think I have figured it out.

This may not be a bug in the first place but the effects that arise by this behaviour of Henshin are strange enough so that I will write this down:

For convenience reasons, I had two copies of the same UML profile file at two different places. One in the project I store my Henshin modules in, and a copy of the profile in another project containing my UML models. Let me clarify that the two copies are identical.

The UML models refer to the profile-copy in the models-project, the Henshin modules refer to the profile-copy in the Henshin-project respectively.

Apparently this works fine as long as one does not try to *delete* stereotype instances via the Henshin API and only via the API.

Concerning creating stereotypes via API and also creating/deleting stereotypes using the GUI, this constellation works fine.

As I have created a test environment anyway, I provide it so that you can have a look at it. I provide a testmodel.uml which refers to the same profile-file as the Henshin module. The testmodel_error.uml refers to a copy of the profile provided in another subdirectory.

Jens

Am 27.10.2015 um 15:47 schrieb Christian Krause:
Hi Jens,

my first guess would have been the checkDangling flag, but you've ruled
that our already. Still, we recently fixed a bug in the context of the
dangling condition that could be a problem in your scenario too. The
problem was that *derived* dangling edges should be ignored. This was
fixed here: https://git.eclipse.org/r/#/c/56243/

You could check whether this fixes also your problem (the fix is merged
to the master branch). If it does not help, you could send us a minimal
runnable example (Input model + Java code). Then we can try to debug it.
Also: you can try to find matches of the rule first, e.g. with
InterpreterUtil.findAllMatches() and print them.

Cheers,
Christian


2015-10-22 12:16 GMT+02:00 Jens Bürger <buerger@xxxxxxxxxxxxxx
<mailto:buerger@xxxxxxxxxxxxxx>>:

    Hello everyone,

    I want to do manipulations of UML state machines using UML stereotypes.

    I actually have a problem: a given transformation rule runs fine if
    I apply it using the GUI (right-click on the transformation file
    with "Henshin->Apply Transformation", but if I apply the rule using
    the Henshin API, it fails (the execute method of RuleApplication
    returns false).

    My test UML model features a state machine which also has a
    transition called "hier" and the stereotype "ensureRole" attached,
    as requested.

    My code works fine with other transformation models. The error only
    occurs when *deleting* the stereotype. I just need to change the
    action to *create* and the rule instantly can be executed without
    errors.

    I created a fresh Henshin transformation model (see attachement).
    The problem persists. Setting checkDangling to false makes no
    difference either.



    Any suggestions?

    Jens
    --
    Dipl.-Inf Jens Bürger
    University of Koblenz-Landau
    Institute for Software Technology
    RG Prof. Dr. Jan Jürjens

    Phone: +49 261 287-2705 <tel:%2B49%20261%20287-2705>
    Fax: +49 261 287-100 2705 <tel:%2B49%20261%20287-100%202705>


    _______________________________________________
    henshin-user mailing list
    henshin-user@xxxxxxxxxxx <mailto:henshin-user@xxxxxxxxxxx>
    To change your delivery options, retrieve your password, or
    unsubscribe from this list, visit
    https://dev.eclipse.org/mailman/listinfo/henshin-user




_______________________________________________
henshin-user mailing list
henshin-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/henshin-user



--
Dipl.-Inf Jens Bürger
University of Koblenz-Landau
Institute for Software Technology
RG Prof. Dr. Jan Jürjens

Phone: +49 261 287-2705
Fax:   +49 261 287-100 2705

Attachment: henshinerror.zip
Description: Zip archive


Back to the top