How do you make a report template for a single Enterprise Architect diagram? - templates

I have a package with about 25 diagrams in it. I have used EA templates to make a package report that gives the name and notes for each diagram. However I want make a more specific report that can generates the report for just one diagram containing the description from each element in the diagram. Is this possible? It does not seem like diagrams have anywhere I can generate reports from.
UPDATE: I am currently trying to figure out how to do this with Document Options>Except where Query excludes Package:>Custom SQL but cannot get it. Here is my SQL statement:
SELECT t_diagram.ea_guid & t_diagram.Name AS [DesiredService-Hyperlink]
FROM t_diagram
WHERE t_diagram.Name = 'Diagram_Name'
I tried putting this in the Report's Custom SQL, that didn't work. Then I tried putting it in a fragment's Custom SQL with the following in the template itself
custom >
{DesiredService-Hyperlink}
< custom
This also did not work. I have been trying to go off of various documentation and YouTube Videos. If anyone could point me in the right direction that would be great.

Enterprise Architect document generation is based more on the model structure then on the diagrams.
The easiest approach would be to put each diagram in a different package or nested under a specific element, even if only temporary to generate the document.

Related

How do I execute some code after Symfony3/Doctrine loads data from my database?

I'm coming from a Kohana background and have asked a couple of questions pertaining an issue I'm having and need to find out how to get this done. I am VERY new to Symfony and Doctrine and love learning new frameworks and correct ways to code. However I'm finding Doctrine ORM frustrating to use yet powerful.
So here is my basic issue and I'll try to be brief. I have a products table and a products_images table. By following the tutorial for Symfony I am already able to create Entities for both and map the relationships, generate getters and setters, create Repositories, and the whole bit. But here is where it gets sticky...
The product_images table only contains the name of the image, not the path, which I will obviously need if I am going to construct and useful href in my html. The products table was populated with products by crawling over the web and obtaining them in that method and as a requirement by the persons that are having me write their website, I am required to keep the images separated into directories that represent where they were crawled from. The location of the images has been changing often so I DO NOT want to store the path in the database.
So to keep my question simple what I need to do, somehow, some way, is to write some logic that examines where the image was crawled from and then construct a path string to pass along to my twig template and then append the image name...all in order to create a valid image tag or href.
My last attempt to find a solution for this was to modify the getter for the image name in the Entity but since I am using createQueryBuilder() to perform some DQL, it appears the getters aren't being used and now I have nothing to go on. I cannot find any documentation on the official Doctrine website that helps me get around this issue and I just need to know how to overcome this. Can anyone help?
if path is static, doctrine has nothing to do with your problem, you can use a constant or a parameter to define it.
then you jsut have to add a getter
getImageWebPath() {
return self::PRODUCT_WEB_PATH. $this->getImageName();
}
If the image is stored in a parameter you can use a lot of tools: twig function wich append the path before your image name, services wich set the path to your entity or directly getting twig parameter... etc

Enterprise Architect document template conditions like `if` and `else´

I'm working on my first Enterprise Architect custom document template to export our use cases considering the company design guidelines. Unfortunately, I am not able to print data based on certain conditions. E. g. hide fields with specific values or change their layout.
In my example or screenshot below I would like to hide {ElemScenario.Type} if the value is Basic Path, in example something like (I highlighted the position red):
if ({ElemScenario.Type} != "Basic Path") {
{ElemScenario.Type}
}
How can I change the document template in Enterprise Architect with certain conditions? Is it even possible?
You filter the content in the document options.
If you need only one type of scenario then you can do that in your main template, but you'll probably want to make three separate template fragments, each showing only one specific type of scenario.
See also my article Tutorial: Generate complex documents from Enterprise Architect with a two-step semi-automated approach for a complete example of a use case template.

How to I combine Page-views for a URL when they have different query strings in Google Analytics?

I am trying to do some reporting on page views on a site and the results are being listed like the following:
www.example.com/directory/ - 100 views
www.example.com/directory/?id=123456 - 10 views
www.example.com/directory/?id=987654 - 5 views
What filter do I need to create to views the results as:
www.example.com/directory/ - 100 views
www.example.com/directory/?id=* - 15 views
Thanks in advance
Yes, getting historical grouped together is going to mean using something like Google Docs, Excel, Tableau Software, Analytics Canvas, etc.
Moving forward...
One of the simplest ways of keeping things grouped in GA is to set up an advanced profile filter. You'll want to use this with a new profile; keeping a "raw" or "empty" profile is highly advisable for when you actually want to look at those individual URLs.
That said, here's a filter pattern that should work for you:
Go to Admin > Filters (under the View Column)
+ New Filter > Create new Filter > Name it
Filter Type = Custom filter > Advanced
Here's the pattern:
Field A: www\.example\.com\/directory\/\?id=.+
Output To: www\.example\.com\/directory\/\?id=\*
Another way to aggregate the same URI with multiple query strings is to change the primary dimension to 'Page Title' under Behavior > Site Content > All Pages.
The best way to do this for your historical data is unfortunately in an excel pivot table. You can get in in the UI, but only by creating a custom report and searching for very specific directories.
Check out the documentation on excluding query strings in your GA profile. Maybe create a new profile and write an advanced rule to rewrite all "id" pages to "/directory/product-page".
A totally different approach is to use custom variables or custom dimensions and to stop looking in the normal "Behavior" reports section (used to be called "Content" in GA) – custom dims are available using Google Analytics Universal Analytics only, which means starting a new web property and possibly running both code snippets concurrently (totally safe to do).
Personally I find custom dimensions a bit easier to work with than custom variables, and I generally think that it's a good idea to start exploring the new Google Analytics.
The nice thing about either of these approaches is that you can still keep the full page path date in the same profile as your custom dimension / variables information; it'll stay in the Behavior section where it belongs with all the other page paths.
Where I'm going with this...
You can create a new dimension such as "page type" and then call it "products", "posts", "articles", or whatever these id #s represent in this /directory/; then you can look at metrics across the dimension like pageviews, time on page, etc. by page type.
You can even create other dimensions to help describe them in more detail, such as breaking down blog posts or products into their different categories; i.e. hierarchical dimensions. Once you start using this kind of thing you may wonder what you ever did without it!
I think it's fair that I stop this answer now since it's not about how to set up custom variables or custom dimensions; those links should get you started (it's really not difficult).
Note: You can use php to fill in the dimension information in the GA tracking snippet dynamically based on the page that is being viewed (again, that's another question).

Generating class diagram from source code

I'm using Enterprise Architect and I wish to generate some class diagrams for a specific set of C++ objects within a massive project. By right clicking on a particular model and choosing Code Engineering from the context menu I can import the entire source directory for the project and generate class diagrams for all objects in the project.
I can also simply generate a class diagram for a single source file. However what I'd ideally like is to generate individual class diagrams for a particular set of files within the project (for example ones which only contain the text SNMP within their names). Can anyone help me apply this filter as the class diagram for the entire project is too large and unwieldy to manage in any capacity.
In Enterprise Architect once you have imported the entire model like you have already done you can create additional diagrams to show only the parts of the model you need. In fact I consider this normal practice.
First create a new diagram with Add->New View -> Class View & diagram.
Then drag only the classes you want from Model in the Project Browser onto the new Diagram.
If you comment your code using doxygen then you can generate these class diagrams automatically. Please look at our code at github/nvmecompliance/tnvme for example. I'm not sure if this directly applies to your case if the source code you are not going to modify..

PL/SQL Access to Saved Report Data

Using 4.1 (latest version).
I have an Interactive Report page in my app. Users are free to create and save public and private reports setting any filter conditions they choose. What I need to do is loop through these reports and "process" some data based on a column value that matches the filter condition (something like an EMPLOYEE_ID).
What I would like to do is package this functionality into a PL/SQL procedure that is scheduled using DBMS_SCHEDULER.
Other than trying to reverse engineer this from the APEX views, I am stuck. Any help is greatly appreciated.
The bad news: there is no built-in way to get the query of an interactive report.
(I hope you can program PLSQL, otherwise you've hit a dead end.)
However, i have a package which does most of the work and is indeed processing the application metadata for IRs. It can handle both column and row filters, and also columns which have an lov laid on top of them. It doesn't handle computations or aggregates.
You'd have to take the code and adjust it somewhat though, as my goal was returning some data through json back to the browser, but you won't have to write the query-rebuilding part anymore. I'll refer you to my blog post i made about my package and why i made it, so that might clear up some of the usage of it for you. You can get the zip, and you'll need the APEX_IR package. (at time of writing, it still contains a stupid oversight in that it ignores the dis/enabled state of filters)