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

Construct workflows using container during mapping #157

Closed
adenhertog opened this issue Nov 3, 2021 · 0 comments · Fixed by #169 or #170
Closed

Construct workflows using container during mapping #157

adenhertog opened this issue Nov 3, 2021 · 0 comments · Fixed by #169 or #170
Labels
enhancement New feature or request

Comments

@adenhertog
Copy link
Contributor

Task
workflow-registry.ts:87 constructs an instance, rather than getting it from the container when a container is available. The standard runtime behaviour is to pull it from the container (workflow-registry.ts:155), and it'd be good to have this consistent so that access to dependencies is available during startup & mapping.

Background
Per discord with Roustalski

Actually, for the second, I was able to use the Workflow pattern to achieve what we were trying to accomplish. It allows us to specify handlers in a single place, but also allows us to use our injection tool to pass off messages to a service
However, we can't use injected variables during the configuration of the workflow since an instance is created by the registry just to setup the mapper. I have a workaround, but I think the container should be used in order to create the instance to configure the mapper rather than newing it up directly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant