Background
Some submission are runnable. When a user submits a runnable submission to a queue, the queue's Submission Application would check and start the runnable process. This process could take a long time. We want to provide users the ability to stop their running process at anytime that it is running.
- PLFM-4091Getting issue details... STATUS
Current Work Flow
When a user A submits a submission B to queue C, an Submission (immutable object) and SubmissionStatus (mutable object) are created.
Queue C's Application starts the running process for submission B and update submission B's Submission Status.
Proposal
Add the following fields to Submission Status:
Submission Status |
---|
currentFields |
canCancel : Boolean (Default FALSE) |
cancelRequested : Boolean (Default FALSE) |
When the queue's Application starts the running process, it would change canCancel to TRUE.
Add an API that allows user to request to cancel their submissions:
Action | Intended Users | URI | Method | Request Params | Request Body | Response Body |
---|---|---|---|---|---|---|
Request to Cancel a Submission | The user who submitted the Submission | /evaluation/submission/{subId}/cancellation | PUT | None | None | None |
When a user make such request, we will check for:
- Is the user who making the request submitted the submission?
- Is canCancel's value for the request submission TRUE?
If both conditions are met, we will set the cancelRequested value to TRUE and return 200. We will throw an appropriate 400 status code for error.
The queue's Application are responsible to check for cancelRequested value and update SubmissionStatus appropriately.
Queryable Annotations
Both canCancel and cancelRequested will be added to the list of Queryable Annotations. We will also add CancelControl object to this list.
CancelControl |
---|
submissionId : String |
canCancel : Boolean |
userId : String |
cancelRequested : Boolean |
Notes:
- Add CANCELED as a submission status in the SubmissionStatus enum.