Skip to content

Process Framework: Simplify Event Emission in Process Steps #9510

@joslat

Description

@joslat

name: Process Framework: Simplify Event Emission in Process Steps

I would like to propose a simplification of the event emission mechanism within the Process Framework, specifically in process steps. Currently, emitting events involves multiple method calls and boilerplate code, which can make the codebase harder to read and maintain.

Proposal:
Introduce helper methods or extensions (e.g., EmitEventAsync) that streamline the event emission process.
Provide a more intuitive and concise API for emitting events from within ProcessStep implementations.

Benefits:

  • Improved Readability: Simplifies the code required to emit events, making process steps easier to understand.
  • Reduced Boilerplate: Minimizes repetitive code, leading to cleaner implementations.
  • Enhanced Developer Experience: Provides a more straightforward API for developers working with process steps.

Example:
In the ProcessDemoGraphNodesEdges project, on the reference implementation, we can see areas where event emission could be simplified. By adopting this proposal, the implementations in Process.Abstractions, Process.Core, and Process.LocalRuntime would become more streamlined.

References:
Branch: joslat-process-framework-graph-edges
Relevant classes: KernelProcessStepContextExtensions, KernelProcessStepSingleFunction


Metadata

Metadata

Assignees

Labels

Projects

Status

Sprint: Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions