Automated Publishing of HTML export

Started by aruberto, November 24, 2014, 09:48:26 AM

Previous topic - Next topic

aruberto

Hi

Is it possible to automatically publish HTML reports from Archi to a web front end when models are updated?

My organisation has a wiki front end through which we are going to provide content relating to our architecture to stakeholders (inclidng our Enterprise Architects). Currently I have used Archi to create jpegs of our Archi models then inserted them in the wiki pages. I then turned the jpegs into image maps which link to another wiki page for information and documentation on a specific component. The page for the component has a snippet of the HTML report I exported from Archi specific to the component. The HTML report was too long to put into a single page without impacting on usability i.e. lots of scrolling.

Someone has suggested it would be a good feature to be able to make updates to the Archi modles and have the content on the website updated automatically. I've read through the user guide, automated updates do not appear to be a current feature. Not sure how to make it happen without additional scripting. Would like to understand if anyone has tried this or is aware of any further development on Archi to make it happen.

Thanks very much.


Phil Beauvoir

Hi,

no, automated updates of the kind you describe are not implemented. I suppose it might be possible to implement this if someone wished to, it might be something that somebody could undertake as a project. The part of the process that cannot be done externally is generating the View diagrams, which Archi does by rendering them to a Draw2D canvas. The rest of the information is contained in the *.archimate XML file and this could be converted/transformed by an external tool or script. This is definitely the type of feature that would be a good candidate for another developer(s) to explore, as my own "to do" list is full. :-)
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

aruberto


Fustbariclation

Quote from: aruberto on November 24, 2014, 09:48:26 AM
Is it possible to automatically publish HTML reports from Archi to a web front end when models are updated?

I've just arrived - and that was exactly my question!

I'd be happy, though, if we could just add a property to objects that was exported in the .svg export.

That way, all you'd have to do is put the URL into the object's description and, when it was exported as a .svg. it's automatically work as a clickable image for a web page.... a one-step process.

What it would need would be a property that was exported with the object. Let's say the property was called 'URL'. Then, in the diagram, you'd add the property:

URL == "http://www.mysite.com/therightstuff.html"

to the object 'Consumer':

Then the exporter would change the  .svg from:

<text fill="black" x="124" xml:space="preserve" y="27" clip-path="url(#clipPath40)" stroke="none"
      >Consumer</text
      ></a><rect x="96" y="432" clip-path="url(#clipPath41)" fill="black" width="118" opacity="0.3922" height="53" stroke="none"
      />

To:

<a xlink:"http://www.mysite.com/therightstuff.html">
<text fill="black" x="124" xml:space="preserve" y="27" clip-path="url(#clipPath40)" stroke="none"
      >Consumer</text
      ></a><rect x="96" y="432" clip-path="url(#clipPath41)" fill="black" width="118" opacity="0.3922" height="53" stroke="none"
      />
</a>

That's it. Then you'd just load the .svg file and it'd work as a clickable image.

I know nothing at all about the source code of Archi. It'd be great to know how difficult it'd be to add this though from an expert.



Fustbariclation

That's the first, quick and dirty fix.

Much better would be if you could define a property URL for the whole diagram:

URL === http://www.mysite.com

Then, for each object, the .svg export could just append the object name. So, for the object above 'Consumer', setting this would mean that export would be:

<a xlink:"http://www.mysite.com/Consumer.html">
<text fill="black" x="124" xml:space="preserve" y="27" clip-path="url(#clipPath40)" stroke="none"
      >Consumer</text
      ></a><rect x="96" y="432" clip-path="url(#clipPath41)" fill="black" width="118" opacity="0.3922" height="53" stroke="none"
      />
</a>

So, for every object in the diagram, you'd need a sub-directory on your web-server. Nice and neat - and I'd hope, not that difficult to code.

Even better, for the perfect Archi -> Web solution. Set:

URL === http://www.mysite.com

as above, and:

LINK_TYPE = php

To get:

<a xlink:"http://www.mysite.com/Consumer.php">
<text fill="black" x="124" xml:space="preserve" y="27" clip-path="url(#clipPath40)" stroke="none"
      >Consumer</text
      ></a><rect x="96" y="432" clip-path="url(#clipPath41)" fill="black" width="118" opacity="0.3922" height="53" stroke="none"
      />
</a>

So your links could link to any sort of sub-domain page that suited you, html, php or even .svg if you wanted to link a cascade of Archi diagrams.

aruberto

I'd love to say I knew how to interpret that code but your last post sounds good/what we'd be looking for.