With this implementation, two different ways of working with a diagram are going to be considered, one is the ‘editing’ mode and the other is the ‘reading’ mode.
This mode will allow editing and saving the diagram as we have been doing so far. The test tube that appears in the modeling tab when you first enter the diagram´s table will be changed by a pencil in this mode, to indicate that it is being edited.
This mode will allow editing and saving the diagram as we have been doing so far. The test tube that appears in the modeling tab when you first enter the diagram´s table will be changed by a eye in this mode (the eye will appear always by default), to indicate that it is being edited by other user.
The following buttons will be blocked:
Save diagram.
Delete item.
Assistants.
Validate mapping.
Drawing tools.
The other tools will be unlocked.
With the tool: 'launch validation', there is a change in how it works, it will be unlocked in both modes, but in 'reading' mode it will only send the diagram to the executor and in 'editing' mode it will work as it has until now, it will save the diagram and send the diagram to the executor.
All diagrams will be opened by default in ‘reading’ mode.
It will be indicated if the diagram is closed, if the user tries to press the lock icon and a window appears with a message saying that someone is using it also if we have the eye mark in the modelling tab the diagram is closed.
If the user wants to edit the diagram, he will do so by pressing that lock icon. And the diagram will be released changing the lock icon with a unlocked lock icon. (The user can save the diagram once he unlocked the diagram and do some changes)
It may happen that when you want to unlock a diagram (like the example when de diagram is closed) it is already being edited by another person. In this case, an alert will be displayed indicating that you cannot unlock it because it is being modified by another user (and will display his name, surname and XI).
From where a diagram can be opened?
From the diagram table: when we open a diagram from that point the diagram will appear by default in the READING state, it can only be displayed and not modified.
In the more info button. from the diagram´s table. When we consult the information in a diagram, it also opens. In this case the diagram will open by default in READING state, it can only be displayed and not modified.
By url: when a diagram is opened from direct access by
URL, its default status will be
READING, it can only be displayed and not modified.
When we import a diagram: once the diagram is imported it opens, in this case the state with which the diagram is opened will be EDITING since being a new diagram no one else will be editing it at the same time.
When we import from selenium: once the diagram is imported it opens, in this case the state with which the diagram opens will be EDITING since being a new diagram no one else will be editing it at the same time.
When we create a new diagram: nobody else will be editing it, so when we create a new diagram when accepting the modal window, the new diagram is loaded in the EDITING mode.
When we create a diagram that is a copy of a template: nobody else will be editing it therefore when we create a new diagram when accepting the modal window, the new diagram is loaded in EDITING state.
When we import messages from selenium: to import messages from selenium it will be necessary to be in the EDITING state before (otherwise the tool to import messages from selenium will be blocked) so after importing the new messages we will continue in the EDITING state.
From the assistant: to work with the mapping assistants it will be necessary to be in the EDITING state before (otherwise these tools will be blocked) so after importing the new messages we will continue in the EDITING state.
What can we do in the canvas while we are in READING mode?
We can move along the canvas.
We can zoom.
Use certain keyboard shortcuts. Keyboard shortcuts on the canvas will be disabled, except those that are unlocked button shortcuts. The enabled shortcuts are the following: zoom, the move tool, the pointer tool and the escape key to close the properties form.
Double click to see the properties of an Item, but without editing the forms. All form fields will be disabled. We can close the form from the button that has the form.
How can we change a diagram to EDITING status?
On the diagram, in the red icon bar there is a lock. That lock will be closed if we are in CLOSE or READING mode. It can only be opened if we are in READING mode. When opened it goes to the EDITING status. But it will only be possible if the diagram we have open is not being edited by another person or if the one who was editing it was the same user who tries to unlock it. If, by unlocking it, it is already being edited by another person, a modal window is displayed with the data of that user.
We can also pass the diagram to Editing mode with the keyboard shortcut: “Alt + 9”.
In the next picture we can se a blocking message when the diagram is used by another user:
When a diagram that is being edited is released? so another person can start to edit it?
Releasing a diagram means that we are no longer using it, it is considered that we stop using a resource when:
When we logout the application, the diagram we had open is released.
When we leave the modeling view by navigating to another left menu option, the diagram that we had open is released.
When the user session is automatically closed (when it expires after 30 minutes).
When we close the browser tab.
When we create a new diagram from the same tab that already had another diagram open, the resource that was previously opened will close.
When we import a new diagram from selenium in the same tab that another diagram already had open, the resource that was open in that tab will be closed.
When we import a new diagram on the same tab that another diagram already had open, the resource that was open on that tab will be closed.
When opening another diagram from the treeView, if the same tab already had a different one open, that diagram will be closed.
When opening the data management view from the modeling view, close the diagram that we had open
When all the resources that a user has open are released?
When we logout from the application button itself or when we close the browser (30 minutes later when the session expires), all the resources that the user had open will be closed.
Particular case of the button ‘launch validation’
The button ‘Launch validation’ will be unlocked in the status EDITING and in the status READING, but works differently: in EDITING status it saves the diagram and sends it to the executor, in other hand in READING status just sends the diagram to the executor.
Particular case of the button ‘export diagram’
The export diagram button is unlocked in READING and EDITING, but in EDITING status will be unlocked just if the diagram is saved.
How to know if a diagram is saved.
At the moment of saving a diagram the application compares if the one saving it is the same user that is editing it. If it’s not the same user that is editing the diagram, there will appear a window with the following sentence: “Current diagram cannot be save because current user has not permission. Reload the diagram and try to save it again.”