use of com.walmartlabs.concord.server.process.ResumeProcessResponse in project concord by walmartlabs.
the class ProcessCheckpointResource method restore.
@POST
@ApiOperation(value = "Restore process from checkpoint")
@javax.ws.rs.Path("{id}/checkpoint/restore")
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
@WithTimer
@Validate
public ResumeProcessResponse restore(@ApiParam @PathParam("id") UUID instanceId, @ApiParam @Valid RestoreCheckpointRequest request) {
UUID checkpointId = request.getId();
// TODO replace with ProcessKeyCache
ProcessEntry entry = processManager.assertProcess(instanceId);
ProcessKey processKey = new ProcessKey(entry.instanceId(), entry.createdAt());
processManager.restoreFromCheckpoint(processKey, checkpointId);
return new ResumeProcessResponse();
}
Aggregations