-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
NullReferenceException after upgrading 3.4.0 -> 3.8.1 #1155
Comments
@danielgerlag any news on that one? still throwing. Fix is easy - just put a question mark there. Any idea why this happens? How should we write our steps to avoid this problem? We inherit the StepBody or StepBodyAsync |
this happens for the using System;
using WorkflowCore.Models;
namespace WorkflowCore.Primitives
{
public class EndStep : WorkflowStep
{
public override Type BodyType => null;
public override ExecutionPipelineDirective InitForExecution(
WorkflowExecutorResult executorResult,
WorkflowDefinition defintion,
WorkflowInstance workflow,
ExecutionPointer executionPointer)
{
return ExecutionPipelineDirective.EndWorkflow;
}
}
} which explicitly sets this property to null |
Thanks for discovering that. We should not set the BodyType to null in the EndStep, that would be the correct solution. |
Does anyone have any workarounds for this? Our build system needs the System.Linq.Dynamic.Core bump in v3.10 but our workflow no longer works after v3.6.2, when the open telemetry stuff was put in. |
We upgraded our library from 3.4.0 to 3.8.1.
We use PostgreSQL 14 as our backend and had to do a "manual upgrade" of the DB because the EF version used by the library wasn't supported by the the version we had.
Now things work most of the time but we have cases where interacting with the workflows raises
NullReferenceException
s.Looking at the code it happens in
WorkflowActivity.Enrich(WorkflowStep workflowStep)
at line 65:our
workflowStep.BodyType
isnull
because we useStepBodyAsync
(as described in https://workflow-core.readthedocs.io/en/stable/getting-started/) and not theWorkflowStep
class.We also see log entries like
[11:17:09 WorkflowCore.Services.WorkflowExecutor DBG] Starting step null on workflow eca3fed6-42bf-4ec8-b21b-72261e995ed7
for the same reason.I didn't see any release notes mentioning a breaking change.
Is this a bug or do we need to make some changes?
We also see some
DbUpdateException
because ofScheduledCommand
unique index constraint failing.Are these also expected?
Cheers.
The text was updated successfully, but these errors were encountered: