private async Task <IHttpActionResult> GetWorkflowAsyncCore(Guid id) { var instance = _engine.GetWorkflow(id); if (instance == null) { return(NotFound()); } var contract = new GetWorkflowResponseContract(instance); return(Json(contract)); }
public async Task <IHttpActionResult> CancelAsync(Guid id, string tag = null) { var instance = _engine.GetWorkflow(id); if (instance == null) { return(NotFound()); } instance.Cancel(); await instance.Wait(); var contract = new GetWorkflowResponseContract(instance); return(Json(contract)); }