LazyInitializationException on enabling sailpoint.api.Workflower logging

Hi,
I have a quicklink which opens a form.
I recently upgraded IIQ from 8.1p2 to 8.3p3.
IIQ exists the workflow with an exception when I click on Next (action=“next”) button on the form when I enable logging for sailpoint.api.Workflower class.

workflow moves to the next step if I remove the logger.

Anybody else have the same issue?

log4j2.properties entry:

logger.workflower.name=sailpoint.api.Workflower
logger.workflower.level=all

Error:

2023-05-26 20:25:45.145 TRACE [sailpoint.api.Workflower] [traceMethodExit] - Exiting addWorkflowVariableArgs = null

2023-05-26 20:25:45.145 TRACE [sailpoint.api.Workflower] [traceMethodEntry] - Entering getRuleLibraries(wfc = [sailpoint.workflow.WorkflowContext@670b5ab2](mailto:sailpoint.workflow.WorkflowContext@670b5ab2))

2023-05-26 20:25:45.146 TRACE [sailpoint.api.Workflower] [traceMethodThrow] - Throwing getRuleLibraries - org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: sailpoint.object.Rule.referencedRules, could not initialize proxy - no Session

2023-05-26 20:25:45.147 TRACE [sailpoint.api.Workflower] [traceMethodThrow] - Throwing callInterceptor - org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: sailpoint.object.Rule.referencedRules, could not initialize proxy - no Session

2023-05-26 20:25:45.147 TRACE [sailpoint.api.Workflower] [traceMethodThrow] - Throwing interceptEndApproval - org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: sailpoint.object.Rule.referencedRules, could not initialize proxy - no Session

2023-05-26 20:25:45.147 TRACE [sailpoint.api.Workflower] [traceMethodThrow] - Throwing advanceApproval - org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: sailpoint.object.Rule.referencedRules, could not initialize proxy - no Session

2023-05-26 20:25:45.147 TRACE [sailpoint.api.Workflower] [traceMethodThrow] - Throwing advanceStep - org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: sailpoint.object.Rule.referencedRules, could not initialize proxy - no Session

2023-05-26 20:25:45.147 ERROR [sailpoint.api.Workflower] [advance] - An unexpected error occurred: org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: sailpoint.object.Rule.referencedRules, could not initialize proxy - no Session

org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: sailpoint.object.Rule.referencedRules, could not initialize proxy - no Session

at org.hibernate.collection.internal.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:606) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final]

at org.hibernate.collection.internal.AbstractPersistentCollection.withTemporarySessionIfNeeded(AbstractPersistentCollection.java:218) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final]

at org.hibernate.collection.internal.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:585) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final]

at org.hibernate.collection.internal.AbstractPersistentCollection.read(AbstractPersistentCollection.java:149) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final]

at org.hibernate.collection.internal.PersistentList.hashCode(PersistentList.java:506) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final]

at sailpoint.object.Rule.hashCode(Rule.java:415) ~[identityiq.jar:8.3p2 Build a3a0711bca8-20230213-093637]

at java.util.WeakHashMap.hash(WeakHashMap.java:298) ~[?:1.8.0_131]

I used to get this kind of error when I tried to pass collection of objects from one step to another using workflow variables. Maybe you are using a variable to store a Bundle or a list of Bundles ?

Thank you for the reply.
The issue is with multiple custom quicklinks.
Yes, Im passing ManagedAttributes or Applications between each steps.

@vijay_bethi Best-practice in workflows like this is to not store full IIQ objects inside of workflow variables, as this leads to the object references becoming stale. The best thing to do is to instead store simple objects and resolve them to their proper IIQ objects inside the workflow step rule/script as they’re needed.

Using your case of passing ManagedAttributes or Applications between steps, instead of storing those objects in a workflow variable, you can instead simply store their object ID as a String. Then, the next time they’re needed, you can easily resolve the full object context.getObjectById(Clazz class, String id) method. This will allow the workflow to be far more resilient to common activities like backgrounding and picking up execution on another host (which this workflow looks like it has some kind of approval form, so it will be backgrounded as soon as that approval step is hit).

Sorry about the confusion.
I should have been clear, quicklink or workflow dont store or pass array of actual application or managedattribute objects, but just the ID of the objects using formModels.

1 Like

Are you doing any calls to context.decache?

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.