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

Pages: [1] 2
1
Hello Qwerty,
Thank you for your response, I have change in my database the t_attribute->Default from mediumtext to longtext.
longtext should be able to store up to 4go. But nothing changes when I try to add my value with EA.

The problems seems to be more on the software EA than my database mysql, there is a setting in EA to accept more text ?

2
Hi, I am trying to add a large initialization value to an attribute in c. This attribute is a large structure containing many elements, that's why my initialization value is large.
But when I tried to add the initialization value, EA cut off after 30000 characters.

Is there any way to increase the size limit?

Thank you for your understanding.

3
Thank you! You right I had desactivated the MDG technologie in Configuration -> Options -> MDG Technologie
I didnt remember where it was. :D

4
Hello, I manage to get the version 15 of EA.
I have an old project for which I would like to implement an Add-Ins to generate a specific part of a code :
Solution to my problem: https://sparxsystems.com/forums/smf/index.php/topic,43942.msg259467.html#msg259467

This old project was created with the version 13.
When I try to add the "Model Add-Ins" => Broadcast Types, I dont have access with my v13 project.
I try with a new v15 project I can.
Screen shoot: https://pasteboard.co/EmcppxAgtLi0.png

I think it is caused by the project configuration:
Screen shoot: https://pasteboard.co/HAxunV8lYB0u.png
**edit** I have the administrator right on this project.

But I cannot activate the Model Add Ins for my old project.

Do I need to create a new project or there is an another way to activate the Model Add Ins ?


5
General Board / Re: Parameter customization IN/INOUT/OUT/RETURN
« on: December 15, 2020, 12:03:54 am »
Ok thank you for your answers. I will try to use a tag value for ours needs.  8)

6
General Board / Parameter customization IN/INOUT/OUT/RETURN
« on: December 12, 2020, 02:23:05 am »
Hello,

To define a Parameters we can associate an paramKind to the parameter with the option 'Direction'.
There many option :
  • In = By Value
  • InOut = By Reference
  • Out = Passed By Reference, but only the return value is significant
  • Return = The parameter is a returned value
But is there a way to customize EA to add an option ? for example : 'In_Ptr'

Thank you


   
   
   

7
Ok thank you for the informations Eve, we will try to change it in ours server.
Yan

8
Hello,

I generate automaticaly ours design with EA and an SQL Fragment.
I am able to retrieve an list of tag value with the same name and rename as "dependencies" with the following code:
Code: [Select]
GROUP_CONCAT( DISTINCT optag4.value ORDER BY optag4.ElementID DESC SEPARATOR ', ') AS dependencies,
But the query works well but when I have too many characters (> 1024 char) the GROUP_CONCAT stop concat all my tag value with the same name.
I found that in mySQL, I have to write in my query :
Code: [Select]
SET SESSION group_concat_max_len = 1000000;
But when I try to set, the querry do nothing and return nothing.

Has anyone ever had this problem before?

Thank You

Yan

EDIT: The subject have been resolved by changing the configuration of the server :
I've changed the file "my.ini" in the repository C:\ProgramData\MySQL\MySQL Server 8.0

To add the line :
Code: [Select]
group_concat_max_len=25000

9
Hello, so I try to follow your advice.

I wrote a JavaScript (I am not sure it's a add-in) to return all my tag value name "Satisfies" (instead of "Error_Code" in my first post but it should works the same).
I created this script in the Scripting repository cf. image : https://pasteboard.co/IYDqyZ5.png
Code: [Select]
!INC Local Scripts.EAConstants-JScript
/*
 * Script Name:
 * Author:
 * Purpose:
 * Date:
 */
function getSatisfies(args)
{
    var tagName = "Satisfies";
    var separator = ", ";
    var opGuid = arguments[0];
   
    // Select the operation by Guid
    var selectedObject as EA.Element;
    selectedObject = Repository.GetMethodByGuid(opGuid);
    if(selectedObject == null)
    {
        // Operation not found
        Session.Output("Op NotFound");
        return "";
    }
    // Select tags associated to the selected operation
    var tags as EA.Collection;
    tags = selectedObject.TaggedValues;
    if(tags == null)
    {
        // tag value not found
        Session.Output("Tag NotFound");
        return "";
    }
    var ret = "";
    for(var i = 0; i < selectedObject.TaggedValues.Count; i ++)
    {
        var currentTag = selectedObject.TaggedValues.GetAt(i);
        // Select only tag value "Satisfies"
        if(currentTag.Name == tagName)
        {
            if(ret != "")
                ret += separator;
            ret += currentTag.Value;
        }
    }
    Session.Output("Find, List Satisfies: " + ret);
    return ret;
}
getSatisfies("{5A1C4F8A-32B5-40a2-B151-391CA4DD8FC2}");
This script works well and I got my string with all the value I need. But now I try to call in "Code Template Editor":
Code: [Select]
$satifies = ""
$satifies = %EXEC_ADD_IN("tagValue","getSatisfies",opGUID)%
But nothing happen when I generate.
What is wrong with my Script? I am pretty sure its not an ADD IN but I can not how to figure this out.

By the way I use a EA Version 13 and on the link you give me it is wrote "This feature is available from Release 15.0", but I saw some topics on this forum talking about EXEC_ADD_IN in 2007 so I imagine I can used it ?

Last question, I have to generate also the design in Word format and I have the same problem with this tagValue.
I had opened an old topic to write my SQL querry to get all my informations : https://www.sparxsystems.com/forums/smf/index.php/topic,43712.msg258942.html#msg258942

Can I also call the same script in my SQL Fragment ?

Thanks for the help

10
Thank for yours reply, but what is an add-in ?
This is what you are talking about : https://www.sparxsystems.com/resources/developers/autint_vb_calling_from_ea_addin.html
Do you have an example to use it ?

11
General Board / [Code generation] List all opTag:"myTag" for an operation
« on: February 12, 2020, 01:45:45 am »
Hello,

I try to configure the Code Template Editor.
We have define a tag value : "Error_Code" to write all the return code that the functions could return.
But the same tag has been created several times because the size of the value is too big (name + description).
When I generate the code, I use $returnCode += %opTag:"Error_Code"% to retrieve the tag.
But I get only the first tag name "Error_code" the generator find.
I try to find a way to do this in https://www.sparxsystems.com/enterprise_architect_user_guide/15.1/model_domains/taggedvaluemacros.html but I didn't found.

Is it possible to retrieve all the tags "Error_code" at once ?
(Maybe with something like %list="myTag" @separator="\n*"%)

12
I found int the documentation for EA v14, I have to write :
op.Behaviour AS "opBehaviour.Formatted"
instead of :
op.Behaviour AS [opBehaviour-formatted]

And it works for me :)

13

For SQL Server you have to add the suffix "-formatted" to your field name
op.Behaviour AS [opBehaviour-formatted]
In you template you then use this field like this
{opBehaviour.formatted}

I try but it didn't works. Now in the doc, I didn't have anymore text but only : opBehaviour.formatted
I try with {opBehaviour-formatted}, I get the text but I still have <i>,<b>...

Maybe I have to activate an option ?

14
Hello, So it takes me some time to write the query to retrieve all my info.
I share with you if it can help someone :
SELECT op.OperationID, op.Name AS opName,
      optag1.value AS satisfies,
      optag2.value AS rationale,
      optag3.value AS subordinates,
      optag4.value AS dependencies,
      optag5.value AS resources,
      optag6.value AS datas,
      optag7.value AS errorCode,
      GROUP_CONCAT( DISTINCT CONCAT_WS(' *** ',CONCAT_WS(' | ',CONCAT_WS(' : ',opParams.Name,opParams.Type),opParams.Kind),opParams.Notes) ORDER BY opParams.Name SEPARATOR '\n') AS AllParams,
      op.Type AS opRetType,
      op.Behaviour AS opBehaviour,
      op.Notes AS opNotes,
      tCallsBy.CallsBy AS CallsBy
FROM t_object AS obj
    LEFT JOIN  t_operation AS op ON  obj.Object_ID = op.Object_ID
   LEFT JOIN 
        (SELECT t2.OperationID, t2.name, group_concat(t1.name) AS CallsBy
      FROM  t_operation t1
         LEFT JOIN 
            (SELECT to2.OperationID, to3.ElementID, to2.name
            FROM  t_object to1
               LEFT JOIN  t_operation to2
                  ON  to1.Object_ID = to2.Object_ID
               LEFT JOIN  t_operationtag to3
                  ON  to3.VALUE LIKE CONCAT("%", to2.Name, "%")
            WHERE  to3.Property = 'Calls'
            AND to1.Object_ID = '#OBJECTID#') t2
         ON  t1.OperationID = t2.ElementID
      WHERE  t2.ElementID is not null
      GROUP BY t2.name) tCallsBy ON  op.OperationID = tCallsBy.OperationID
   LEFT JOIN  t_operationparams ASopParams ON  op.OperationID = opParams.OperationID
   LEFT JOIN  t_operationtag AS optag1 ON  (op.OperationID = optag1.ElementID AND  optag1.Property = 'Satisfies')
   LEFT JOIN  t_operationtag AS optag2 ON  (op.OperationID = optag2.ElementID AND  optag2.Property = 'Rationale')
   LEFT JOIN  t_operationtag AS optag3 ON  (op.OperationID = optag3.ElementID AND  optag3.Property = 'Calls')
   LEFT JOIN  t_operationtag AS optag4 ON  (op.OperationID = optag4.ElementID AND  optag4.Property = 'Constraints')
   LEFT JOIN  t_operationtag AS optag5 ON  (op.OperationID = optag5.ElementID AND  optag5.Property = 'Use_Extern')
   LEFT JOIN  t_operationtag AS optag6 ON  (op.OperationID = optag6.ElementID AND  optag6.Property = 'Use_Local')
   LEFT JOIN  t_operationtag AS optag7 ON  (op.OperationID = optag7.ElementID AND  optag7.Property = 'Error_Code')
WHERE  obj.Object_ID = '#OBJECTID#'
GROUP BY op.Name


But I have a problem the text return by op.Behaviour AS opBehaviour and op.Notes AS opNotes have the formating inside (i>, /i>, b>, ...), do you know If it is possible to format correctly the text when it is print in the generated doc ?

15
Thank for your support, I think it works to call SQL fragment in the section method>
I will try to change all the template to remove the sections attribute> and method> sections.
Is it possible to call a SQL fragment into another SQL fragment? (I tried but it seems not working)
Or I have to extract all the attribute/method of my class in only one SQL Fragment, because for the moment I use the sections to call multiple SQL fragment to extract information, bellow the actual template I using :
package >
1.1 Package  {Pkg.Name}
element >
1.1.1 Class {Element.Name}
{Element.Notes}
{Template - SDD Class Diagram}

1.1.1.1 Attributes
attribute >
{Template - SDD attributes full}
< attribute

1.1.1.2 Methods
method >
{Template - SDD CallsBy} <= Here is the current SQL fragment with my problem
{Template - SDD methods full} <= I would like to call in this SQL fragment (but not working)
< method

1.1.1.3 Interaction Diagram

child elements >
{Template - Interaction diagram}
< child elements
< element
child packages >
< child packages
< package

-------------------------------------------------
And here the SQL Fragment {Template - SDD methods full} :
package >
element >
method >
service: {Meth.Name} (
parameter >      {MethParameter.Name} : {MethParameter.Type} ({MethParameter.Kind})  **{MethParameter.Notes}**
< parameter ) return {Meth.Type}

Overview:
{Meth.Behavior}

Satisfies:
{Meth.valueOf(Satisfies)}

Rationale:
{Meth.valueOf(Rationale)}

Description :
{Meth.Notes}

Called by:
{Meth.valueOf(Called_By)} <= Here I would call {Template - SDD CallsBy}

Subordinates:
{Meth.valueOf(Calls)}

Dependencies:
{Meth.valueOf(Constraints)}

Resources:
{Meth.valueOf(Uses_Extern)}
{Meth.valueOf(Use_Extern)}


Data:
{Meth.valueOf(Uses_Local)}
{Meth.valueOf(Use_Local)}

Error code:
{Meth.valueOf(Error_Code)}

< method
child elements >
< child elements
< element
< package


Edit : add where I would call {Template - SDD CallsBy} if Fragment could call another Fragment.

Pages: [1] 2