Author Topic: Specification Manager - Child Diagrams And Embedded Images  (Read 917 times)

wmather

  • EA Novice
  • *
  • Posts: 15
  • Karma: +0/-0
    • View Profile
Specification Manager - Child Diagrams And Embedded Images
« on: December 31, 2017, 06:34:17 pm »
Hi,

Forgive my ignorance as am new to EA and am having some issues with the specification manager.  While I can create the hierarchy of requirements, the issue I am facing is trying to get embedded diagrams in the published output, or to add custom image(s) to the output.

I have tried to follow the EA User Guide but have failed to get either a state machine diagram or a copy-and-pasted object into the notes to be exported during the publish.

While usually not a fan of the dummies books, it seems Sparx Systems EA for Dummies is just what I need to understand this software as I am finding this are just not clicking with me yet. I usually don't consider myself unintelligent, but this is the first time I have had a piece of software where I don't just click into understanding how to drive it.

If anyone can give me pointers, or even a short list on what to do to get the expected output, I would be extremely grateful.

TLDR;

I want to achieve something like as follows. NOTE: It would be great if instead of linking to a diagram in the model, if I could also paste a custom image and have this in the output.

  • Create a new package called Diagrams
  • Create a new package called Requirements
  • Add a new Requirements Diagram to the Requirements Package
  • Use Specification Manager to create a hierarchy of elements i.e: 1.0, 1.1, 1.2, 2.0, 2.1 etc..
  • Add a new State Machine Diagram to Diagrams package
  • Implement a basic state machine
  • Link the State Machine to any node in the requirement hierarchy
  • From Specify in the ribbon, Click Documentation=>Generate Documentation=>Generate
  • Open the DOCX and find the state machine diagram in there (or an embedded image)

Nizam

  • EA User
  • **
  • Posts: 157
  • Karma: +5/-1
  • Model Sharing - Simplified
    • View Profile
    • Professional Model Collaboration
Re: Specification Manager - Child Diagrams And Embedded Images
« Reply #1 on: December 31, 2017, 07:43:30 pm »
There are a number of ways to achieve this,  you can consider

Start sharing EA Models to wider teams now!!.
View EA Diagram Online or Take a Trial Try Now

wmather

  • EA Novice
  • *
  • Posts: 15
  • Karma: +0/-0
    • View Profile
Re: Specification Manager - Child Diagrams And Embedded Images
« Reply #2 on: January 01, 2018, 09:03:33 am »
Hi Nizam,

Thanks for the fast response.

Set the statemachine diagram as the composite diagram under the chosen requirement (Right Click -> New Child Diagram -> Select Composite Diagram)

I have no new child diagram in 13.5 but have Add=>Select Composite Diagram=>Choose the diagram. This did not generate the diagram in any output from either the  "Specification Manager List" or "Requirements Report - Details" templates.

Will try to understand the template fragment method.

qwerty

  • EA Guru
  • *****
  • Posts: 9216
  • Karma: +140/-133
  • I'm no guru at all
    • View Profile
Re: Specification Manager - Child Diagrams And Embedded Images
« Reply #3 on: January 01, 2018, 09:13:44 am »
You need the context menu in the diagram. This is EAUI (EA's Unique Interface).

q.

wmather

  • EA Novice
  • *
  • Posts: 15
  • Karma: +0/-0
    • View Profile
Re: Specification Manager - Child Diagrams And Embedded Images
« Reply #4 on: January 01, 2018, 10:33:31 am »
Hi qwerty,

Afraid that does not work either. I get the "glasses" symbol (i guess means linked?) but still no output on generation.

<strike>I would love to attach my sample ea file but I cannot attach documents in this forum.</strike>

Pastebin of exported XMI incase I am doing something wrong in my project setup: https://pastebin.com/swpQbQmy

« Last Edit: January 01, 2018, 10:37:46 am by wmather »

qwerty

  • EA Guru
  • *****
  • Posts: 9216
  • Karma: +140/-133
  • I'm no guru at all
    • View Profile
Re: Specification Manager - Child Diagrams And Embedded Images
« Reply #5 on: January 01, 2018, 11:05:18 am »
Once the glasses (or the chain or the infinity) appears, it means that the element is composite. You can dbl-click it and reveal the composite diagram inside (or if you chosen another diagram then this one). Use Shuft-Alt-G to find it back in the project browser.

q.

wmather

  • EA Novice
  • *
  • Posts: 15
  • Karma: +0/-0
    • View Profile
Re: Specification Manager - Child Diagrams And Embedded Images
« Reply #6 on: January 01, 2018, 11:30:02 am »
Hi q,

Yes that all works, but the diagram does not come out in the documentation generation. I attached the XMI into pastebin incase I have not setup my package correctly and it needs a proper "EA Way of doing things" to work :)

On another note, want to purchase your books but not sure if EA for the BA is for EA newbies like myself....

qwerty

  • EA Guru
  • *****
  • Posts: 9216
  • Karma: +140/-133
  • I'm no guru at all
    • View Profile
Re: Specification Manager - Child Diagrams And Embedded Images
« Reply #7 on: January 01, 2018, 12:12:33 pm »
Well, it depends. What kind of rookie are you? ;-)

If all goes wrong you get a full refund at LeanPub.

And I have to be honest: I'm not familiar with the EA document generator at all since I have my own way of generating documents from EA.

q.

wmather

  • EA Novice
  • *
  • Posts: 15
  • Karma: +0/-0
    • View Profile
Re: Specification Manager - Child Diagrams And Embedded Images
« Reply #8 on: January 01, 2018, 02:44:33 pm »
how do you do that! would love to know how to generate my own docs. i suspect scripting and some automation will be the key here

Nizam

  • EA User
  • **
  • Posts: 157
  • Karma: +5/-1
  • Model Sharing - Simplified
    • View Profile
    • Professional Model Collaboration
Re: Specification Manager - Child Diagrams And Embedded Images
« Reply #9 on: January 01, 2018, 05:13:59 pm »
Use the script below
Code: [Select]
!INC Local Scripts.EAConstants-JScript
 var ACTIVITY_TEMPLATE = "DiagramReports";
 
function main(ObjectID)
{
var docGenerator as EA.DocumentGenerator;
    docGenerator = Repository.CreateDocumentGenerator();
    if ( docGenerator.NewDocument("") )
    { 
var sEle  as EA.Element;
sEle = Repository.GetElementByID(ObjectID);
if(sEle.IsComposite)
{
var cDiag  as EA.Diagram;
cDiag = sEle.CompositeDiagram;
if(cDiag!=null)
{
docGenerator.DocumentDiagram(cDiag.DiagramID,0,ACTIVITY_TEMPLATE);
}
}

}

var rtf = docGenerator.GetDocumentAsRTF();
return rtf;

}

Call it in a fragment using 'Document Script',
Code: [Select]
main(#OBJECTID#);

Create another template to render your diagram, call it 'DiagramReports' (as referred in the script), enable Package-> Diagram section and insert Diagram.DiagramImg

Call the template fragment in the 'element' section of your main template.

HTH
Nizam


« Last Edit: January 01, 2018, 05:21:19 pm by Nizam »

Start sharing EA Models to wider teams now!!.
View EA Diagram Online or Take a Trial Try Now

qwerty

  • EA Guru
  • *****
  • Posts: 9216
  • Karma: +140/-133
  • I'm no guru at all
    • View Profile
Re: Specification Manager - Child Diagrams And Embedded Images
« Reply #10 on: January 01, 2018, 08:58:42 pm »
Yes, scripting is the key. Unfortunately most people not only think that "Word" is a text layout and processing program. Moreover they only know this single one. I create LaTeX documents which are sort of code. So it's a scripted LaTeX code generator. And the result is aesthetic based on mathematical principals.

q.

wmather

  • EA Novice
  • *
  • Posts: 15
  • Karma: +0/-0
    • View Profile
Re: Specification Manager - Child Diagrams And Embedded Images
« Reply #11 on: January 01, 2018, 11:26:15 pm »
thanks qwerty

an old unix head here so l was thinking LaTeX as well then can output to various mediums. as a developer for over 20 years i dont mind cutting code and piping commands together. would love to see how you do that end-to-end so that i can get these leanpub book bundles and really understand how to "gain the upper hand" with EA so too speak :)


qwerty

  • EA Guru
  • *****
  • Posts: 9216
  • Karma: +140/-133
  • I'm no guru at all
    • View Profile
Re: Specification Manager - Child Diagrams And Embedded Images
« Reply #12 on: January 02, 2018, 02:37:31 am »
I have a short write-up for the LaTeX stuff here: http://liquit.biz/brain/enterprise.html (last entry).

q.

wmather

  • EA Novice
  • *
  • Posts: 15
  • Karma: +0/-0
    • View Profile
Re: Specification Manager - Child Diagrams And Embedded Images
« Reply #13 on: January 02, 2018, 09:03:38 am »
Hi qwerty,

Thanks for that resource would have loved to seen your perl script to see the complete end-to-end result. I used to be a data warehouse consultant so am comfortable trying to reverse engineer relationships.

Anyway, because you have done it, i believe I can do it :) I think I will consider the documentation generator as being flawed in some areas and strive to write my own.

Ok, leanpub it is and down the rabbit hole I go [hopefully the back-end data structures are easier to understand than the EAUI :)]

qwerty

  • EA Guru
  • *****
  • Posts: 9216
  • Karma: +140/-133
  • I'm no guru at all
    • View Profile
Re: Specification Manager - Child Diagrams And Embedded Images
« Reply #14 on: January 02, 2018, 10:04:24 am »
That Perl stuff is usually write-once-read-never. I still can read it, but probably not so many others (it's 3.5kloc base +3kloc libs).

If you run into trouble feel free to contact me.

q.