-
Notifications
You must be signed in to change notification settings - Fork 3
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
Allow creating documents under a different initial state #52
Allow creating documents under a different initial state #52
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A test fixture, added comments on a couple lines...
"id": "Draft", | ||
"readyForUse": false | ||
}, | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the initial state we'll be testing with, "Another Init Node", in addition to "Draft"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice :)
"source": "Published", | ||
"target": "Hidden" | ||
}, | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And these two edges are new. Basically a document can go from: "Init" -> "Another Init Node" -> "Draft"
…due to being a string array instead of a label/value pair
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything seems to be working as expected...approving!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The manual testing worked well with curl, and all tests passed.
Use case
To support our work with EDPub, we'd like "Collection Metadata" documents sent from EDPub to be temporarily quarantined in a state other than "Draft"; until a curator has a chance to review it.
This is accomplished by adding a new node to the workflow and a new query parameter to the createDocument endpoint: 'initialState'
The provided initialState must satisfy these conditions:
To Test
(visit http://localhost/meditor/Workflows/Edit-Publish-CMR then click on Document JSON and paste in the attached JSON)
(This part you may need help with, was a chore to figure out authentication via Postman)
/meditor/api/models/Collection Metadata/documents?initialState=From EarthdataPub
endpoint, note the initialState.