Class WorkflowWebService
Three endpoints:
GET /datasets/{id}/workflow— current state + history.PUT /datasets/{id}/workflow— advance the state.GET /workflow/queue?state=...— curator worklist.
The endpoints are deliberately partitioned across two path prefixes
(/datasets/{id}/workflow and /workflow/queue); JAX-RS
dispatch is by full path, so a single resource class can serve both.
Per the handoff the queue endpoint is also a forward-compat hook for
PreboardedExperiment -- WorkflowService is what gates
datasetType today; the REST surface is type-agnostic.
- Author:
- paul
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classPer-row response ofgetWorkflowQueue(String, String, String, String, Date, OffsetArg, LimitArg).static classResponse ofgetDatasetWorkflow(Long).static classResponse ofadvanceDatasetWorkflow(Long, AdvanceWorkflowRequest). -
Constructor Summary
ConstructorsConstructorDescriptionWorkflowWebService(WorkflowService workflowService, ExpressionExperimentService expressionExperimentService) -
Method Summary
Modifier and TypeMethodDescriptionjakarta.ws.rs.core.ResponseadvanceDatasetWorkflow(Long datasetId, WorkflowWebService.AdvanceWorkflowRequest req) Advance a dataset to a new workflow state.getDatasetWorkflow(Long datasetId) Retrieve the current workflow state and full transition history of a dataset.getWorkflowQueue(String stateName, String datasetType, String datasetTypeLegacy, String assignee, Date since, OffsetArg offsetArg, LimitArg limitArg) Curator worklist: datasets currently in a given workflow state.
-
Constructor Details
-
WorkflowWebService
@Autowired public WorkflowWebService(WorkflowService workflowService, ExpressionExperimentService expressionExperimentService)
-
-
Method Details
-
getDatasetWorkflow
@GET @Path("/datasets/{id}/workflow") @Produces("application/json") public ResponseDataObject<WorkflowWebService.WorkflowStateResponse> getDatasetWorkflow(@PathParam("id") Long datasetId) Retrieve the current workflow state and full transition history of a dataset.The handoff is explicit that "history" is derived from the AUDIT_EVENT stream filtered to
WorkflowStateChangedEvent-- no separate history table. -
advanceDatasetWorkflow
@PUT @Path("/datasets/{id}/workflow") @Consumes("application/json") @Produces("application/json") @PreAuthorize("hasAuthority('GROUP_CURATOR') or hasAuthority('GROUP_ADMIN')") public jakarta.ws.rs.core.Response advanceDatasetWorkflow(@PathParam("id") Long datasetId, @Nullable WorkflowWebService.AdvanceWorkflowRequest req) Advance a dataset to a new workflow state. PUT body must includetargetState;reasonandticketIdare optional.Per the handoff Open Question 1 ("per-transition role granularity") recommendation, the first cut is permissive: any curator or admin may advance any allowed transition. The
Public -> Curatetransition additionally requires admin role + a non-empty reason (Open Question 5 recommendation). -
getWorkflowQueue
@GET @Path("/workflow/queue") @Produces("application/json") public PaginatedResponseDataObject<WorkflowWebService.WorkflowQueueEntryResponse> getWorkflowQueue(@QueryParam("state") @Nullable String stateName, @QueryParam("datasetType") @Nullable String datasetType, @QueryParam("dataset_type") @Nullable String datasetTypeLegacy, @QueryParam("assignee") @Nullable String assignee, @QueryParam("since") @Nullable Date since, @QueryParam("offset") @DefaultValue("0") OffsetArg offsetArg, @QueryParam("limit") @DefaultValue("20") LimitArg limitArg) Curator worklist: datasets currently in a given workflow state.
-