You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
public class GenerateRandomNumberStep : StepBody
{
public int GeneratedNumber { get; set; } = 0;
public override ExecutionResult Run(IStepExecutionContext context)
{
var random = new Random();
GeneratedNumber = random.Next(1, 100); // Generate a random number between 1 and 100
Console.WriteLine($"Generated number: {GeneratedNumber}");
return ExecutionResult.Next();
}
}
And here is the Exception Message :
System.ArgumentNullException: 'Value cannot be null. (Parameter 'indexer')'
And here is the StackTrace :
at System.ArgumentNullException.Throw(String paramName)
at System.ArgumentNullException.ThrowIfNull(Object argument, String paramName)
at System.Linq.Expressions.Expression.ValidateIndexedProperty(Expression instance, PropertyInfo indexer, String paramName, ReadOnlyCollection`1& argList)
at System.Linq.Expressions.Expression.Property(Expression instance, PropertyInfo indexer, Expression[] arguments)
at WorkflowCore.Services.DefinitionStorage.DefinitionLoader.AttachDirectlyOutput(KeyValuePair`2 output, WorkflowStep step, Type dataType, LambdaExpression sourceExpr, ParameterExpression dataParameter)
at WorkflowCore.Services.DefinitionStorage.DefinitionLoader.AttachOutputs(StepSourceV1 source, Type dataType, Type stepType, WorkflowStep step)
at WorkflowCore.Services.DefinitionStorage.DefinitionLoader.ConvertSteps(ICollection`1 source, Type dataType)
at WorkflowCore.Services.DefinitionStorage.DefinitionLoader.Convert(DefinitionSourceV1 source)
at WorkflowCore.Services.DefinitionStorage.DefinitionLoader.LoadDefinition(String source, Func`2 deserializer)
The text was updated successfully, but these errors were encountered:
Describe the bug
I'm receiving this exception message when trying to use a Step with Outputs from json,
Here is my Json :
Here is RandomNumberWorkflow code :
And here is the Exception Message :
And here is the StackTrace :
The text was updated successfully, but these errors were encountered: