/// <summary> /// OnWorkflowComplete Callback /// </summary> /// <remarks> /// Runs after everything else complete. /// </remarks> /// <param name="context">NativeActivityContext</param> /// <param name="completedInstance">ActivityInstance</param> private void OnWorkflowCompleteCallback(NativeActivityContext context, ActivityInstance completedInstance) { Logger.Debug("OnWorkflowCompleteCallback -> Start"); var workflowStatus = context.GetExtension <WorkflowStateData>(); WorkflowResult.Set(context, workflowStatus.Result); Logger.Debug("OnWorkflowCompleteCallback -> End"); }
/// <summary> /// OnChildWorkflowComplete Callback /// </summary> /// <remarks> /// Runs after Child workflow complete. Only for synchronous /// </remarks> /// <param name="context">NativeActivityContext</param> /// <param name="completedInstance">ActivityInstance</param> private void OnChildWorkflowCompleteCallback(NativeActivityContext context, ActivityInstance completedInstance) { Logger.Debug("OnChildWorkflowCompleteCallback -> Start"); GetWorkflowResultResponse res; using (var proxy = new Proxy.FlowTasksService()) { res = proxy.GetWorkflowResult(new GetWorkflowResultRequest { WorkflowId = WorkflowId.Get(context) }); } WorkflowResult.Set(context, res.WorkflowResultInfo.Result); Logger.Debug("OnChildWorkflowCompleteCallback -> End"); }