Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Luc De Graef

Pages: [1]
1
General Board / Recursive Query for Package Tree Contents
« on: July 13, 2011, 09:12:27 pm »
Hello,
I am using EA-8 with a SQL Server based repository.
I want to extract information related to elements in a package and in lower packages.
For this purpose I need to determine all packages in a specific tree.

A hard-coded query (going only 2 levels deep) is

Code: [Select]
select t_package.Name Package, t_package.Package_ID, t_package.Parent_ID
from  t_package where
  t_package.Package_ID in (select  t_package.Package_ID from  t_package where t_package.Name = '00-000 F Information')
or t_package.Parent_ID in (select  t_package.Package_ID from  t_package where t_package.Name = '00-000 F Information')
or t_package.Parent_ID in (select  t_package.Package_ID  from  t_package
 where t_package.Parent_ID in (select  t_package.Package_ID from  t_package where t_package.Name = '00-000 F Information')
)

But this is of course not scalable.

Can one use some kind  of Recursive Query syntax? Does anybody have an example?

Thanks

Luc

2
General Board / EA - Branching versions through Subversion
« on: January 30, 2012, 11:11:53 pm »
Hello,
I need to setup a 'branch' of a project that is under SVN. (with 'branch', I mean here the Subversion concept of a branch).

However it seems that the changes I apply to the branch are replicated to the trunk.

Preparations
- Create 2 empty SQL Server databases Test_EA_Trunk and Test_EA_Branch
- In the Test_EA_Trunk, add some initial diagrams
- Create a new Subversion Repository, and add this Test_EA_Trunk project to SVN http://xxx:8080/svn/Test_EA/trunk
- Make some additional changes to a package, and commit all these changes.

Setup of a Branch
- Verify that no packages are checked out (Edit / Model Search / My Checked Out Packages … Options : Manage Searches)
o      Update the query as follows
SELECT  t_package.PackageFlags ,
t_object.ea_guid AS CLASSGUID, t_object.Object_Type AS CLASSTYPE,t_object.Name AS Object, ...AND
t_package.PackageFlags LIKE '#WC#VCCFG=#WC#'
- Now make a branch in SVN repository browser (Copy To ….  tags/T1.)
- With "Tools / Data Management / Project Transfer " you can copy the complete repository from Test_EA_Trunk to Test_EA_Branch
- Create an additional local directory d:\workspaces\EA\Test_EA_Branch, and hook it up to the tags/T1.
 
- Update the Version control Settings of the branched model ( Model, Package Control, Version Control Settings) and let it refer to the local folder Test_EA_Branch

Verification
- Edit / Model Search, Use the same query as above
- This indicates VCCFG=EA_Trunk, although one would expect it to be VCCFG=EA_Branch.


- Execute following actions to reveal the problem
o      Open EA_Branch
o      Check Out a package
o      Add a Class
o      Check In the package
o      Open EA_Trunk
o      Check out same package
o      [ch61664] Additional class is shown

Question:
How to manipulate the PackageFlags so that the ‘branch’ copy actually refers to another SVN copy?
I could use native SQL to patch the packageflags from "isModel=1;VCCFG=EA_Trunk;..." to "...;VCCFG=EA_Branch".

But is there a simple solution to achieve it?



3
Bugs and Issues / Re: Unable to release checkedout package
« on: June 25, 2012, 11:58:56 pm »
Hello,
The native Tortoise client does not reveal a checkout.
As a reminder: my laptop crashed and was re-initialized. All software was redeployed. So the 'checkout' information is probably only available  on the 'old laptop image'.

Luc

4
Bugs and Issues / Re: Unable to release checkedout package
« on: June 25, 2012, 10:16:46 pm »
Hello,

When executing that action, I get an error :

   Package: '01-021 Invoicing & TOS Functional TB' - WARNING: Package marked as 'CheckedIn', but XMI file reported as 'Out To Other' - cannot synchronize to this state.  Package 'CheckedOutTo=' value remains empty.      

Can I somehow clear that flag in the XMI file?

Luc

5
Bugs and Issues / Unable to release checkedout package
« on: June 25, 2012, 06:47:54 pm »
Hello,
Working with EA 9.3 & SQL-server based repository, connected to a SVN version control environment.
- I checked out a package on a laptop
- Laptop was formatted
- Reinstalled software & connectivity to SQL Server repo and SVN repo

I am unable to check-in , to undo the checkout or to remove the package from version control.

Any idea?

Luc

6
OK....
But I want to apply a stereotype, and do not know how to check the GUID from the stereotype.

The following query shows the atributes, for classes with a non-null stereotype:

Code: [Select]
select * from dbo.t_attribute where Object_ID in (
   select object_id from dbo.t_object
   where Object_Type = 'Class' and       Package_ID =9999
   ) and
  Stereotype is not null;

Also the API provides only the stereotype as a string and not as a guid.

Regards
Luc

7
Our domain model contains attributes with a Key stereotype.
For our outsourcer we created a UML profile.  Within this profile a stereotype Key (extending Metaclass Attribute).
When we apply that second stereotype, the outsourcer can see it.

- How can we programmatically update the original Key stereotypes to the UML Key stereotypes?
- How can we check whether an XMI or a UML Key stereotype was applied ? (eg. with SQL the t_attribute table contains stereotype as a String column, and one cannot distinguish).

Thx
Luc

8
Hello,

(Working with EA 935)
I am able to create a profile with a stereotype 'value object' extending the metaclass Class.
How can I create in this profile a stereotype 'Generalization', that contains an additional property for storing the mapping type?
- what is the MetaClass to be used (Generalization)?
- what is the name of the stereotype (Generalization)?
- how to apply this to an existing connector.

Code: [Select]
<Stereotype name="Generalization" notes="" cx="90" cy="70" bgcolor="-1" fontcolor="16711680" bordercolor="16711680" borderwidth="1" hideicon="0">
      <AppliesTo>
            <Apply type="Generalization">
                  <Property name="direction" value="Source -&gt; Destination"/>
                  <Property name="isSubstitutable" value=""/>
            </Apply>
      </AppliesTo>
      <TaggedValues>
            <Tag name="type" type="enumeration" description="" unit="" values="SingleTable,Concrete,Joined" default=""/>
      </TaggedValues>
</Stereotype>

Regards
Luc

9
Sorry,
We haven't used the simulation (yet)
Luc

10
Thanks,
I did not notice your answer...
It helps me a lot.

Luc

11
Hello,

I traverse the repository Object Model with java eeapi.jar. However I don't know how to determine a StateMachine connected to an element.
Furthermore how can I get the States from a StateMachine and its transitions.

I want to have the COM equivalent of the following SQL queries...

Code: [Select]
select * from t_object
           where  (Package_ID = 11121 and Name = 'Orderline')
--> this is  a Class with a StateMachine attached to it
          
   select * from t_object
            where  parentId = (select object_Id from t_object
            where  (Package_ID = 11121 and Name = 'Orderline') )
---> This shows the state machine
  
  
   select *  from t_connector
            where connector_type = 'StateFlow' and
            (Start_Object_ID in (select object_id from t_object where (Object_Type like 'State%' ) and Package_ID = 11121 and (ParentID = 94970 or Object_ID = 94970))
            or End_Object_ID in (select object_id from t_object where (Object_Type like 'State%' ) and Package_ID = 11121 and (ParentID = 94970 or Object_ID = 94970)) )  
 --> This shows the state transitions

12
Great,
This is what I was hoping for.
Thx to query and Geert.

13
Hello,
When exporting an XMI directly, and from a baseline, the 2 XMI files differ  in size (14.136 KB against 28.272KB) but this is probably some single/double byte difference.
Upon comparing however, there are some 50 differences, most of them a couple of bytes are differing inside some 'binary' clause.

I can indeed use SQL to detect the baseline...
"select  BinContent from dbo.t_document where DocType = 'Baseline'and elementId = '" + childPackage.GetPackageGUID() + "'";


I assume you refer to the forum entry: http://www.sparxsystems.com/cgi-bin/yabb/YaBB.cgi?num=1348532739

But it is a pity that one needs to create a JDBC connection to the SQL Server (with Windows Authentication) specifically for that one action.


14
Hello,
I am able to create a new baseline for a package by means of the API.

        repository.GetProjectInterface().CreateBaseline(childPackage.GetPackageGUID(), aVersion, aNote);

Is there an API foreseen to export that specific baseline?

Regards
Luc

Pages: [1]