Closed KaiTries closed 3 weeks ago
TO-DOs before merge:
TD ontology wraps Thing Descriptions in ResourceProfiles to more closely represent the resources.
@KaiTries, I observe the following issue:
Agent bodies are initialized as CArtAgO artifacts, but focusing on them leads to a NullPointerException
and a 500 server error.
Probable Reason
In CartagoVerticle.focus()
, the body artifact name is passed as artifactName
(e.g. artifactName = agent0
, given that bodies are named based on the X-Agent-LocalName
header value).
However, in Workspace.makeAgentBodyArtifact()
(cartago 3.2), body artifacts are initialized with names in the form "body_" + body.getAgentId().getAgentName()
(e.g, body_https://wiser-solid-xi.interactions.ics.unisg.ch/agent0/profile/card#me
, given that agents are named based on the X-Agent-WebID
).
Therefore, the body artifact cannot be found in the workspace due to name mismatch (probably line 349).
To reproduce
Join a workspace
curl --location --request POST 'http://172.27.52.55:8080/workspaces/61/join' \
--header 'X-Agent-WebID: https://wiser-solid-xi.interactions.ics.unisg.ch/agent-a/profile/card#me' \
--header 'X-Agent-LocalName: agent0'
Focus on the body of the joined agent
curl --location 'http://172.27.52.55:8080/workspaces/61/focus' \
--header 'X-Agent-WebID: https://wiser-solid-xi.interactions.ics.unisg.ch/agent-n/profile/card#me' \
--header 'Content-Type: application/json' \
--data '{
"artifactName" : "agent0",
"callbackIri" : "http://localhost:8081/notifications/"
}'
Thanks for the detailed report @danaivach. This issue went under the radar because we only tested for focusing on workspaces and artifacts.
Main changes: