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

host.Start()启动后的host对象和从容器获取的IWorkflowHost对象不一样 #1259

Open
zengxiansheng opened this issue May 8, 2024 · 0 comments

Comments

@zengxiansheng
Copy link

Describe the bug
host.Start()启动后的host对象和从容器获取的IWorkflowHost对象不一样,从容器获取的IWorkflowHost对象无法启动工作流,提示工作流未注册。

`
//启动代码片段
var host = provider.GetService();
host.RegisterWorkflow<TestWorkflow, MyDataClass>();
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; //结果:不相等
image

To Reproduce

Expected behavior
从容器获取的IWorkflowHost对象和host.Start();后一样

Additional context
Add any other context about the problem here.

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

No branches or pull requests

1 participant