I have WF that resets user passwords using IdentityService service, ResetPassword method. But when I use it it throws an error
The thing is, that the @OrigamUser_parBusinessPartnerId parameter is only in step after ResetPassword and it is filled correctly with GUID from context by referencing /ROOT/BusinessPartner/Id. I can see the GUID in trace.
Any advice please?
I also checked server log, where I can see this:
2021-09-08 14:43:35,275 [22] ERROR Origam.ServerCore.Controller.AbstractController - One or more errors occurred. (Error occured when setting parameter: @OrigamUser_parBusinessPartnerId to value: 20406)
Origam.OrigamException: One or more errors occurred. (Error occured when setting parameter: @OrigamUser_parBusinessPartnerId to value: 20406)
—> System.AggregateException: One or more errors occurred. (Error occured when setting parameter: @OrigamUser_parBusinessPartnerId to value: 20406)
—> System.Exception: Error occured when setting parameter: @OrigamUser_parBusinessPartnerId to value: 20406
—> System.FormatException: Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).
at System.Guid.GuidResult.SetFailure(Boolean overflow, String failureMessageID)
at System.Guid.TryParseExactN(ReadOnlySpan1 guidString, GuidResult& result) at System.Guid.TryParseGuid(ReadOnlySpan
1 guidString, GuidResult& result)
at System.Guid…ctor(String g)
at Origam.DA.Service.AbstractDataService.BuildParameters(QueryParameterCollection parameters, IDataParameterCollection dsParameters, UserProfile currentProfile)
— End of inner exception stack trace —
at Origam.DA.Service.AbstractDataService.BuildParameters(QueryParameterCollection parameters, IDataParameterCollection dsParameters, UserProfile currentProfile)
at Origam.DA.Service.DataLoader.Fill()
at Origam.DA.Service.Profiler.ExecuteAndTakeLoggingAction(DataStructureEntity entity, Action2 loggingAction, Action actionToExecute) at Origam.DA.Service.AbstractSqlDataService.LoadDataSet(DataStructureQuery query, IPrincipal principal, DataSet dataset, String transactionId) at Origam.DA.Service.AbstractSqlDataService.LoadDataSet(DataStructureQuery dataStructureQuery, IPrincipal principal, String transactionId) at Origam.Workflow.DataServiceAgent.LoadData(DataStructureQuery query, DataSet data) at Origam.Workflow.DataServiceAgent.Run() at Origam.Workbench.Services.CoreServices.DataService.LoadData(Guid dataStructureId, Guid methodId, Guid defaultSetId, Guid sortSetId, String transactionId, QueryParameterCollection parameters, DataSet currentData, String entity, String columnName) at Origam.Workbench.Services.CoreServices.DataService.LoadData(Guid dataStructureId, Guid methodId, Guid defaultSetId, Guid sortSetId, String transactionId, String paramName1, Object paramValue1) at Origam.ServerCore.UserStore.GetOrigamUserDataSet(Guid methodId, String paramName, Object paramValue, String transactionId) at Origam.ServerCore.UserStore.FindOrigamUserRowById(String userId) at Origam.ServerCore.UserStore.FindByIdAsync(String userId, CancellationToken cancellationToken) at Origam.ServerCore.Authorization.CoreManagerAdapter.FindByIdAsync(String userId) at Origam.ServerCore.Authorization.CoreManagerAdapter.ResetPasswordFromUsernameAsync(String userName, String token, String newPassword) --- End of inner exception stack trace --- at Origam.Security.Identity.IdentityServiceAgent.ResetPassword() at Origam.Security.Identity.IdentityServiceAgent.Run() at Origam.Workflow.Tasks.ServiceMethodCallEngineTask.OnExecute() at Origam.Workflow.ProfilingTools.<>c__DisplayClass4_0.<ExecuteAndLogDuration>g__FuncToExecute|0() at Origam.Workflow.ProfilingTools.ExecuteAndLogDuration(Func
1 funcToExecute, String logEntryType, String path, String id, Func1 logOnlyIf) at Origam.Workflow.ProfilingTools.ExecuteAndLogDuration(Action action, String logEntryType, String path, String id, Func
1 logOnlyIf)
at Origam.Workflow.Tasks.AbstractWorkflowEngineTask.MeasuredExecution()
at Origam.Workflow.Tasks.ServiceMethodCallEngineTask.Execute()
— End of inner exception stack trace —