0

I have an exception with WorkflowCore at the end of the flow. Because I'm searching the web and there is not so much information about it.

I get an error at the end of the process

fail: WorkflowCore.Services.BackgroundTasks.WorkflowConsumer[0]
      Error executing item b40f0553-1184-4417-8aab-9d60961bd14f - Object reference not set to an instance of an object.
      System.NullReferenceException: Object reference not set to an instance of an object.
         at WorkflowCore.Services.BackgroundTasks.WorkflowConsumer.ProcessItem(String itemId, CancellationToken cancellationToken)
         at WorkflowCore.Services.BackgroundTasks.WorkflowConsumer.ProcessItem(String itemId, CancellationToken cancellationToken)
         at WorkflowCore.Services.BackgroundTasks.QueueConsumer.ExecuteItem(String itemId, EventWaitHandle waitHandle, Activity activity)

It happens every time I run flow (at the end).

I saw that this function throws the exception

GetWorkflowInstance

Has anyone seen a similar problem and can advise help?

Thanks

Panagiotis Kanavos
  • 120,703
  • 13
  • 188
  • 236
Yuval
  • 547
  • 1
  • 7
  • 14
  • Does this answer your question? [What is a NullReferenceException, and how do I fix it?](https://stackoverflow.com/questions/4660142/what-is-a-nullreferenceexception-and-how-do-i-fix-it) – Ryan Wilson Jul 19 '22 at 16:13
  • What is WorkflowCore? Workflow Foundation was never ported to .NET Core as it never caught on and only SharePoint used it at the end. The [Workflow Core package](https://github.com/danielgerlag/workflow-core) is a completely different third party project – Panagiotis Kanavos Jul 19 '22 at 16:18
  • `Do you know WorkFlowCore?` do *you*? The tags you used are unrelated. You're asking people to guess what a third party library does without even linking to it. You're asking people to guess what library you use, what may be the problem with that library without any of *your* code. Perhaps there's a bug in that library, perhaps there's a Github issue for this already. Or perhaps your implementation caused an execution error. At the very least post post a link to the library and the *full* exception text. – Panagiotis Kanavos Jul 19 '22 at 16:20
  • guys, this is the link for the workflowcore https://workflow-core.readthedocs.io/en/latest/using-with-aspnet-core/ – Yuval Jul 19 '22 at 16:23
  • Those are the docs, not the project. I linked to a possible project in my previous comment. Did you check the project site? What does *your* code do? If that library has a bug, you'll have to submit an issue that reproduces the problem. – Panagiotis Kanavos Jul 19 '22 at 16:24
  • The project behind the WorkflowCore NuGet package [has 5 issues related to NullReferenceException](https://github.com/danielgerlag/workflow-core/search?q=nullreferenceexception&type=issues) One of those may be related to your problem. Without *your* code though, we can't help. We can't even reproduce the problem – Panagiotis Kanavos Jul 19 '22 at 16:28

0 Answers0