Dear all,
I am currently working on a custom process where I would like to create a new Dynamic Role in a process step.
Therefore, I added a proccess step of type "HandleObjectComponent - Insert" with the following parameter definitions
val_ObjectKeyBaseTree
Value = "&Out(XObjectKeyOrg)&"
val_UID_DialogTableObjectClass
Value = "QER-T-Person"
val_WhereClause
Value = String.Format("EXISTS (SELECT 1 FROM (SELECT UID_Person FROM PersonInAERole WHERE EXISTS (SELECT 1 FROM (SELECT UID_AERole FROM AERole WHERE UID_AERole = '{0}') as X WHERE X.UID_AERole = PersonInAERole.UID_AERole)) as X WHERE X.UID_Person = Person.UID_Person)", $CCC_UID_AERole$)
The goal of the WhereClause is to select all objects from Person which are assigned to a particular OneIM Application Role (AERole).
Once I let my process be generated for the Job Qeue, the created process step ends in the frozen state with the following error:
(2022-03-31 13:00:54.763) [810306] Error while running 'OnSaving' in logic module 'QER.Customizer.DynamicGroup'. [2133271] The SQL statement in the field 'Condition' is not correct. [System.NullReferenceException] Object reference not set to an instance of an object. at VI.JobService.ProcessorThread._ExecuteJob(Job job, JobResult result) at VI.JobService.JobComponents.HandleObjectComponent.Activate(String task) at VI.DB.Implementation.HandleObjectKernel.Activate(String task) at VI.DB.Implementation.HandleObjectKernel._OperationInsert(IUnitOfWork optionalUnitOfWork) at VI.DB.Implementation.HandleObjectKernel._Save(IUnitOfWork unitOfWork, IEntity entity) at VI.DB.Sync.SyncUnitOfWorkExtensions.Put(IUnitOfWork unitOfWork, IEntity entity, PutOptions options) at VI.Base.SyncActions.Do[T1,T2,T3](T1 p1, T2 p2, T3 p3, Func`4 action) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() …
Since I was not able to identify an SQL syntax error in the WhereClause, I copied the generated WhereClause parameter value from the parameters section in the JobQeueInfo tool and manually added a Dynamic Role in Manager with the same WhereClause. This worked just fine. I was able to save the Dynamic Role without an error.
Does somebody sees what I am doing wrong with the WhereClause definition in the process step?
Thank you.
Manuel