C# Process Framework: EmitEventsAsync not passing in Data #11925
Answered
by
vicperdana
vicperdana
asked this question in
Q&A
-
I'd like to pass in a DTO through //passing in this._state in the EvaluateBlogPostStep
await context.EmitEventAsync(new() { Id = EvaluateBlogPostComplete, Data = this._state, Visibility = KernelProcessEventVisibility.Public}); And in the process builder. //parameterName "finalBlogState" is not being passed in
string EvaluateBlogPostComplete = nameof(EvaluateBlogPostComplete);
evaluateBlogPostStep
.OnEvent(EvaluateBlogPostComplete)
.SendEventTo(new ProcessFunctionTargetBuilder(publishBlogPostStep,
functionName: PublishBlogPostStep.Functions.PublishBlogPost,
parameterName: "finalblogState")); In the function [KernelFunction(Functions.PublishBlogPost)]
public async Task<VideoProcessingResponse> PublishBlogPostAsync(VideoProcessingResponse finalblogState, Kernel kernel, KernelProcessStepContext context)
{
_logger.LogInformation("Starting blog post publishing process");
VideoProcessingResponse _finalblogState = finalblogState; # this is empty
... |
Beta Was this translation helpful? Give feedback.
Answered by
vicperdana
May 8, 2025
Replies: 2 comments
-
I am using |
Beta Was this translation helpful? Give feedback.
0 replies
-
Resolved by removing the parameter as well as changing the return type to string. // Process builder
string EvaluateBlogPostComplete = nameof(EvaluateBlogPostComplete);
evaluateBlogPostStep
.OnEvent(EvaluateBlogPostComplete)
.SendEventTo(new ProcessFunctionTargetBuilder(publishBlogPostStep,
functionName: PublishBlogPostStep.Functions.PublishBlogPost));
// Function
[KernelFunction(Functions.PublishBlogPost)]
public async Task<string> PublishBlogPostAsync(string finalblogState, Kernel kernel, KernelProcessStepContext context)
{ |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
vicperdana
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Resolved by removing the parameter as well as changing the return type to string.