can someone help me on the below error, so actually error is coming in script in Workflows when i try to get Profiles from assigned Role..
Caused by: org.apache.bsf.BSFException: The application script threw an exception: org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: sailpoint.object.Bundle.profiles, could not initialize proxy - no Session BSF info: script at line: 0 column: columnNo
From the code you shared, it seems to me that the assignedRole might be detached from Hibernate session, and therefore accesing its fields like profiles will throw LazyInitializationException. Please try to reload the assignedRole object from the database using context to ensure it’s fully attached to the session.
for (Bundle assignedRole : assignedRoles) {
log.debug(" Step :--- calcute plan ------ - AssignedRole " + assignedRole.getName());
// Re-fetch role using id or name to ensure it's attached to the Hibernate session
assignedRole = context.getObjectById(Bundle.class, assignedRole.getId());
String bundleDesc = assignedRole.getDescription("en_US");
//your code...
}
Thanks @PrashRV . Can you try to reload assignedRole object and see if its fixed the issue . And from the logs are you able to check where exactly is it failing .