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 - pocketom

Pages: [1] 2 3 ... 7
1
General Board / Re: How to set a columns to UNIQUE (MSSQL)?
« on: April 05, 2011, 10:53:14 pm »
Did you manage to set the NOTNULL constraint? I think it would be a good idea to determine this by multiplicity.
Another way would be setting NOTNULL when the composition connector was used (but it seems to appear as "Aggregation", not sure if there is an option to distinguish compositions).

2
General Board / Re: How to set a columns to UNIQUE (MSSQL)?
« on: January 17, 2011, 08:38:56 pm »
Hi! Thanx a lot, that's exactly what I was looking for!

Cheers
Thomas

3
General Board / Re: How to set a columns to UNIQUE (MSSQL)?
« on: January 03, 2011, 10:56:25 pm »
Nobody? I guess this should be very simple, but somehow I still don't get it  :o

4
General Board / How to set a columns to UNIQUE (MSSQL)?
« on: December 16, 2010, 12:45:31 pm »
I have modified the build-in transformation macros to let them create together a DDL model and a C# class model from a platform independent model according to my environmental constraints (C# MSSQL, Fluent/NHibernate). I use it to generate a persistence model that needs no further mofications to code and DB schema after generation. So far that works fine, but now I started fine-tuning and limitations show up.

I want to set a column's unique flag from within the script (from an attribute marked with a <unique> stereotype in PIM model), but obviosly that's not posible (stated also in documentation, but no reason why). Does anybody know why this isn't possible or if there is a good reason for not doing it?
I'm looking for a workaround to overcome this. There is a function macro EXEC_ADD_IN available in the intermediary language, but as said I'm not sure if that's a good idea to hack it in that way, also I couldn't find in the documentation if the SDK would allow me to set the unique flag to a column.

I need it also for setting NOT NULL via macro...

Any help is highly appreciated  8-)

5
General Board / Re: MDA - assign columns to operations ?
« on: February 11, 2011, 11:34:18 pm »
Right, the Parameter is doing well! What I'm not sure about is how to use it genrically? In the example above name="Column1" defines the Column tab you can see when manually adding an index. But what if I want to access now e.g. the tab 'Pre' or 'Post'? Would it be name = "Pre1" ? Searching the help files for "Parameter" returns everything but nothing about that...

6
General Board / MDA - assign columns to operations ?
« on: April 07, 2010, 09:15:34 pm »
I try to add indizes automatically to tables when transforming into a SQL2005 database schema.

I refer to the documentation:

Quote
1. Right-click on the required table either in a diagram or in the Project Browser.
2. Select the Operations context menu option. The Operations dialog displays.
3. Add an operation (with a name such as IDX_CustomerID; the IDX_ prefix is optional but it helps identify the operation).
4. In the Stereotype field for the operation, select index (check and unique are also supported).
5. Click on the Column tab.
6. Select the required columns from the Columns drop-down list in the required order, then click on the Save button to save changes.

Using the intermediary language I can set it up till point 4, by adding the following Operation to DDL.Class:
Code: [Select]
Table
{
  %TRANSFORM_REFERENCE("Table")%
  %TRANSFORM_CURRENT("language", "stereotype")%
  language=%qt%%genOptDefaultDatabase%%qt%
%list="Attribute" @separator="\n" @indent="  "%
%if elemType != "Association"%
  PrimaryKey
  {
    Column
    {
      name=%qt%%CONVERT_NAME(className, "Pascal Case","Camel Case")%Id%qt%
      type=%qt%%CONVERT_TYPE(genOptDefaultDatabase,"guid")%%qt%
    }      
  }
  [b]Operation
  {        
        name=%qt%IDX_%CONVERT_NAME(className, "Pascal Case","Camel Case")%Id%qt%
        stereotype=%qt%index%qt%
  }[/b]        
}
%endIf%
}

This works pretty good till this point, it creates an operation with the usual IDX_ index syntax.
But to get it completed I must assign a column now, like described in point 6. But I find no property for operations to asign a column now with the intermediary language.

Unfortunately the following doesn't work:
Code: [Select]
column=%qt%%CONVERT_NAME(className, "Pascal Case","Camel Case")%Id%qt%

Is there any other way to assign a column to an operation?


7
General Board / Re: Integration of EA with Visual Studio 2008
« on: October 23, 2010, 12:54:44 pm »
Quote
If your boss is too cheap to let you upgrade EA then you better get out of there ASAP
[smiley=tekst-toppie.gif]. Costs are really located somewhere else.

Cheers.

8
General Board / Re: RTF - Child Elements appearing twice
« on: October 19, 2010, 09:40:43 pm »
To explain a bit further what I'm trying to realize, I uploaded some screenshots and a documentation diagram.

Documentation Setup (Diagram)

Fig. 1

For each model document, an indivial RTF template has been created and assigned using the tagged value field RTFTemplate.



Documentation Setup (Project Browser)


Fig. 2

As you can see, I used child model documents to specify the desired hierarchy in my (single document!) output. So far this also doesn't seem to work (is only one level below the master document possible?)

Service Project Package Structure

Fig. 3

Fig. 3 shows what should happen at the end. On top you can see a package structure template that has been copied several times and renamed into the respective webservice projects (S0001, S0002,...). The documentation master template (Fig. 2) is NOT part the package structure template, it is kept seperately.

I simply want to launch my SRS report individually on the service folders S0001, S0002, S0003, which are all assembled from the same package template. Nothing special or?
But as said, right click on an individual package and execute the master template (think I need that masterdoc to specify order and misc formating setup?) does not work because then no model documents below the master doc are generated (stays completely blank, even static text won't display from included modeldocs...?).

This shows clearly why I can't use fixed package->modeldocument assignments as described in the manuals. Therefore, fetching the respective subpackages by query (search by their fixed name) is the first logical consequence.
After making it work at least for the first target package, it should be possible to extend the queries with a '<Search Term>' so that I can specify on which service root folder (S0001, S0002, ...) to launch it.

Hope anybody can tell me if this has a chance to work, how I can improve this setup to reach my goal, or if I better should forget it entirely.   :o

9
General Board / Re: RTF - Child Elements appearing twice
« on: October 19, 2010, 11:03:42 am »
Diagrams are also not rendered when using a model search for the model document SearchName.

10
General Board / Re: RTF - Child Elements appearing twice
« on: October 19, 2010, 10:33:31 am »
If I manually add a package (drag and drop a specific package onto the model document below the master document) it works correctly, child element is appearing only once below the parent element. Unfortunately I cannot pass a package by query (model search will result always in threatment by element list, package placeholders in RTF template have no efect).

I cannot find a way to overcome this. I need reusability of my SRS template.

BACKGROUND:
I have several webservice specification packages with (equal) package sub-structure for each('Use Cases', 'Actors', 'Entities', 'Scenarios',...........................) . I want to keep the document setup seperately, copying document setup and adding target packages to each model document will result in loss of maintainability (and cause days of work to drad'n'drop individual packages on those nodel documents). Unfortunately I cannot run RTF generation by right-click on the target webservice (root)package (running the master template then doesn't include any model document template). Organizing the structure/order of sections without master documents seems also not working.

Feeling 1000% stuck. Don't know what I'm doing wrong all the time.

11
General Board / RTF - Child Elements appearing twice
« on: October 19, 2010, 08:08:36 am »
I have a very basic template that renders an element's name. No matter what I do, I can't get it managed to let the child element appear only once (ignoring childs isn't an option).

I have a test package with two use cases in it (same happens for other element types like packages too):

- UseCaseElement
   |_ UseCaseChildElement


Template code:
Code: [Select]
package >
element >
Element: {Element.Name}
child elements >
< child elements
< element
< package

Output:

Element: UseCaseElement
Element: UseCaseChildElement  
Element: UseCaseChildElement
(<- go away!)[/b]

I use the following query to fetch the elements:

Code: [Select]
SELECT
ea_guid AS CLASSGUID,
Object_Type AS CLASSTYPE,
Name,
Object_Type,
ea_guid,
TPos
FROM
t_object
WHERE
t_object.Package_ID =
(
    SELECT
    TOP 1 PDATA1
    FROM
    t_object
    JOIN
    t_objectproperties on t_object.Object_ID = t_objectproperties.Object_ID
    JOIN
    t_package on t_object.PDATA1 = t_package.Package_ID
    WHERE
    t_objectproperties.Property = 'ProjectCode' AND
    Value = 'EGSP' AND
    (
        t_package.PackageFlags NOT LIKE '%RTF=F;%' OR
        t_package.PackageFlags IS NULL
    ) AND
    t_object.Name = '<Search Term>'
)

INTERSECT

SELECT
ea_guid AS CLASSGUID,
Object_Type AS CLASSTYPE,
Name,
Object_Type,
ea_guid,
TPos
FROM
t[u][/u]_object
WHERE t_object.Object_Type != 'Package'

ORDER BY t_object.TPos

So, thought I'm clever, simply excluding the childs from the query should solve the issue:

Code: [Select]
AND
t_object.ParentID = 0

which works fine in the search facility, I only get the parent element as the result, just as desired.

But for the RTF template? Not a bit of it! Now, the output does NOT show ANY childs anymore...

Output:

Element: UseCaseElement


I wonder how it is possible to seperate parents and childs effectively as this has a major impact on the structuredness of the generated report. Searching the forum brings out that other architects struggle with similiar issues too...


Cheers,
Thomas

PS: using the latest official release (build 863)

12
General Board / Re: Search Query does not run from RTF Generator??
« on: October 19, 2010, 08:22:50 am »
Figured it out, the query shown in this post is working:
http://www.sparxsystems.com/cgi-bin/yabb/YaBB.cgi?num=1287436116

Obviosly ea_guid is not ea_guid (pass results from table t_object only???)

Please close this thread.

13
General Board / Search Query does not run from RTF Generator??????
« on: October 19, 2010, 02:47:04 am »

This search query (MSSQL 2008 project DB) runs without errors and delivering the desired result from the search builder:

Code: [Select]
SELECT
tpack.ea_guid AS CLASSGUID,
'Package' AS CLASSTYPE,
tpack.Package_ID,
tpack.Name
FROM
t_package tpack
WHERE tpack.Parent_ID IN
(
      SELECT
      tpack.Package_ID
      FROM
      t_object tobj
      JOIN
      t_objectproperties tobjprop on tobj.Object_ID = tobjprop.Object_ID
      JOIN
      t_package tpack on tobj.PDATA1 = tpack.Package_ID
      WHERE
      tobjprop.Property = 'ProjectCode' AND
      tobjprop.Value = 'EGSP' AND
      (
            tpack.PackageFlags NOT LIKE '%RTF=F;%' OR
            tpack.PackageFlags IS NULL
      ) AND
      tobj.Name = '<Search Term>'
)
ORDER BY tpack.TPos

When I set it for an RTF model document as SearchName it throws an SQL error

Invalid column name 'Object_ID'

WTF is going on ??? Wasted the whole afternoon now!!!  :-[

14
General Board / Re: Handling cover sheets in RTF editor
« on: October 19, 2010, 08:13:47 am »

15
General Board / Re: How do I change formatting of child elements?
« on: October 19, 2010, 08:13:05 am »

Pages: [1] 2 3 ... 7