Create plugin that shares the collab mgr session id and metadata about selected element(s) in a Capella model
Opened this issue · 9 comments
The idea is to create an addon (deployable .jar that can be put into the dropins
folder of a Capella installation).
Requirements:
R1
The plugin shall automatically be activated when Capella starts
R2
When the plugin has been activated, it shall identify the Capella Collaboration Manager session id once.
Comment: The Capella Collaboration Manager session id will be provided as environment variable CAPELLACOLLAB_SESSION_ID
as documented here.
R3
The plugin shall run a timer with a frequency of 500 ms
R4
When the timer runs a loop, the plugin shall determine the (list of) selected element(s) and information about the corresponding Capella model (project)
R5
When the timer runs a loop and the selection of elements differs from the previous loop, the plugin shall send (HTTP POST request) the following data:
[
{
"element_uuid": "...",
"element_name": "...",
"model_uuid": "...",
"model_path": "..."
}
]
R6
The plugin shall send the data to a network host that will be specified in the environment variable SELECTED_ELEMENTS_SERVICE_TARGET_URL
. The endpoint will accept a parameter named capellacollab_session_id
.
Comment: The HTTP POST request will be sent to https://host/endpoint?capellacollab_session_id=(...)
Implementation status:
- R1
- R2
- R3
- R4
- R5
- R6
This issue is related to: DSD-DBS/capella-collab-manager#1016
Hi @MoritzWeber0,
I think a better structure for the JSON data is an array of selected elements:
[
{
"uuid": "{uuid_of_element}",
"name": "{name_of_selected_element}",
"model_uuid": "{uuid_of_model}",
"model_path": "{path_to_model_relative_to_workspace}"
}
]
That is simple and clear (also in the needed Java code)
Hi @MoritzWeber0,
I think a better structure for the JSON data is an array of selected elements:
[ { "uuid": "{uuid_of_element}", "name": "{name_of_selected_element}", "model_uuid": "{uuid_of_model}", "model_path": "{path_to_model_relative_to_workspace}" } ]That is simple and clear (also in the needed Java code)
This structure of also fine for me.
Ah, well. Now I forgot about the collab manager session id :-)
Sorry. Another proposal:
{
"collab_manager_session_id": "...",
"selected_model_elements": [
{
"uuid": "...",
"name": "...",
"model_uuid": "...",
"model_path": "..."
}
]
}
The model meta data will be provided per selected element, because it is possible to select multiple elements across multiple models:
Ah, well. Now I forgot about the collab manager session id :-)
Sorry. Another proposal:{ "collab_manager_session_id": "...", "selected_model_elements": [ { "uuid": "...", "name": "...", "model_uuid": "...", "model_path": "..." } ] }The model meta data will be provided per selected element, because it is possible to select multiple elements across multiple models:
We don't need the session id in the request body. It's a path parameter in the request URL.
Alright. Can we introduce another environment variable named SELECTED_ELEMENTS_SHARE_SERVICE_TARGET_URL
?
SELECTED_ELEMENTS_SHARE_SERVICE_TARGET_URL
What would be a possible value of it? The full URL to the Collaboration Manager API endpoint where you have to send the payload to? This would be possible.
Yes, full URL with a path parameter or anything that expects the collab mgr session id which I read from the containers env var and set before sending the HTTP request.
SELECTED_ELEMENTS_SHARE_SERVICE_TARGET_URL
Want to rename this to SELECTED_ELEMENTS_SERVICE_TARGET_URL