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

Pages: [1]
1
General Board / Re: HTML report filter
« on: May 30, 2021, 02:44:55 am »
As Geert says, you cannot filter the HTML output other than through packages. I have used two workarounds to get round this.

Option 1: Add Exception Text
Add some exception text, so the page doesn't look broken or out-of-date. As an example, see: http://www.kybernetica.co.uk/KyberneticaSparx/index.htm?guid={7746EFCB-934E-46b6-ADB6-018C10BAB72C}

The exception text is in dark red and says "There is no description for this element". Obviously, you can use any text you like – or even reference a graphic file or write-in a feedback form or some other feature.

This option depends on use of Jquery and custom CSS code – if you want to pursue this, I can post sample some code that works (this code is split between three Web Template Fragments).

Option 2: Move elements to a non-published package
If you want to exclude a specific element – or collection of elements – then you will need to put them in a separate package that will not be published. For example, in the example below, I have excluded all "Model View" elements. On the diagram, they are now unclickable: http://www.kybernetica.co.uk/KyberneticaSparx/index.htm?guid={CE46B582-5727-45aa-BEB5-125B1D77EF0C}

The same principle could be applied for individual elements, though that of course requires an additional maintenance overhead (e.g. a pre-publication routine whereby you (a) use a SQL query to find all elements that have a description AND are outside the publication package; then, (b) move them to the publication package).

Notes
  • The links above are to my own Sparx demo model (which models what I think is necessary - both in terms of functionality and competencies - for any "enterprise class" modelling tool and how Sparx potentially realizes these requirements). As you can see, this web output uses extensive customization: you can reverse engineer as you see fit, but clearly, it won't be possible to post here everything that is going on (the actual code used for example is tightly-coupled with the underlying meta-model, which essentially defines the information architecture of the web output).
  • And finally, you cannot even hope to make Sparx's utterly primitive and amateurish "dog's dinner" of a design credible and useful without resorting to Jquery – see https://jquery.com/ and for specific coding problems, stackoverflow is your best friend.


2
Try this:
1. In a Linked Document, drag an element from the Browser onto it.
2. In the dialog box, choose "Insert as Dynamic Content" and then select a Report Template (preferably a complex one that returns a mix of notes, properties, and relationships – i.e. things that are likely to change quite frequently as the model, is developed)

An actual "Dynamic Document" (introduced in v11?) will always update automatically (whether that be changes to the Template or to the model content). However, for a "Linked Document", it doesn't. This page (scroll to bottom): https://www.sparxsystems.com/enterprise_architect_user_guide/15.2/model_publishing/manage_custom_documents.html says that this functionality is actually designed like this (i.e. is NOT dynamic after all – being only a snapshot or a specific point in time). To update it, it has to be done manually: open the "Linked Document" window, right-click, and choose "Update Dynamic Report Elements" (or on another window somewhere, it is actually "Update Dynamic Selection").

Though this may be a legitimate use case, for me, this renders the feature useless. The issue is that "Dynamic Documents" are not included in HTML output, but "Linked Documents" are, and what I want to do is use a Sparx Template to provide in the HTML output a complementary and richer view of a specific Stereotype's notes, properties, and relationships (including indirect relationships).

In effect, I still cannot do this: imagine an enterprise-level project where I have 50 (or 500 or more) of these (non)-dynamic Linked Documents. That would be 50 (or 500) manual updates before I can publish to HTML, otherwise what gets published as the Linked Document is probably going to be out-of-synch with the actual HTML page. (Same issue would apply to webEA.)

So, is there any way to update ALL dynamic content in Linked Documents automatically (unfortunately, I'm not techie enough to write scripts from scratch, but any pointers gratefully received).

Or does this need to be a feature request?

3
Based on this help topic ( see example 5): https://sparxsystems.com/enterprise_architect_user_guide/15.2/model_publishing/custom_sql_fragments.html
I have this SQL:
Code: [Select]
SELECT
t.DocName AS TemplateName,
t.DocID as docID,
t.Author AS TemplateLocation,

SWITCH
(
t.isActive  = 1, '01 Template',
t.isActive  = 0, '02 Fragment',
t.isActive  = 5, '03 Dynamic',
t.isActive  = 3, '06 StyleSheet',
t.isActive  = 4, '05 ToC',
t.isActive  = 2, '04 Cover Sheet'
) as TemplateType

FROM t_document t

WHERE  t.DocType = 'SSDOCSTYLE'
order by t.isActive, t.DocName

However, what I want to get is Fragment usage, i.e. which Fragments (t.isActive = 0) are used in the Templates (t.isActive = 1)
Is this possible using SQL? (I did look at the Tables directly suing SQL Maestro, but can't figure out how they are connected as I am assuming they do not use t_connector.)
Reason for this is because we now have a large inventory of Templates and Fragments and I want to specifically see where either a Fragment is no longer being used or is being used in multiple Templates.

4
Anyone know what this fragment does or what it relates to? It goes hand-in-hand with "Package Content Row", which has two fields:
Code: [Select]
#NAME# - Link to Package (<a href="#Link to file#">#Package name#</a>)
#TYPE# - Link to Image (<img src="#path to image#">)

The Help is not helpful in that it provides no more explanation than what is above – see https://sparxsystems.com/enterprise_architect_user_guide/15.2/model_publishing/html_template_fragments.html
I had originally assumed that this is something to do with a Package page – but there is nothing written to the page at the point where this content should be. (In fact, by adding in my own strings, I cannot find what's in this HTML fragment anywhere in the HTML output.)


Pages: [1]