Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update activity capture to edit provenance when attachments change #568

Open
jaeddy opened this issue Oct 4, 2019 · 0 comments
Open

Update activity capture to edit provenance when attachments change #568

jaeddy opened this issue Oct 4, 2019 · 0 comments

Comments

@jaeddy
Copy link
Collaborator

jaeddy commented Oct 4, 2019

I've added two endpoints to the prov-service API:

  • /activities/{activityId}/used/{targetId}

This will delete the USED relationship (edge) connecting the activity to the attachment (not the node itself). targetId represents the ObjectId in the PHCCP database.

Example request:

curl -X DELETE "http://localhost:8080/rest/v1/activities/041bab42-e6d3-11e9-b935-0242ac120003/used/TargetID_29" -H "accept: */*"
  • /activities/{activityId}/used

This will create a new USED relationship for the activity, connected to a node for the attachment (which will also be created, if needed). The body of the request is matches the interface in provenance/reference.model.ts — e.g.:

{
  "class": "Resource",
  "name": "TCGA BRCA Expression",
  "role": "dataToInput",
  "subclass": "File",
  "targetId": "resource0",
  "targetVersionId": "1"
}

Example request:

curl -X PUT "http://localhost:8080/rest/v1/activities/81323828-e6f1-11e9-a793-0242ac120003/used" -H "accept: */*" -H "Content-Type: application/json" -d "{\"class\":\"Resource\",\"name\":\"TCGA BRCA Expression\",\"role\":\"dataToInput\",\"subclass\":\"File\",\"targetId\":\"resource0\",\"targetVersionId\":\"1\"}"

Similar to how we currently pipe the results of a create() event to captureProvActivity.save(), we'd need to do something similar for updateInsight() — maybe something like captureProvActivity.removeUsed() and captureProvActivity.addUsed()?

We also need to figure out a way for the portal to store or retrieve the ID for an activity...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant