optimajet / WorkflowEngine.NET

WorkflowEngine.NET - component that adds workflow in your application. It can be fully integrated into your application, or be in the form of a specific service (such as a web service).
https://workflowengine.io
870 stars 246 forks source link

PersistenceProvider.GetProcessInstancesAsync SQL Error #128

Closed LiubomyrSkalskyi closed 1 year ago

LiubomyrSkalskyi commented 2 years ago

System.AggregateException: 'One or more errors occurred. (An object or column name is missing or empty. For SELECT INTO statements, verify each column has a name. For other statements, look for empty alias names. Aliases defined as "" or [] are not allowed. Change the alias to a valid name.)'

betine commented 2 years ago

Can you send us a full stack trace of this exception?

LiubomyrSkalskyi commented 2 years ago

at OptimaJet.Workflow.DbPersistence.DbObject1.<SelectAsync>d__19.MoveNext() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable1.ConfiguredTaskAwaiter.GetResult() at OptimaJet.Workflow.DbPersistence.DbObject1.<SelectAllWithPagingAsync>d__10.MoveNext() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable1.ConfiguredTaskAwaiter.GetResult() at OptimaJet.Workflow.DbPersistence.MSSQLProvider.d__22.MoveNext()

LiubomyrSkalskyi commented 2 years ago

Here is Inner Exception stack trace: at Microsoft.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction) at Microsoft.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction) at Microsoft.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) at Microsoft.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) at Microsoft.Data.SqlClient.SqlDataReader.TryConsumeMetaData() at Microsoft.Data.SqlClient.SqlDataReader.get_MetaData() at Microsoft.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted) at Microsoft.Data.SqlClient.SqlCommand.CompleteAsyncExecuteReader(Boolean isInternal, Boolean forDescribeParameterEncryption) at Microsoft.Data.SqlClient.SqlCommand.InternalEndExecuteReader(IAsyncResult asyncResult, Boolean isInternal, String endMethod) at Microsoft.Data.SqlClient.SqlCommand.EndExecuteReaderInternal(IAsyncResult asyncResult) at Microsoft.Data.SqlClient.SqlCommand.EndExecuteReaderAsync(IAsyncResult asyncResult) at System.Threading.Tasks.TaskFactory1.FromAsyncCoreLogic(IAsyncResult iar, Func2 endFunction, Action1 endAction, Task1 promise, Boolean requiresSynchronization) --- End of stack trace from previous location --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at OptimaJet.Workflow.DbPersistence.DbObject1.<SelectInternalAsync>d__26.MoveNext() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable1.ConfiguredTaskAwaiter.GetResult() at OptimaJet.Workflow.DbPersistence.DbObject`1.d__19.MoveNext()

betine commented 2 years ago

Can you please describe the case when this exception occurs? It is not obvious from this stack trace.

LiubomyrSkalskyi commented 2 years ago

I'm just testing the package functionality to be sure it fits with my current project. I'm calling WorkflowInit.Runtime.PersistenceProvider.GetProcessInstancesAsync() to load the processes It is the Console app like in the How to Integrate article, running .Net Core 3.1 connected with MSSQL Server

LiubomyrSkalskyi commented 2 years ago

image

LiubomyrSkalskyi commented 2 years ago

Does it make sense? Because I didn't find any documentation on that method

betine commented 2 years ago

Now it is clear, this bug will be fixed soon. Thank you for the report.

rylee-soll commented 2 years ago

Hello, I took this bug to work.

Please, send:

  1. Full code that causes this exception.
  2. Version of dotnet, Workflow Engine and SqlServer used.