use of com.walmartlabs.concord.server.process.waits.AbstractWaitCondition in project concord by walmartlabs.
the class ProcessResource method setWaitCondition.
/**
* Set the process' wait condition.
*/
@POST
@ApiOperation(value = "Set the process' wait condition")
@javax.ws.rs.Path("{id}/wait")
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
@WithTimer
public Response setWaitCondition(@ApiParam @PathParam("id") UUID instanceId, @ApiParam Map<String, Object> waitCondition) {
ProcessKey processKey = assertProcessKey(instanceId);
AbstractWaitCondition condition = objectMapper.convertValue(waitCondition, AbstractWaitCondition.class);
processWaitManager.addWait(processKey, condition);
return Response.ok().build();
}
Aggregations