1
Automation Interface, Add-Ins and Tools / Re: Report Generation Webinars
« on: October 30, 2025, 08:45:08 pm »
Hi Matt
Essentially a Template fragment works in two modes
Personally I only ever use script driven fragment using JavaScript to extract the Custom Fields into XML ready for insertion into other template(s).
The Custom Fields are user named and are the names of variables returned in the JavaScript.
The same technique also applies to SQL Driven scripts (which I have not used)
For a "normal template fragment" I would try the following:
Let's assume that the Template Fragment extracts details for a Use Case Element. Then the selectors for the template fragment would be
Package
Element
(Child packages if you want as well)
Add text, and fields as usual.
Invoke your template fragment in your "master template" within the element section. When the template is called, the element ID will be passed to the template fragment.
Hope this helps
All the best
Phil
Essentially a Template fragment works in two modes
- "normal template fragment" use the selectors as you would do normally
- "script or query driven" template only use custom as the selector
Personally I only ever use script driven fragment using JavaScript to extract the Custom Fields into XML ready for insertion into other template(s).
The Custom Fields are user named and are the names of variables returned in the JavaScript.
The same technique also applies to SQL Driven scripts (which I have not used)
For a "normal template fragment" I would try the following:
Let's assume that the Template Fragment extracts details for a Use Case Element. Then the selectors for the template fragment would be
Package
Element
(Child packages if you want as well)
Add text, and fields as usual.
Invoke your template fragment in your "master template" within the element section. When the template is called, the element ID will be passed to the template fragment.
Hope this helps
All the best
Phil
, The script could "clone" the diagram, then iterate the elements on the diagram performing the transformations as necessary, but this still raises the issue of nested ports in UML, versus separate related elements in ArchiMate. It maybe be easier to script the element changes, then create the ArchiMate diagrams manually.

