c# 异步方法
标签:ova conf lse user tap not var inf new
private async void DynamicWorkflowAsyncCallBack()
{
await System.Threading.Tasks.Task.Run(() =>
{
if (string.IsNullOrEmpty(nodeName) || nodeName == CurrentWorkItem.Name)
{
Thread.Sleep(2000);
}
var actionDomain = AutofacContainer.Resolver.Resolve();
var action = actionDomain.GetByTaskId(Task.TaskId);
if (action == null || action.ActionName == "撤回")
return;
var workflowNodeConfigInfoDal = AutofacContainer.Resolver.Resolve();
var node = workflowNodeConfigInfoDal.Find(Instance.WorkflowName, CurrentWorkItem.Name);
if (node == null || !node.ShouldCallback || string.IsNullOrEmpty(node?.CallbackUrl))
return;
var approveInfo = CallbackHelper.GetApproveInfo(Instance.RecordId);
DynamicWorkflowCallBackRequest request = new DynamicWorkflowCallBackRequest();
request.CallbackUrl = node.CallbackUrl;
request.RecordId = Instance.RecordId.ToString();
request.ApprovalResults = action.ActionName != "驳回";
request.Approver = approveInfo.ApproveUser;
request.NodeName = node.NodeName;
request.NodeDisplayName = node.NodeDisplayName;
request.NextNodeName = nodeName;
request.NextNodeDisplayName = nodeDisplayName;
Callback(request);
if (node.IsGaea)
{
Callback(request);
}
else
{
CallbackForNotGaea(request);
}
});
}
c# 异步方法
标签:ova conf lse user tap not var inf new
原文地址:https://www.cnblogs.com/xuguanghui/p/10270662.html
文章来自:
搜素材网的
编程语言模块,转载请注明文章出处。
文章标题:
c# 异步方法
文章链接:http://soscw.com/essay/96203.html
评论