Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.Net: Process Framework: Simplify Function Event resolution when Process has only a single function #9647

Open
joslat opened this issue Nov 11, 2024 · 0 comments · May be fixed by #9650
Open
Labels
.NET Issue or Pull requests regarding .NET code triage

Comments

@joslat
Copy link
Contributor

joslat commented Nov 11, 2024


I would like to simplify the verbosity in the case of a step with a single function.

When declaring the process, isntead of:

        startStep
            .OnEvent(StartStep.OutputEvents.Executed)
            .SendEventTo(new ProcessFunctionTargetBuilder(doSomeWorkStep));

        doSomeWorkStep
            .OnEvent(DoSomeWorkStep.OutputEvents.Executed)
            .SendEventTo(new ProcessFunctionTargetBuilder(doMoreWorkStep));

        doMoreWorkStep
            .OnEvent(DoMoreWorkStep.OutputEvents.Executed)
            .SendEventTo(new ProcessFunctionTargetBuilder(endStep));

        endStep
            .OnEvent(EndStep.OutputEvents.Executed)
            .StopProcess(); 

I would like to do the following:

        startStep
            .OnFunctionResult()
            .SendEventTo(new ProcessFunctionTargetBuilder(doSomeWorkStep));

        doSomeWorkStep
            .OnFunctionResult()
            .SendEventTo(new ProcessFunctionTargetBuilder(doMoreWorkStep));

        doMoreWorkStep
            .OnFunctionResult()
            .SendEventTo(new ProcessFunctionTargetBuilder(endStep));

        endStep
            .OnFunctionResult()
            .StopProcess();

So that the Function is inferred by the framework, reducing verbosity and cognitive load.


@markwallace-microsoft markwallace-microsoft added .NET Issue or Pull requests regarding .NET code triage labels Nov 11, 2024
@joslat joslat changed the title .Net: Process Framework: Simplify event emission when Process has only a single function .Net: Process Framework: Simplify Function Event resolution when Process has only a single function Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
.NET Issue or Pull requests regarding .NET code triage
Projects
None yet
2 participants