danielgerlag / danielgerlag/workflow-core
host.Start()启动后的host对象和从容器获取的IWorkflowHost对象不一样
- Dominant language
- C#
- Stars
- 5.9k
- Forks
- 1.3k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 5
Description
**Describe the bug**
host.Start()启动后的host对象和从容器获取的IWorkflowHost对象不一样,从容器获取的IWorkflowHost对象无法启动工作流,提示工作流未注册。
`
//启动代码片段
var host = provider.GetService();
host.RegisterWorkflow();
host.Start();
CommonUtitl.workflowHost = host; //保存对象全局使用
`
`
string id = "TestWorkflow";
int version = 1;
string workflowId = null;
var def = _registry.GetDefinition(id, version); //结果:null
var def2 = CommonUtitl.workflowHost.Registry.GetDefinition(id, version); //结果:有值
var tt = CommonUtitl.workflowHost == _workflowHost; //结果:不相等
`

**To Reproduce**
**Expected behavior**
从容器获取的IWorkflowHost对象和host.Start();后一样
**Additional context**
Add any other context about the problem here.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.