Recent posts

#1
jArchi / Re: Single View 2 Single HTML ...
Last post by JoCriSem - Today at 09:40:38 AM
A script I was looking for for a while now.  Unfortunately I am getting an error when running it:

export View to Single HTML
Using view: 01.00 CyFun - Principles Overview
javax.script.ScriptException: java.nio.file.NoSuchFileException: /Users/....../Scripts/templates/v2s.html
   at java.base/sun.nio.fs.UnixException.translateToIOException(Unknown Source)
   at java.base/sun.nio.fs.UnixException.rethrowAsIOException(Unknown Source)
   at java.base/sun.nio.fs.UnixException.rethrowAsIOException(Unknown Source)
   at java.base/sun.nio.fs.UnixFileSystemProvider.newByteChannel(Unknown Source)
   at java.base/java.nio.file.Files.newByteChannel(Unknown Source)

What could be the cause?
#2
Hi Phil, thank you very much for your explanations! :)

Thanks to these I was able to solve this problem.
#3
General Archi Discussion / Re: Seeking Guidance on How to...
Last post by Phil Beauvoir - May 24, 2024, 11:43:33 AM
Hi, you can use the "Paste Special" command instead of "Paste".

First, change the default behaviour of "Paste Special" in Archi's Preferences under "Diagram -> Paste Special Behaviour" and select "Always paste a duplicate of copied element".

Now when you copy an object select "Paste Special".

To duplicate a view with copies:

1. Create a new blank view
2. Select all the elements from the view you want to duplicate and Copy them
3. Select "Paste Special" in the new view

For more information about copying and pasting behaviour please consult the Archi User Guide.

Hope that helps!
#4
Hello Archi Community!  :)

I am currently facing a challenge while using the Archi software and I'm hoping to find some assistance here.

My goal is to create specializations of elements that could be used between different views while preserving some characteristics such as name-value properties and graphical aspects.

With "Specializations Manager" alone it is not possibie to satisfy this need. So I attempted to realize a "template view" and created the elements of interest there, with the intention of copying and pasting them into other views. However, I noticed that the first paste operation results in copying an instance of the same object, which also modifies the properties of the "template elements" in the corresponding view. To obtain a copy of the same object, I need to perform the paste operation twice.

Similarly, when I use the "Duplicate" option for a view, the instances of the same elements are retained, leading to changes in the properties of the elements in both views.

For this reason, I would like to ask you if there is a way to:
  • Generate a "template" of a desired element starting from a specialization, while preserving the graphic and key-value properties of the object.
  • Copy and paste the desired element into another view without needing to perform the operation twice to obtain a copy.
  • Duplicate a view, creating copies of the objects rather than retaining the same instances.

I am using Archi 5.3 with ArchiMate 3.2.

Thank you in advance for your time and consideration.
#5
I love Archi! Incredible tool! This is why I invested quite a portion of my free time to develop archi-powertools. The tools pay off! Today, as business-as-usual, archi-powertools-verifier notified me that a new connection to yet another Kafka had just been added by the developers to that setup I'm describing in the topic. It took me five minutes to think carefully which of the views on the model best represent the new stuff, do all beauty work, write commit message, and click "OK". (The HTML report gets generated and published automatically.) Including two minutes wasted as I initially made the Flow relation go wrong direction (oops!). The verifier spotted the problem. +1 element and +1 relation in the model, 100% guarantee that the model is in perfect shape.
#6
jArchi / Re: error adding existing elem...
Last post by Mate - May 21, 2024, 19:46:24 PM
Thank you, Phil. I now know my mistake and the distinction between diagram objects and model concepts. Thank you for the explanation.

Also grateful for the tips on JS programming. I only occasionally dabble in programming, and this is my first foray into JS and jArchi. So am most thankful for all the guidance that can help me improve :).
#7
General Archi Discussion / Re: How I cope with model of 4...
Last post by Phil Beauvoir - May 21, 2024, 18:48:35 PM
Hi,

thanks for sharing this with the Archi and ArchiMate community! I'm sure everyone will find this very useful. :-)

Phil
#8
Bonus #1: Model linting
I can use the same technique and same instruments to validate internal properties of architecture models against a set of rules expressed in SQL and CQL queries. For example, my automation checks that if a NiFi processor group is presented on a ArchiMate view, the view also contains all model elements which are data source or data sink for this processor group. Otherwise, the view would mislead me and others about ins and outs of this processor group. Check out this example of SQL queries which implement such sort of verifications.
#9
jArchi / Re: error adding existing elem...
Last post by Phil Beauvoir - May 21, 2024, 11:09:46 AM
Hi,

The error means that there is no method with the signature:

View.add(diagramObject, x, y, w, h);

Your script is getting objects based on the current selection here:

return $(selection).find("element").filter(e => {

But if the current selection is a View then the elements returned are actually diagram objects, not model concepts. In that case you need to reference the underlying concept like this:

View.add(e.concept, 100, 100, 140, 60);

BTW if you want to select all elements in the model rather than the current selection you can just do this:

return $("element").filter(e => {

Some possible tips:

1. You probably know this but I'll mention it anyway. You don't actually need a "main()" function, you can just put that code block at the start of the script.
2. Because you are catching exceptions in a try/catch block you don't get to see the line number in the script where the error occurred in the console output. I had to remove the try/catch to see the line number where the problem occurred.

Hope that helps!
#10
jArchi / Re: error adding existing elem...
Last post by Mate - May 21, 2024, 00:00:52 AM
seems to work as expected if the selection is the model or a folder. If the selection is a view then I get this error. Do I need to do some additional transformation for elements selected from a view vs elements selected from the whole model or a folder in the model?