Service Layer
...
If the executionStatus is CANCELED or DONE then a 400 Bad Request no action is taken and a 2xx (204?) status is returned.
To view and cancel submissions in the Synapse Portal:
Add a leaderboard widget, including an executionStatus column. The query should use 'where userId==@CURRENT_USER' to show just the submitter's jobs.
Choose the 'stop button' renderer for this column.
The button shows "CANCEL" when the state is "INITIALIZED" or "RUNNING". Otherwise the button is disabled and cell displays "Cancel Requested", "Canceled" or "Done".
...