コード例 #1
0
        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));
        }
コード例 #2
0
        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));
        }