Question
Coforge
AU
Last activity: 9 Jan 2023 2:40 EST
Issues when executing correspondence fragment from correspondence rule when resuming a case from Listener
Hi Everyone,
We have a requirement to send an email with assignment link to internal user(group mailbox).
We have a new correspondence rule created and it has correspondence fragment(this is to build assignment link) rule.
When the actual user submits a case an email(this is configured through send email shape in flow) is getting sent successfully with the assignment link and no issues, where as when the case is resumed by listener(in this scenario case is sitting in a work queue) the email is being sent but there is no assignment link and it's throwing an exception.
It seems when executing from listener it's not finding the corr fragment as per stack trace.
Note: In both working and exception scanario's page context is pyWorkPage and no issues with page context.
Below is the full stack trace of the issue from tracer/logs.
Hi Everyone,
We have a requirement to send an email with assignment link to internal user(group mailbox).
We have a new correspondence rule created and it has correspondence fragment(this is to build assignment link) rule.
When the actual user submits a case an email(this is configured through send email shape in flow) is getting sent successfully with the assignment link and no issues, where as when the case is resumed by listener(in this scenario case is sitting in a work queue) the email is being sent but there is no assignment link and it's throwing an exception.
It seems when executing from listener it's not finding the corr fragment as per stack trace.
Note: In both working and exception scanario's page context is pyWorkPage and no issues with page context.
Below is the full stack trace of the issue from tracer/logs.
MSG][Problem appending stream null][STACK][java.lang.NullPointerException at com.pegarules.generated.corr_fragment.ra_stream_worklink_email_59308f9440afad3e80cbd18f50c16007.performStream_1(ra_stream_worklink_email_59308f9440afad3e80cbd18f50c16007.java:216) at com.pegarules.generated.corr_fragment.ra_stream_worklink_email_59308f9440afad3e80cbd18f50c16007.execute(ra_stream_worklink_email_59308f9440afad3e80cbd18f50c16007.java:112) at com.pega.pegarules.session.internal.mgmt.StreamBuilderTools.appendStreamKeepProperties(StreamBuilderTools.java:786) at com.pega.pegarules.session.internal.mgmt.StreamBuilderTools.appendStream(StreamBuilderTools.java:681) at com.pega.pegarules.session.internal.mgmt.StreamBuilderTools.appendStream(StreamBuilderTools.java:672) at com.pega.pegarules.session.internal.mgmt.StreamBuilderTools.appendStream(StreamBuilderTools.java:668) at com.pegarules.generated.corr.ra_stream_testemail_email_c5a7eeb700834289edb102826360958d.include_1(ra_stream_testemail_email_c5a7eeb700834289edb102826360958d.java:267) at com.pegarules.generated.corr.ra_stream_testemail_email_c5a7eeb700834289edb102826360958d._jspx_meth_pega_withPage__1(ra_stream_testemail_email_c5a7eeb700834289edb102826360958d.java:287) at com.pegarules.generated.corr.ra_stream_testemail_email_c5a7eeb700834289edb102826360958d.performStream_1(ra_stream_testemail_email_c5a7eeb700834289edb102826360958d.java:484) at com.pegarules.generated.corr.ra_stream_testemail_email_c5a7eeb700834289edb102826360958d.execute(ra_stream_testemail_email_c5a7eeb700834289edb102826360958d.java:153) at com.pega.pegarules.session.internal.mgmt.Executable.getStream(Executable.java:4342) at com.pega.pegarules.session.internal.mgmt.Executable.getStream(Executable.java:4163) at com.pegarules.generated.activity.ra_action_sendsimpleemail_0c088e2962bfc6db1342fe3306265eb8.step8_circum0(ra_action_sendsimpleemail_0c088e2962bfc6db1342fe3306265eb8.java:1015) at com.pegarules.generated.activity.ra_action_sendsimpleemail_0c088e2962bfc6db1342fe3306265eb8.perform(ra_action_sendsimpleemail_0c088e2962bfc6db1342fe3306265eb8.java:213) at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:2835) at com.pega.pegarules.session.internal.mgmt.Executable.invokeActivity(Executable.java:11449) at com.pegarules.generated.activity.ra_action_pzsendemail_6387bcae316f2358b37941a9142ad024.step15_circum0(ra_action_pzsendemail_6387bcae316f2358b37941a9142ad024.java:1248) at com.pegarules.generated.activity.ra_action_pzsendemail_6387bcae316f2358b37941a9142ad024.perform(ra_action_pzsendemail_6387bcae316f2358b37941a9142ad024.java:316) at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:2835) at com.pegarules.generated.flow.ra_action_tesvalidation_4c72cae250f48661b4865b1811ea1689.RunTaskActivity(ra_action_tesvalidation_4c72cae250f48661b4865b1811ea1689.java:4128) at com.pegarules.generated.flow.ra_action_tesvalidation_4c72cae250f48661b4865b1811ea1689.Task_Utility2_circum0(ra_action_tesvalidation_4c72cae250f48661b4865b1811ea1689.java:1279) at com.pegarules.generated.flow.ra_action_tesvalidation_4c72cae250f48661b4865b1811ea1689.perform(ra_action_tesvalidation_4c72cae250f48661b4865b1811ea1689.java:633) at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:2835) at com.pegarules.generated.StartFlow_080401__6867397908777742199.StartFlow08_04_01(StartFlow_080401__6867397908777742199.java:165) at com.pegarules.generated.StartFlow_080401__6867397908777742199.invoke(StartFlow_080401__6867397908777742199.java:74) at com.pega.pegarules.generation.internal.library.LibraryRuntime.resolveAndinvokeFunctionViaReflection(LibraryRuntime.java:232) at com.pega.pegarules.generation.internal.library.LibraryRuntime.invokeLibraryRuntime(LibraryRuntime.java:123) at com.pega.pegarules.session.internal.mgmt.Executable.invokeLibraryRuntime(Executable.java:9730) at com.pega.pegarules.priv.generator.LibrarySupport.resolveAndInvokeFunctionViaReflectionWithException(LibrarySupport.java:277) at java.lang.invoke.DirectHandle.invokeExact_thunkArchetype_L(DirectHandle.java:300) at java.lang.invoke.BruteArgumentMoverHandle.invokeExact_thunkArchetype_X(BruteArgumentMoverHandle.java:404) at java.lang.invoke.CollectHandle.invokeExact_thunkArchetype_X(CollectHandle.java:130) at java.lang.invoke.FilterReturnHandle.invokeExact_thunkArchetype_X(FilterReturnHandle.java:59) at java.lang.invoke.AsTypeHandle.invokeExact_thunkArchetype_X(AsTypeHandle.java:49) at com.pegarules.generated.pzStartStageFlow_080101_6602335682237037817.pzStartStageFlow08_01_01(pzStartStageFlow_080101_6602335682237037817.java:168) at com.pegarules.generated.pzStartStageFlow_080101_6602335682237037817.invoke(pzStartStageFlow_080101_6602335682237037817.java:78) at com.pega.pegarules.generation.internal.library.LibraryRuntime.resolveAndinvokeFunctionViaReflection(LibraryRuntime.java:232) at com.pega.pegarules.generation.internal.library.LibraryRuntime.invokeLibraryRuntime(LibraryRuntime.java:123) at com.pega.pegarules.session.internal.mgmt.Executable.invokeLibraryRuntime(Executable.java:9730) at com.pega.pegarules.priv.generator.LibrarySupport.resolveAndInvokeFunctionViaReflectionWithException(LibrarySupport.java:277) at java.lang.invoke.DirectHandle.invokeExact_thunkArchetype_L(DirectHandle.java:300) at java.lang.invoke.BruteArgumentMoverHandle.invokeExact_thunkArchetype_X(BruteArgumentMoverHandle.java:404) at java.lang.invoke.CollectHandle.invokeExact_thunkArchetype_X(CollectHandle.java:130) at java.lang.invoke.FilterReturnHandle.invokeExact_thunkArchetype_X(FilterReturnHandle.java:59) at java.lang.invoke.AsTypeHandle.invokeExact_thunkArchetype_X(AsTypeHandle.java:49) at com.pegarules.generated.casetype.ra_action_pydefault_d84a457df0201d17edfec5f5fc325a21.PRIM1_FLOW3_start_circum0(ra_action_pydefault_d84a457df0201d17edfec5f5fc325a21.java:1306) at com.pegarules.generated.casetype.ra_action_pydefault_d84a457df0201d17edfec5f5fc325a21.PRIM1_FLOW1_end_circum0(ra_action_pydefault_d84a457df0201d17edfec5f5fc325a21.java:1298) at com.pegarules.generated.casetype.ra_action_pydefault_d84a457df0201d17edfec5f5fc325a21.PRIM1_FLOW1_start_circum0(ra_action_pydefault_d84a457df0201d17edfec5f5fc325a21.java:1293) at com.pegarules.generated.casetype.ra_action_pydefault_d84a457df0201d17edfec5f5fc325a21.PRIM1_start_circum0(ra_action_pydefault_d84a457df0201d17edfec5f5fc325a21.java:1218) at com.pegarules.generated.casetype.ra_action_pydefault_d84a457df0201d17edfec5f5fc325a21.startStageProcesses_circum0(ra_action_pydefault_d84a457df0201d17edfec5f5fc325a21.java:1185) at com.pegarules.generated.casetype.ra_action_pydefault_d84a457df0201d17edfec5f5fc325a21.doStagePurposes_circum0(ra_action_pydefault_d84a457df0201d17edfec5f5fc325a21.java:701) at com.pegarules.generated.casetype.ra_action_pydefault_d84a457df0201d17edfec5f5fc325a21.perform(ra_action_pydefault_d84a457df0201d17edfec5f5fc325a21.java:444) at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:2835) at com.pegarules.generated.pxCallCaseType_080101__8998668516526208902.pxCallCaseType08_01_01(pxCallCaseType_080101__8998668516526208902.java:122) at com.pegarules.generated.pxCallCaseType_080101__8998668516526208902.invoke(pxCallCaseType_080101__8998668516526208902.java:81) at com.pega.pegarules.generation.internal.library.LibraryRuntime.resolveAndinvokeFunctionViaReflection(LibraryRuntime.java:232) at com.pega.pegarules.generation.internal.library.LibraryRuntime.invokeLibraryRuntime(LibraryRuntime.java:123) at com.pega.pegarules.session.internal.mgmt.Executable.invokeLibraryRuntime(Executable.java:9730) at com.pega.pegarules.priv.generator.LibrarySupport.resolveAndInvokeFunctionViaReflectionWithException(LibrarySupport.java:277) at java.lang.invoke.DirectHandle.invokeExact_thunkArchetype_L(DirectHandle.java:300) at java.lang.invoke.BruteArgumentMoverHandle.invokeExact_thunkArchetype_X(BruteArgumentMoverHandle.java:404) at java.lang.invoke.CollectHandle.invokeExact_thunkArchetype_X(CollectHandle.java:130) at java.lang.invoke.FilterReturnHandle.invokeExact_thunkArchetype_X(FilterReturnHandle.java:59) at java.lang.invoke.AsTypeHandle.invokeExact_thunkArchetype_X(AsTypeHandle.java:49) at com.pegarules.generated.activity.ra_action_pzstartstageprocesses_ead049a1db81cae26e55ebc8021c7606.step1_circum0(ra_action_pzstartstageprocesses_ead049a1db81cae26e55ebc8021c7606.java:194) at com.pegarules.generated.activity.ra_action_pzstartstageprocesses_ead049a1db81cae26e55ebc8021c7606.perform(ra_action_pzstartstageprocesses_ead049a1db81cae26e55ebc8021c7606.java:76) at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:2835) at com.pega.pegarules.session.internal.mgmt.Executable.invokeActivity(Executable.java:11449) at com.pegarules.generated.activity.ra_action_pxchangestage_310d34d6e5b453fd2907c19d50288aec.step39_circum0(ra_action_pxchangestage_310d34d6e5b453fd2907c19d50288aec.java:3213) at com.pegarules.generated.activity.ra_action_pxchangestage_310d34d6e5b453fd2907c19d50288aec.perform(ra_action_pxchangestage_310d34d6e5b453fd2907c19d50288aec.java:745) at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:2835) at com.pega.pegarules.session.internal.mgmt.Executable.invokeActivity(Executable.java:11449) at com.pegarules.generated.activity.ra_action_updatecase_test_986d51b16cb9537d73dd7d8ed41ee2a8.step7_circum0(ra_action_updatecase_test_986d51b16cb9537d73dd7d8ed41ee2a8.java:767) at com.pegarules.generated.activity.ra_action_updatecase_test_986d51b16cb9537d73dd7d8ed41ee2a8.perform(ra_action_updatecase_test_986d51b16cb9537d73dd7d8ed41ee2a8.java:213) at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:2835) at com.pega.pegarules.session.internal.mgmt.base.ThreadRunner.runActivitiesAlt(ThreadRunner.java:653) at com.pega.pegarules.session.internal.mgmt.PRThreadImpl.runActivitiesAlt(PRThreadImpl.java:520) at com.pega.pegarules.integration.engine.internal.RuleExecutionUtils.runServiceActivity(RuleExecutionUtils.java:435) at com.pega.pegarules.integration.engine.internal.services.ServiceAPI.runActivities(ServiceAPI.java:2081) at com.pega.pegarules.session.external.engineinterface.service.EngineAPI.processRequestInner(EngineAPI.java:445) at sun.reflect.GeneratedMethodAccessor93.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55) at java.lang.reflect.Method.invoke(Method.java:508) at com.pega.pegarules.session.internal.PRSessionProviderImpl.performTargetActionWithLock(PRSessionProviderImpl.java:1399) at com.pega.pegarules.session.internal.PRSessionProviderImpl.doWithRequestorLocked(PRSessionProviderImpl.java:1131) at com.pega.pegarules.session.internal.PRSessionProviderImpl.doWithRequestorLocked(PRSessionProviderImpl.java:985) at com.pega.pegarules.session.external.engineinterface.service.EngineAPI.processRequest(EngineAPI.java:368) at com.pega.pegarules.integration.engine.internal.services.ServiceAPI.processRequest(ServiceAPI.java:3587) at com.pega.pegarules.integration.engine.internal.services.email.EmailServiceExecutor.handleStandardRequest(EmailServiceExecutor.java:249) at com.pega.pegarules.integration.engine.internal.services.email.EmailServiceExecutor.process(EmailServiceExecutor.java:129) at com.pega.pegarules.integration.engine.internal.services.email.EmailActionImpl.execute(EmailActionImpl.java:143) at com.pega.pegarules.integration.engine.internal.services.email.ParallelEmailPollerStrategy.processEmails(ParallelEmailPollerStrategy.java:213) at com.pega.pegarules.integration.engine.internal.services.email.ParallelEmailPollerStrategy.run(ParallelEmailPollerStrategy.java:79) at com.pega.pegarules.integration.engine.internal.services.email.EmailListener.run_(EmailListener.java:592) at com.pega.pegarules.integration.engine.internal.services.listener.ServiceListenerBaseImpl.run(ServiceListenerBaseImpl.java:476) at java.lang.Thread.run(Thread.java:825) ] Close
Please verify and share your thoughts.
Thanks,
Giri
***Edited by Moderator Marije to change type from Pega Academy to Product***