danielgerlag / danielgerlag/workflow-core

[Proposal] Add IServiceScope support so that steps can get same service instances from this scope

Open
#1,231 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
5.9k
Forks
1.3k
Avg merge
1d 1h
Merged PRs (30d)
5

Description

**Is your feature request related to a problem? Please describe.**

I have a scoped service `IMyService` and get an `IMyService` instance from a scope, I hope that all steps will obtain the same `IMyService` instance when the workflow is running. This can prevent the services between multiple workflows from interfering with each other.

**Describe the solution you'd like**

Add a method to `IWorkflowController` called `StartWorkflowWithScope`, which accept an additional parameter `IServiceScope`, and then save it in `WorkflowInstance`

**Describe alternatives you've considered**

None

**Additional context**

I would like to make a pull request for this.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.