Skip to content

Why does the workflow need a httpcontext? #16254

Answered by weirdyang
weirdyang asked this question in Q&A
Discussion options

You must be logged in to vote
                using (ShellScope shellScope = await _shellHost.GetScopeAsync("Default"))
                {
                    await shellScope.UsingAsync(async scope =>
                    {
                        if (scope != null)
                        {
                            _httpContextAccessor.HttpContext = scope.ShellContext.CreateHttpContext();
                            IWorkflowManager manager = scope.ServiceProvider.GetRequiredService<IWorkflowManager>();
                            var messageData = new Dictionary<string, object>
                        {
                            { "value", cr.Message.Value is null ? "" : cr.Message.Value.ToString() },
          …

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@Piedone
Comment options

@weirdyang
Comment options

Answer selected by weirdyang
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants