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 - Slávek Rydval

Pages: [1] 2 3
2
Quote
Why not? I'm often using model documents for single elements, using a search with the GUID as parameter.

How? As you can see on the template I posted, I can insert fragment on the line

Scenarios
What should be here?

In this fragment I am able to insert all the structured scenarios (names) via SQL or Script. But I am not able to each scenario insert all its lines (it should be another fragment getting id of scenario as a parameter). Or am I missing something?

Cheers.

3
Best look into virtual documents. That allows you to combine elements from different packages using different templates.

I am using it already. The thing is the use cases are not from one single package so virtual document is not a solution to this.

Slávek

4
Hello,

I am preparing a custom report and need to create own teplate for structured scenarios. First of all, I have a template that shows a diagram of a package, where use cases are shown, and after that I have a list of these use cases. The use cases are NOT from the same package as the diagram is. Now, I need to show all structured scenarios, each separated from each other.

Do you have any idea, how to do it? I tried fragments but you cannot have a fragment (getting all the steps of particular scenario) in a fragment (getting all scenarios).

The pripary template look like this:

package >
{Pkg.Name}
diagram >
{Diagram.DiagramImg}

element >

{Element.Name}
{Element.Name} {Element.Notes}

Scenarios
What should be here?

< element
< diagram

< package

Thanks.

PS.: I know there is option to use from context menu Insert field --> Structured Scenario Text, but you cannot format it if the element is taken from diagram. An the default result is painfull.

5
General Board / Re: PostgreSQL and recursive SQL
« on: January 21, 2022, 09:07:12 am »
I know. I tried to change it, but got error that the e-mail was incorrect. It is not. But I am not surprised. I have been seeing Chinees character in EA since yesterday as I migrated to Windows 11. This tool makes me frustrated.

6
General Board / PostgreSQL and recursive SQL
« on: January 21, 2022, 08:35:58 am »
Hello, I need to make a recursive query in a template fragment into PostgreSQL. I found out that EA is doggedly refusing all SQL statements that don't start with SELECT (oh well, guys, there is 2022 AD!). I also found here in past discussions that I can wrap up the WITH RECURSIVE with SELECT (allegedly working with MySQL). Well, it doesn't work at all with PostgreSQL. Do you have any experience with this SQL server?

Pure SQL statement:

WITH RECURSIVE requirements_tree (depth) AS
(
   SELECT 0, object_id, name, alias, stereotype, note, ea_guid
     FROM T_OBJECT
      WHERE OBJECT_TYPE = 'Requirement'
        AND PACKAGE_ID = 110
        AND PARENTID = 0
   UNION ALL
   SELECT depth+1, T.object_id, T.name, T.alias, T.stereotype, T.note, T.ea_guid
     FROM requirements_tree rt
      JOIN T_OBJECT T ON T.parentid = rt.object_id
) SEARCH DEPTH FIRST BY OBJECT_id SET ordercol
SELECT *
   FROM requirements_tree
ORDER BY ordercol


If I use select envelope:

SELECT * FROM (
WITH RECURSIVE requirements_tree (depth) AS
(
   SELECT 0, object_id, name, alias, stereotype, note, ea_guid
     FROM T_OBJECT
      WHERE OBJECT_TYPE = 'Requirement'
        AND PACKAGE_ID = 110
        AND PARENTID = 0
   UNION ALL
   SELECT depth+1, T.object_id, T.name, T.alias, T.stereotype, T.note, T.ea_guid
     FROM requirements_tree rt
      JOIN T_OBJECT T ON T.parentid = rt.object_id
) SEARCH DEPTH FIRST BY OBJECT_id SET ordercol
SELECT *
   FROM requirements_tree
   ) as Result
ORDER BY ordercol


I get error: operator does not exist: integer || integer.

Ok, I temporarily removed 0 and depth from the SELECT, but then I got error: column rt.object_id does not exist.

That is pretty awkward situation.



7
Be aware of the parent of the deleted element. If it is greater than zero then the element is not listed in Package.Elements but Parent Element.Elements. Thus this code (in C#) is more robust.

Code: [Select]
        public static void DeleteElement(EA.Repository Repository, EA.Element Element)
        {
            EA.Collection elements;

            if (Element.ParentID > 0)
                elements = Repository.GetElementByID(Element.ParentID).Elements;
            else
                elements = Repository.GetPackageByID(Element.PackageID).Elements;

            for (short i = (short)(elements.Count-1); i >= 0; i--)
            {
                if (((EA.Element)elements.GetAt(i)).ElementID == Element.ElementID)
                {
                    elements.DeleteAt(i, false);
                    return;
                }
            }
        }

8
General Board / Keystore with OpenDJ LDAP?
« on: October 25, 2020, 07:54:53 pm »
Is there any change to use Keystore with OpenDJ LDAP?

There is

Code: [Select]
AUTHMETHOD=AM_ACTIVEDIRECTORYEX

in config file and in keystoreservice.adconfig are these lines:

Code: [Select]
Name=EA_floating_license_user
NamingContext=ldap://opendjldap.st.sk:389/dc=st,dc=sk

Unfortunately, the log is saying this:

Code: [Select]
2020-10-21 08:52:53 [SYSTEM]: [ACTIVEDIRECTORYGROUPEX_AM] ATTEMPT: Loading group database from C:\Program Files (x86)\Sparx Systems\Keystore\Service\example.adconfig
2020-10-21 08:52:53 [SYSTEM]: [WebstoreAM] SUCCESS: Configured 6 Webstore group(s)
2020-10-21 08:52:53 [SYSTEM]: [ACTIVEDIRECTORYGROUPEX_AM] SUCCESS: Initialised. Default Naming Context: 'LDAP://DC=st,DC=sk', 6 Group(s) added.
2020-10-21 08:52:53 [SYSTEM]: SUCCESS Started AuthenticationManager
2020-10-21 08:52:53 [SYSTEM]: SUCCESS Started keystore manager
2020-10-21 08:52:53 [SYSTEM]: SUCCESS Management thread started
2020-10-21 08:52:53 [SYSTEM]: SUCCESS Bound and listening on port 7770
2020-10-21 08:52:53 [SYSTEM]: SUCCESS Socket acceptor thread started
2020-10-21 08:52:53 [INFO]: ** Now listening for connections
2020-10-21 08:52:59 [SYSTEM]: Client connected from 10.159.128.192
2020-10-21 08:52:59 [WARNING]: [ACTIVEDIRECTORYGROUPEX_AM] WARN: Authentication failed. Group 'CN=EA_floating_license_user' not found.

When using authentication AM_ACTIVEDIRECTORY, it work fine but with MS Active Directory.

9
Well, I found it.

There were two problems:
  • As you mentioned, StereotypeEx is the proper way.
  • There cannot be _metatype attribute for a stereotype that extends an operation metaclass in a profile.

10
My version is 14.1 build 1429.

11
I have an MDG file with a profile with stereotypes inside, all of it is a part of an add-in. When I create a method with the appropriate stereotype, no tags are added. When I do a similar task with a class, it works fine. What's more, when I do it manually from the GUI as a user, it works correctly (both for a method and for a class). Am I missing something?

Code for adding a method:

Code: [Select]
       private static EA.Method CreateRestApiResourceOperation(EA.Element ResourceElement, OpenApiOperation Operation)
        {
            EA.Method result = ResourceElement.Methods.AddNew(Operation.OperationId, "");
            result.Stereotype = RestApiOperationMetaclass;
            result.Notes = Operation.Summary + "\n" + Operation.Description;
            result.Update();
            return result;
        }

Similar code for a class:
Code: [Select]
        private static EA.Element CreateResourceClass(string Name, OpenApiPathItem PathItem, EA.Package Parent)
        {
            EA.Element result = Parent.Elements.AddNew(Name, RestApiResourceMetaclass);
            result.Notes = PathItem.Summary + "\n" + PathItem.Description;
            result.Update();
            Parent.Update();
            return result;
        }

The profile in MDG file is pretty simple.

12
Depends on requirements. A web browser can also connect a user to SwaggerHub. But what to do with it in EA? Wouldn't it be enough just to read a YAML file and create classes out of resources? Or do the customer need something like this: https://www.youtube.com/watch?v=jg8ATi4kTMQ? I have a meeting with the customer in the middle of February so that I will see. So far, I've got nothing in my hands.

13
Hi DaniM,

have you found anything? I was just asked by a customer similar issue - connection to SwaggerHub.

Cheers,

Slávek

14
Automation Interface, Add-Ins and Tools / Re: Using EA in ASP.NET Core 2.1
« on: December 19, 2018, 01:07:35 am »
Yes, I know it. WebEA doesn't solve my needs no matter what they are.

15
Automation Interface, Add-Ins and Tools / Re: Using EA in ASP.NET Core 2.1
« on: December 18, 2018, 08:27:14 am »
To be more specific after a couple of hours spent with it:
  • the exception is thrown on .NET Core 2.0, 2.1 and 2.2
  • on NET Core 3.0 Preview 1 it is working correctly.
The thing is that 3.0 is still a preview, so the solution is still missing.

Pages: [1] 2 3