Some jArchi starter questions

Started by mansley, March 12, 2019, 22:17:29 PM

Previous topic - Next topic

mansley

Hi all,

A few jArchi questions:

1) Has there been any consideration given to allowing model events to trigger jArchi script execution?  For example, when creating a new concept, trigger a script which allows adding of standard properties and default values, or when saving a model, ensuring that some local model rules are enforced, like having adequate property values or naming rules?

2) I've noticed the log window is not updated during script execution, which means there is no way of providing any meaningful feedback indicating progression.  You only get to see the output after everything is completed.  On long-running scripts especially, this is frustrating as I'm not able to tell whether the script is simply eating itself or will complete in reasonable time.

3) Does anyone have a quick way to log to file?

4) Is it possible to set loop limits as a way of preventing loops from continuing for too long?  Not critical, but in the absence of immediate logging to the console, I thought it might be an option to stop long-running scripts from becoming problematic.

5) Has anyone visually debugged their way through a script in eclipse?  Any hints welcome.

6) jArchi has an irritating habit of terminating a script with no error message or log output when you forget to put a .first() on the end of assignment from a filter.  I figured out a way around this by wrapping stuff in try/catch blocks, but it seems a bit of a large hammer.  Am I missing something obvious?  (Jokers are please to refrain from pointing out that I should just remember the .first()!!! Of course!!! But if I miss it, it takes me hours to find the source of the problem).

Regards...
Michael

Phil Beauvoir

March 12, 2019, 22:23:53 PM #1 Last Edit: March 12, 2019, 23:39:08 PM by Phil Beauvoir
Hi Michael.

1). It's too early to look at this. But perhaps for the future.

2) Yes there seems to be a problem with long running operations hogging the process. We'll have to investigate this. (https://github.com/archimatetool/archi-scripting-plugin/issues/46)

3) Should be possible using standard JS file operations

4) Could use a counter increment?

5) Don't think that's possible

6) Will need to investigate this.
If you value and use Archi please consider making a donation! https://www.archimatetool.com/donate

mansley

Great, thanks Phil.  I'll try and get some data over about point 6 and attach it to the Github ticket.