Sparx Systems Forum

Pro Cloud Server / Prolaborate / WebEA => PCS General Board => Topic started by: wivel on March 25, 2022, 11:20:10 pm

Title: Where do I set EAworker diagram generation options?
Post by: wivel on March 25, 2022, 11:20:10 pm
Hi.

Does anyone know how and where to set the EAWorker options for generating diagram images?

I have configured my local EA to not use bold element names and to show both Name and alias on elements. It works fine when I work in EA, but it seems to be overwritten by the EA Default options by the EAWorker, when it generates images for WebEA.

What happens is:
- I save a diagram in EA
- When I look at it in WebEA, it shows the diagram image with the same options as mentioned above.
- After 5 to 30 seconds, the diagram image in WebEA changes back to using bold element names an only showing Alias or Name on elements.

It seems to me that that change happens when the EAWorker kicks in, and so, I would like to know how to change the EAWorker options?

I have tried logging in on my own machine with the EAWorker User ID and Password, but that, of course, shows my own settings.

Do I have to start EA on the same machine as the EAWorker runs and change the settings there or is there a more clever way of doing it?

Henrik
Title: Re: Where do I set EAworker diagram generation options?
Post by: Modesto Vega on March 26, 2022, 01:48:04 am
Interesting, the behaviour you are describing is different from the one we see.
What happens is:
- I save a diagram in EA
- When I look at it in WebEA, it shows the diagram image with the same options as mentioned above.
We don't see this behaviour, saving a diagram in EA does not result on a diagram appearing in WebEA.

I have tried logging in on my own machine with the EAWorker User ID and Password, but that, of course, shows my own settings.
What type of account do you use for the EAWorker User ID and Password? An Active Directory account?

Do you use model secutiry? We are having some difficulty configuring the EAWorker.

In a reply to another post, https://sparxsystems.com/forums/smf/index.php/topic,46274.0.html, Drakos suggested that to install a custom MDG for the EAWorker to use, you need to install EA on the machine hosting PCS. If this is the only solution, it is INMO a design flaw.

INMO if an MDG has been deployed as part of the model, it should be deployed to PCS and we available for WebEA.
Title: Re: Where do I set EAworker diagram generation options?
Post by: wivel on March 28, 2022, 09:01:28 pm
Can see that my question can be misunderstood, so to clarify.

The saved diagrams do not appear in the webbrowser in WebEA untill I refresh the page (CTRL+R, since I am on Windows at the moment). After the first refresh, the diagram looks at it does in EA, but after repeated browser refreshes in WebEA, it changes to show the diagram with default options, in my case, old element names and only showing the element Alias and not the element name.

We are using model security, and the EAWorker user is a regular EA User and not an Active Directory account.

I have read the post you mention regarding the MDG, nd it seems to be a variation of the theme, i.e. you must have EA installed on the PCS machine to make changes to defaut behaviour and to instale MDG's for WebEA to acknowledge.

Henrik
Title: Re: Where do I set EAworker diagram generation options?
Post by: Modesto Vega on March 29, 2022, 03:12:04 am
Thank you Henrik.
We are using model security, and the EAWorker user is a regular EA User and not an Active Directory account.

Are you using HTTPS? The reason for the question is that we are seeing the following error when we try to use a regular EA User.

Code: [Select]
2022-03-25 12:11:51 [WARNING]: ERROR:  Pro Cloud Server: The http connection reported the following error: 12014
2022-03-25 12:11:51 [WARNING]: ERROR:  Pro Cloud Server: The password was not allowed

We have an ongoing support case open but I think it is going to get a while to get a resolution.

Edit: I forgot to ask, what rights/permissions have you given to the standard EA User?
Title: Re: Where do I set EAworker diagram generation options?
Post by: wivel on March 29, 2022, 11:41:11 am
You are welcome.

Since the model is only visible on the companys intranet, we are not using HTTPS at the moment.

As for the rights/permissions, I assume you are referring the the EAWorker user? It has all user permissions except for 'Configure Model Add-Ins', 'Configure External Data Sources' and 'Visibility Level Admin'.

Henrik
Title: Re: Where do I set EAworker diagram generation options?
Post by: wivel on March 30, 2022, 09:03:10 pm
It just occurred to me, that, in my mind, The EAWorker's job is to generate diagram images only when it is not present in WebEA, but in my case, it seems that all diagrams are being regenerated.

Is that how it is supposed to work, or is it a bug?

Henrik
Title: Re: Where do I set EAworker diagram generation options?
Post by: Modesto Vega on March 30, 2022, 09:21:03 pm
My understanding is that the role of the worker is generate diagram images for each diagram that has been modified using the desktop tool, and keep those images up to date. Based on the behaviour we have seen so far, it sits there "listening" and every few seconds or minutes springs into action an generates/regenerates diagram.

There are a couple of things I don't understand.
1) The worker as a process is started and terminated by PCS. So I do not understand why it cannot always run using the account used to run the PCS service. Having to use a valid model user if model security is enabled makes no sense to me, but maybe there is a good reason for this.

2) I do not understand why PCS does not generate an image each time the diagram is saved using the desktop tool and just leave the image untouched.

Lastly I have noticed some registry keys on the server related to the worker, I found them under HKEY_CURRENT_USER\SOFTWARE\Sparx Systems\SQLBridge. They appear to be user specific and this puzzles me because I would expect them to apply to the whole server.

One of those keys is the path to a project 'start' file, EAExample.eap. I wonder is replacing the project starter or changing any other settings will affect the behaviour if WebEA.
Title: Re: Where do I set EAworker diagram generation options?
Post by: wivel on March 30, 2022, 11:48:59 pm
My understanding is that the role of the worker is generate diagram images for each diagram that has been modified using the desktop tool, and keep those images up to date. Based on the behaviour we have seen so far, it sits there "listening" and every few seconds or minutes springs into action an generates/regenerates diagram.

That is also how I see it now, but I was under the impression that the EAWorker only generated missing diagram images and left already generated images alone. Generating all diagram images is an ussue for us, since we have a large repsoitory, where different pojects/groups are using different diagram options. When using EAWorker, these options will be ignored since the diagram images are being regenerated using the options stored on the PCS Server. In our case the default options, since we have not installed EA there.

1) The worker as a process is started and terminated by PCS. So I do not understand why it cannot always run using the account used to run the PCS service. Having to use a valid model user if model security is enabled makes no sense to me, but maybe there is a good reason for this.

The EAWorker can be considered being a headless EA instance running as a service on the PCS Server, which is why it needs an EA user account to work. That also explains why you need to install a local EA instance on the PCS server and log on as the EAWorker user in order to e.g. install MDG's and change diagram options.

2) I do not understand why PCS does not generate an image each time the diagram is saved using the desktop tool and just leave the image untouched.

It does, if you ask it to do so in EA (Configure -> Options -> Cloud -> Data Cache), but it works only if you physically save the diagrams in EA. When copy/pasting packages or importing packages containing diagrams, images will not be generated, resulting in the 'Diagram Image Not Found' error in WebEA. That is the issue we tried to solve using the EAWorker.

Lastly I have noticed some registry keys on the server related to the worker, I found them under HKEY_CURRENT_USER\SOFTWARE\Sparx Systems\SQLBridge. They appear to be user specific and this puzzles me because I would expect them to apply to the whole server.

One of those keys is the path to a project 'start' file, EAExample.eap. I wonder is replacing the project starter or changing any other settings will affect the behaviour if WebEA.

You can configure the EAWorker using the PCS config tool, and you configure it per PCS connection. The 'start' file is not an option there, so I assume it is there since the EAWorker is running as a headless EA instance and thus need a repository. I don thing it uses it for other reasons than to be able to run.

You could argue, that using the EAWorker you can ensure that all of you diagrams will adhere to the same standards. The downside is that the diagram images shown in WebEA might not look like the coresponding diagrams in EA, which is the issue at us.

We have decided not to use the EAWorker. If you copy/paste packages or import, it is your responsibility to manually generate the diagram images. (Configure -> Options -> Cloud -> Data Cache -> Create -> Only missing Items)

I would like to see an option, where the EA Worker only generated missing diagrams, but it still doenst solve the issue with different diagram options for different groups/projects.

Henrik
Title: Re: Where do I set EAworker diagram generation options?
Post by: Modesto Vega on March 31, 2022, 01:51:57 am
We have decided not to use the EAWorker. If you copy/paste packages or import, it is your responsibility to manually generate the diagram images. (Configure -> Options -> Cloud -> Data Cache -> Create -> Only missing Items)
Thank you Henrik, really much appreciated. You have just provided a solution to the last wrinkle we had in our WebEA deployment. We will not use the EAWorker and make each user responsible for generating the diagram images used by WebEA.
Title: Re: Where do I set EAworker diagram generation options?
Post by: wivel on March 31, 2022, 02:02:18 am
You are welcome. Glad that our experiences can be of use for others as well.

One word of caution, though. If you choose to regenerate all images and/or linked documents, they wil be generated using the local Diagram settings of the user regenerating them.

Henrik
Title: Re: Where do I set EAworker diagram generation options?
Post by: Geert Bellekens on March 31, 2022, 04:06:11 am
IIRC there is also a settings that creates the images automatically when saving a diagram, so no need for a user to take manual action.

Geert
Title: Re: Where do I set EAworker diagram generation options?
Post by: wivel on March 31, 2022, 06:55:15 pm
IIRC there is also a settings that creates the images automatically when saving a diagram, so no need for a user to take manual action.

Geert
Hi Geert

We have enablet these settings, and creating diagram images when saving a diagram in EA works fine. There is a corner case, as I have mentioned earlier in this post, that if you copy/paste or import packages containing diagrams into the model repsoitory, diagram images will not be created, for those diagrams. It was that issue we tried to get around by using EAWorker.

I will create an enhancement request, to have diagram images created also when copy/pasting and importing packages containing diagrams. That would solve it for us.

Henrik 
Title: Re: Where do I set EAworker diagram generation options?
Post by: Modesto Vega on March 31, 2022, 07:10:31 pm
Just for clarity the setting we are all referring to is Configure -> Options -> Cloud -> Data Cache -> Auto create Diagram Image and Image Map (each time a Diagram is saved) with the checkbox ticked.

Henrik - You have my vote on the enhancement.
Title: Re: Where do I set EAworker diagram generation options?
Post by: Modesto Vega on April 02, 2022, 03:49:05 am
A significant part of the issue here is Sparx EA idiosyncratic way of identifying that a diagram has changed. It is actually possible to make changes to diagram elements without Sparx EA detecting that the diagram has changed - i.e., putting an '*' on the left hand-side of the diagram name. For example, I have the notes/description of various elements in a diagram and, as long as I do not change the diagram layout, Sparx EA does not detect a change; as result I cannot save the diagram and regenerate the cached diagram image.

The worker could play a critical in solving this.
Title: Re: Where do I set EAworker diagram generation options?
Post by: Paolo F Cantoni on April 02, 2022, 01:25:33 pm
A significant part of the issue here is Sparx EA's idiosyncratic way of identifying that a diagram has changed. It is actually possible to make changes to diagram elements without Sparx EA detecting that the diagram has changed - i.e., putting an '*' on the left-hand side of the diagram name. For example, I have the notes/description of various elements in a diagram and, as long as I do not change the diagram layout, Sparx EA does not detect a change; as result, I cannot save the diagram and regenerate the cached diagram image.

The worker could play a critical in solving this.
Modesto,
That's because you are modelling, not diagraming.  If the diagram layout hasn't changed, then the diagram hasn't changed.  It may be a moot point that if you change the name of something that is visible on a diagram that the diagram has changed (I would expect so), However, if there is no visible change then the diagram hasn't changed, in my view; so it's not TOO idiosyncratic.

HTH,
Paolo
Title: Re: Where do I set EAworker diagram generation options?
Post by: Modesto Vega on April 04, 2022, 07:01:12 pm
Paolo,
I get the difference between modelling and diagramming but the only thing that triggers a diagram change, a saveable diagram change, is a layout change. A name change does not trigger a saveable diagram change. This is not a huge issue but it would be nice if an enhancement is made to trigger a saveable diagram change when an element name changes.

P.S.: Health warning, I have only tested this with packages or elements extending packages.
Title: Re: Where do I set EAworker diagram generation options?
Post by: wivel on April 05, 2022, 10:47:49 pm
Saving a diagram only when the layout has changed, makes perfectly sense in 'classic' EA, but not so much when WebEA is added to the equation.

Seems to me that either we have to live with diagrams in WebEA, that might not correspond to the diagrams in EA, or to have EAWorker regenerate all diagram images based on the same EA diagram settings, set on the PCS Server.

When generating the diagrams manually, You can generate only 'stale' diagrams and/or linked documents. The documentation does not mention what it is, so I tried to change the text in a note, so see if the diagram then became stale. It didn't, so it wasn't generated.

Will put on my thinking cap and see if I can come up with a brilliant solution. Feel free to chip in :)

Henrik
Title: Re: Where do I set EAworker diagram generation options?
Post by: wivel on April 07, 2022, 09:21:02 pm
A name change does not trigger a saveable diagram change. This is not a huge issue but it would be nice if an enhancement is made to trigger a saveable diagram change when an element name changes.

Changing an element name can cause multiple diagrams to change. There are numerous causes for diagram contents to change without it being a saveable diagram layout change, e.g. changing notes, text, element names as already stated, element state when using diagram legends with 'Apply auto color', charts, custom SQL and I'm sure the list is longer. And there is also the case when importing diagrams into an EA repository

I see tow possible solutions. In sure there are more, but my limited intellectual capacity is at play here :)

Any thoughts?

Henrik
Title: Re: Where do I set EAworker diagram generation options?
Post by: Modesto Vega on April 19, 2022, 07:30:35 pm
It is a tricky one. My first reaction to the EAWorker and the role it plays was: "why is it needed?", "why are the diagrams not generated on the fly by PCS?". If I were to question that reaction and find a use case for the worker, I would say that it may make sense in the context of a publication workflow - i.e., to publish content which is ready for review or publication, content that has reached a pre-defined elaboration status. This is, of course, not the way Sparx works. Furthermore, the EAWorker could never be used in this way unless Sparx undergoes significant changes because the worker only publishes diagram images with any other content automatically published.

The main issue I have with WebEA with a fully functional EAWorker is that it makes all content available irrespective of whether it is ready to be shared or not.

Title: Re: Where do I set EAworker diagram generation options?
Post by: wivel on April 20, 2022, 07:55:11 pm
Yep, when you start to dig bit deeper, the solution seems more murky than I first imagined. There are the issues regarding and when a diagram is 'dirty', when and how EA Worker should regenerate diagram images, and how to handle copy/paste and imported images.

What you are touching here is, as I see it, only partly related to the EAWorker issue. In general, EA lacks review/publication functionality, that makes possible to 'finish up' in EA and having it reviewed before it gets published in WebEA. And then again, for review purposes, it should be published in WebEA, but only for those who need to review it, which brings up versioning? How can keep the original diagrams visible to the general public, while having the next version available for the reviewers. And how to promote once the new diagrams have been approved?

My brain hurts.

Henrik