Code Engineering set in a teamwork context

General discussions about code engineering

Moderator: Moderators

Code Engineering set in a teamwork context

Postby etienne_f » Wed Aug 01, 2012 3:51 am

Hello,

I'm using MD 17.0 SP3 either in a standalone context or in a teamwork context.

When I am in a standalone contexte, if I define a "Code Engineering Set" to reverse some Java classes, some properties of the "Code Engineering Set" are stored in the file MyProject.mdr. But I don't find all the properties as the rules for the reverse (only DataTypes are translated in attributes). Where are they stored ?

In the teamwork context, I don't know where the information relating to the "Code Engineering Sets" are stored and especially the rules for the reverse. Could you tell me where they are and if there are accessible ?

Thank you

Best regards

Etienne
etienne_f
Forum Newbie
Forum Newbie
 
Posts: 16
Posts Rating:1
Joined: Fri Aug 19, 2011 8:08 am

Re: Code Engineering set in a teamwork context

Postby egiva » Thu Aug 02, 2012 12:58 am

Hello,

If you mean class field creation property, then it must be in mdr file called "AttributeCreationRule". In teamwork this property is stored in ce.xml file inside the project zip file.
Best Regards,
Egidijus Vaisnora
egiva
Customer Support
Customer Support
 
Posts: 37
Posts Rating:0
Joined: Tue Jan 05, 2010 6:32 am

Re: Code Engineering set in a teamwork context

Postby etienne_f » Thu Aug 02, 2012 5:41 am

Hello Eviga,

Thank you for your answer. I found the ce.xml file in the teamwork repository that contains the rules for the java reverse.

But I don't understand how it works. I'm going to try to explain. Our reality is a little bit more complexe but I simplify.

We are 2 different users with separate Windows accounts. We work on the same teamwork project with the same teamwork user Id (not together of course). We use MD in batch mode. This batch reverses XML files and then defines a "Code engineering Set" with a rule to create attributes only for the XML simpleTypes (relations otherwise). Each time the batch is launched, it deletes the existing "CES" and creates another one. The batch uses the openAPI to create the "CES" but as the rules are not available in the API, the "CES" is created with the current parameters and the rules are not set.

For the first Windows user, the rule persists and not for the second one. Concretely, the reverse is good for the first user with attributes and relations and bad for the second one with only attributes.

I don't understand why. Do you have an idea to explain this situation ?

Thank you

Best regards

Etienne
etienne_f
Forum Newbie
Forum Newbie
 
Posts: 16
Posts Rating:1
Joined: Fri Aug 19, 2011 8:08 am

Re: Code Engineering set in a teamwork context

Postby egiva » Tue Aug 07, 2012 3:17 am

Hello,

*ce.xml* contains data which is shared among user who will open this file. If one user commits changed ce rules then another user after update should see these changes, unless someone commits different ce settings. I see here two possibilities - first user do not commit changes or overwrites CE with another commit, or second user do not update committed data.
Best Regards,
Egidijus Vaisnora
egiva
Customer Support
Customer Support
 
Posts: 37
Posts Rating:0
Joined: Tue Jan 05, 2010 6:32 am

Re: Code Engineering set in a teamwork context

Postby etienne_f » Tue Aug 07, 2012 7:39 am

Hello Egidijus,

Thank you for your answer, it allows us to find the solution concerning our problem. If the rules were not applied in the same way, it is because all the users are using an "Enterprise" version except one of them that he uses a "Standard" version.

In a interactive context, we can see the differences between an "Enterprise" and a "Standard" version, but we use MD in a batch mode and we don't know what kind of version we use. In an interactive context, we can't create a "Code Engineering Set" to gerenate or reverse, but in batch mode there is no problem to create and use a "Code Engineering Set" even if we are using a "Standard" version. There is neither an exception to catch to avoid launching code reverse/generation nor a return value to know if the reverse was performed.

To workaround the problem, we will try to test the version type before launching the reverse operation. But I don't know what operation to call. I thought getFullVersion on ApplicationConstants but it returns only the version and not the kind of version (standard, enterprise, ...). Can you tell me the method to call in the Open API ?

But we will request an evolution of the MD Open API in order that the reverse/generation operations in the class CodeEngineeringManager throw an exception when the licence don't allow the operation.

Best regards

Etienne
etienne_f
Forum Newbie
Forum Newbie
 
Posts: 16
Posts Rating:1
Joined: Fri Aug 19, 2011 8:08 am

Re: Code Engineering set in a teamwork context

Postby egiva » Wed Aug 08, 2012 8:02 am

Hello,

You could try to check if java language is available. RTManager.isLanguageSupported("Java"). It is not open api and could be changed in future.
Best Regards,
Egidijus Vaisnora
egiva
Customer Support
Customer Support
 
Posts: 37
Posts Rating:0
Joined: Tue Jan 05, 2010 6:32 am


Return to Code engineering

Who is online

Users browsing this forum: No registered users and 0 guests