ObeoNetwork / InformationSystem

Un outil open-source complet pour décrire visuellement les applications de votre système d’information.
https://www.isdesigner.org/
Eclipse Public License 2.0
65 stars 61 forks source link

Can not create Entity in SOA model with ATL #97

Open bodabela opened 1 year ago

bodabela commented 1 year ago

Hi,

I want to create an Entity instance in the target SOA model with eclipse ATL (latest). I get the following error: org.eclipse.m2m.atl.engine.emfvm.VMException: Unable to create org.eclipse.emf.ecore.impl.EClassImpl@3c3d7571 (name: Entity) (instanceClassName: null) (abstract: false, interface: false) in model OUTSOA

I kind of understand that the soa meta model does not reference the entity metamodel. I guess I also understand that the issue might be that during the creation of a soa model with ATL the entity metamodel does not get referenced (imported). I am not sure though if that is the actual issue...

May question is if there is a way to overcome this issue and make the ATL able to create Entity instance in soa model.

This is the ATL rule:

-- @nsURI FOO=foo-service-meta
-- @nsURI SOA=http://www.obeonetwork.org/dsl/soa/4.0.0
-- @nsURI ENT=http://www.obeonetwork.org/dsl/entity/3.0.0
-- @nsURI ENV=http://www.obeonetwork.org/dsl/environment/3.0.0

module fooservice2is;
create OUTSOA : SOA, OUTENT : ENT from INFOO : FOO;
...
unique lazy rule getFooEntity {
    from
        foo : FOO!Foo in INFOO
    to                  
        theFooEntity : ENT!Entity in OUTSOA  (
            name <- foo.name + 'Entity',
            ownedAttributes <- Sequence {
                thisModule.getFooIdAttribute(foo)
            }
        )
}

Thanks!