I posted debug from Architect Trace. This one below is from log and I believe it’s the one you are looking for.
2017-10-04 13:46:59,870 [2080] ERROR CZ.Advantages.Asap.Workflow.DataServiceAgent [(null)] <(null)> - Updating references failed.
System.InvalidCastException: Specified cast is not valid.
at CZ.Advantages.Asap.DA.Service.AbstractDataService.GetLog(DataTable table, UserProfile profile, String transactionId, Int32 overrideActionType)
at CZ.Advantages.Asap.DA.Service.AbstractSqlDataService.LogData(DataTable changedTable, UserProfile profile, String transactionId, IDbConnection connection, IDbTransaction transaction, Int32 overrideActionType)
at CZ.Advantages.Asap.DA.Service.AbstractSqlDataService.UpdateField(Guid entityId, Guid fieldId, Object oldValue, Object newValue, IPrincipal userProfile, String transactionId)
at CZ.Advantages.Asap.Workflow.DataServiceAgent.UpdateReferences(Guid entityId, Object oldValue, Object newValue) in d:\BuildServer\TeamCity\buildAgent\work\4d047c3a021b26c8\architect\CZ.Advantages.Asap.Workflow\Service Agents\DataServiceAgent.cs:line 349
2017-10-04 13:46:59,882 [2080] ERROR CZ.Advantages.Asap.Workflow.WorkflowEngine [(null)] <(null)> - ServiceMethodCallTask 02_UpdateReferences failed.
2017-10-04 13:46:59,883 [2080] ERROR CZ.Advantages.Asap.Workflow.WorkflowEngine [(null)] <(null)> - Specified cast is not valid.
CZ.Advantages.Asap.AsapException: Specified cast is not valid. —> System.InvalidCastException: Specified cast is not valid.
at CZ.Advantages.Asap.DA.Service.AbstractDataService.GetLog(DataTable table, UserProfile profile, String transactionId, Int32 overrideActionType)
at CZ.Advantages.Asap.DA.Service.AbstractSqlDataService.LogData(DataTable changedTable, UserProfile profile, String transactionId, IDbConnection connection, IDbTransaction transaction, Int32 overrideActionType)
at CZ.Advantages.Asap.DA.Service.AbstractSqlDataService.UpdateField(Guid entityId, Guid fieldId, Object oldValue, Object newValue, IPrincipal userProfile, String transactionId)
at CZ.Advantages.Asap.Workflow.DataServiceAgent.UpdateReferences(Guid entityId, Object oldValue, Object newValue) in d:\BuildServer\TeamCity\buildAgent\work\4d047c3a021b26c8\architect\CZ.Advantages.Asap.Workflow\Service Agents\DataServiceAgent.cs:line 386
at CZ.Advantages.Asap.Workflow.DataServiceAgent.Run() in d:\BuildServer\TeamCity\buildAgent\work\4d047c3a021b26c8\architect\CZ.Advantages.Asap.Workflow\Service Agents\DataServiceAgent.cs:line 598
at CZ.Advantages.Asap.Workflow.Tasks.ServiceMethodCallEngineTask.OnExecute() in d:\BuildServer\TeamCity\buildAgent\work\4d047c3a021b26c8\architect\CZ.Advantages.Asap.Workflow\Tasks\ServiceMethodCallEngineTask.cs:line 154
at CZ.Advantages.Asap.Workflow.Tasks.AbstractWorkflowEngineTask.Execute() in d:\BuildServer\TeamCity\buildAgent\work\4d047c3a021b26c8\architect\CZ.Advantages.Asap.Workflow\Tasks\AbstractWorkflowEngineTask.cs:line 101
— End of inner exception stack trace —
2017-10-04 13:46:59,890 [2080] ERROR CZ.Advantages.Asap.Workflow.WorkflowEngine [(null)] <(null)> - TransactionWorkflowBlock 01_TransactionMerge failed.
2017-10-04 13:46:59,890 [2080] ERROR CZ.Advantages.Asap.Workflow.WorkflowEngine [(null)] <(null)> - Specified cast is not valid.
CZ.Advantages.Asap.AsapException: Specified cast is not valid. —> CZ.Advantages.Asap.AsapException: Specified cast is not valid. —> System.InvalidCastException: Specified cast is not valid.
at CZ.Advantages.Asap.DA.Service.AbstractDataService.GetLog(DataTable table, UserProfile profile, String transactionId, Int32 overrideActionType)
at CZ.Advantages.Asap.DA.Service.AbstractSqlDataService.LogData(DataTable changedTable, UserProfile profile, String transactionId, IDbConnection connection, IDbTransaction transaction, Int32 overrideActionType)
at CZ.Advantages.Asap.DA.Service.AbstractSqlDataService.UpdateField(Guid entityId, Guid fieldId, Object oldValue, Object newValue, IPrincipal userProfile, String transactionId)
at CZ.Advantages.Asap.Workflow.DataServiceAgent.UpdateReferences(Guid entityId, Object oldValue, Object newValue) in d:\BuildServer\TeamCity\buildAgent\work\4d047c3a021b26c8\architect\CZ.Advantages.Asap.Workflow\Service Agents\DataServiceAgent.cs:line 386
at CZ.Advantages.Asap.Workflow.DataServiceAgent.Run() in d:\BuildServer\TeamCity\buildAgent\work\4d047c3a021b26c8\architect\CZ.Advantages.Asap.Workflow\Service Agents\DataServiceAgent.cs:line 598
at CZ.Advantages.Asap.Workflow.Tasks.ServiceMethodCallEngineTask.OnExecute() in d:\BuildServer\TeamCity\buildAgent\work\4d047c3a021b26c8\architect\CZ.Advantages.Asap.Workflow\Tasks\ServiceMethodCallEngineTask.cs:line 154
at CZ.Advantages.Asap.Workflow.Tasks.AbstractWorkflowEngineTask.Execute() in d:\BuildServer\TeamCity\buildAgent\work\4d047c3a021b26c8\architect\CZ.Advantages.Asap.Workflow\Tasks\AbstractWorkflowEngineTask.cs:line 101
— End of inner exception stack trace —
— End of inner exception stack trace —
2017-10-04 13:46:59,891 [2080] ERROR CZ.Advantages.Asap.Workflow.WorkflowEngine [(null)] <(null)> - ForeachWorkflowBlock 03_IterateOverSelected failed.
2017-10-04 13:46:59,891 [2080] ERROR CZ.Advantages.Asap.Workflow.WorkflowEngine [(null)] <(null)> - Specified cast is not valid.
CZ.Advantages.Asap.AsapException: Specified cast is not valid. —> CZ.Advantages.Asap.AsapException: Specified cast is not valid. —> CZ.Advantages.Asap.AsapException: Specified cast is not valid. —> System.InvalidCastException: Specified cast is not valid.
at CZ.Advantages.Asap.DA.Service.AbstractDataService.GetLog(DataTable table, UserProfile profile, String transactionId, Int32 overrideActionType)
at CZ.Advantages.Asap.DA.Service.AbstractSqlDataService.LogData(DataTable changedTable, UserProfile profile, String transactionId, IDbConnection connection, IDbTransaction transaction, Int32 overrideActionType)
at CZ.Advantages.Asap.DA.Service.AbstractSqlDataService.UpdateField(Guid entityId, Guid fieldId, Object oldValue, Object newValue, IPrincipal userProfile, String transactionId)
at CZ.Advantages.Asap.Workflow.DataServiceAgent.UpdateReferences(Guid entityId, Object oldValue, Object newValue) in d:\BuildServer\TeamCity\buildAgent\work\4d047c3a021b26c8\architect\CZ.Advantages.Asap.Workflow\Service Agents\DataServiceAgent.cs:line 386
at CZ.Advantages.Asap.Workflow.DataServiceAgent.Run() in d:\BuildServer\TeamCity\buildAgent\work\4d047c3a021b26c8\architect\CZ.Advantages.Asap.Workflow\Service Agents\DataServiceAgent.cs:line 598
at CZ.Advantages.Asap.Workflow.Tasks.ServiceMethodCallEngineTask.OnExecute() in d:\BuildServer\TeamCity\buildAgent\work\4d047c3a021b26c8\architect\CZ.Advantages.Asap.Workflow\Tasks\ServiceMethodCallEngineTask.cs:line 154
at CZ.Advantages.Asap.Workflow.Tasks.AbstractWorkflowEngineTask.Execute() in d:\BuildServer\TeamCity\buildAgent\work\4d047c3a021b26c8\architect\CZ.Advantages.Asap.Workflow\Tasks\AbstractWorkflowEngineTask.cs:line 101
— End of inner exception stack trace —
— End of inner exception stack trace —
— End of inner exception stack trace —