Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.

Fault route in long-lived process not executing

Avatar

Level 1

Good afternoon,

I have an issue with a long-lived process where I have specified exception handling in a route, but that route is not followed when the exception is thrown.

My setup is as follows:

I have a client invoking a synchronous operation on a DSC. That DSC, as part of its processing, kicks off a long-lived process using the Java invocation API (ServiceClientFactory.createInvocationRequest(...)).

In the long-lived process, step 1 calls an operation on the aforementioned DSC (for purposes of illustration, operation "foo") that can throw "MyException". "foo" throws the declared exception, and the route from step 1 (added via the "lightning bolt" and selecting "MyException") to step 2 invokes another operation on the DSC (a set status operation). The problem is that the route is never followed. When I play back the long-lived process recording via Workbench, the recording shows step 1 as red, and displays an "Error" variable (although it doesn't show explicitly that the exception thrown was of type "MyException").

My log file shows that the exception of the type I'm expecting is thrown (and the line number shown confirms that "MyException" is indeed thrown). Additionally, there is an error that I don't understand that perhaps is affecting the ability to follow the aforementiond route in my long-lived process:

2011-06-13 16:49:06,078 ERROR [STDERR] IDPSchedulerService_Worker-10::Jun 13, 2011 4:49:06 PM com.adobe.idp.event.util.EventDBHelper getEventByPrimaryKey

SEVERE: **************************************************************

2011-06-13 16:49:06,078 ERROR [STDERR] IDPSchedulerService_Worker-10::Jun 13, 2011 4:49:06 PM com.adobe.idp.event.util.EventDBHelper getEventByPrimaryKey

SEVERE: Event with id 19424 is already deleted or does not exist.

2011-06-13 16:49:06,078 ERROR [STDERR] IDPSchedulerService_Worker-10::Jun 13, 2011 4:49:06 PM com.adobe.idp.event.util.EventDBHelper getEventByPrimaryKey

SEVERE: **************************************************************

2011-06-13 16:49:06,078 ERROR [STDERR] IDPSchedulerService_Worker-10::Jun 13, 2011 4:49:06 PM com.adobe.idp.event.util.EventDBHelper getEventByPrimaryKey

SEVERE: **************************************************************

2011-06-13 16:49:06,078 ERROR [STDERR] IDPSchedulerService_Worker-10::Jun 13, 2011 4:49:06 PM com.adobe.idp.event.util.EventDBHelper getEventByPrimaryKey

SEVERE: Event with id 19424 is already deleted or does not exist.

2011-06-13 16:49:06,078 ERROR [STDERR] IDPSchedulerService_Worker-10::Jun 13, 2011 4:49:06 PM com.adobe.idp.event.util.EventDBHelper getEventByPrimaryKey

SEVERE: **************************************************************

2011-06-13 16:49:06,078 ERROR [STDERR] IDPSchedulerService_Worker-10::Jun 13, 2011 4:49:06 PM com.adobe.idp.scheduler.callback.ServiceCallbackHandler execute

SEVERE: Exception thrown while calling back a DSC componentEvent instance with id 19424 does not exist.

2011-06-13 16:49:06,078 INFO  [org.quartz.core.JobRunShell] IDPSchedulerService_Worker-10::Job Exception.Exception:13079981420470.00814454657941055 threw a JobExecutionException:

org.quartz.JobExecutionException: java.lang.Exception: ALC-DSC-003-000: com.adobe.idp.dsc.DSCInvocationException: Invocation error. [See nested exception: java.lang.Exception: ALC-DSC-003-000: com.adobe.idp.dsc.DSCInvocationException: Invocation error.]

at com.adobe.idp.scheduler.callback.ServiceCallbackHandler.execute(ServiceCallbackHandler.java:102)

at org.quartz.core.JobRunShell.run(JobRunShell.java:202)

at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:529)

Caused by: java.lang.Exception: ALC-DSC-003-000: com.adobe.idp.dsc.DSCInvocationException: Invocation error.

at com.adobe.idp.scheduler.callback.ServiceCallbackHandler.execute(ServiceCallbackHandler.java:101)

... 2 more

Caused by: ALC-DSC-003-000: com.adobe.idp.dsc.DSCInvocationException: Invocation error.

at com.adobe.idp.dsc.component.impl.DefaultPOJOInvokerImpl.invoke(DefaultPOJOInvokerImpl.java:152)

at com.adobe.idp.dsc.interceptor.impl.InvocationInterceptor.intercept(InvocationInterceptor.java:140)

at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptorChainImpl.java:60)

at com.adobe.idp.dsc.transaction.interceptor.TransactionInterceptor$1.doInTransaction(TransactionInterceptor.java:74)

at com.adobe.idp.dsc.transaction.impl.ejb.adapter.EjbTransactionCMTAdapterBean.execute(EjbTransactionCMTAdapterBean.java:342)

at com.adobe.idp.dsc.transaction.impl.ejb.adapter.EjbTransactionCMTAdapterBean.doSupports(EjbTransactionCMTAdapterBean.java:212)

at sun.reflect.GeneratedMethodAccessor688.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:585)

at org.jboss.invocation.Invocation.performCall(Invocation.java:359)

at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:237)

at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:158)

at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:169)

at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)

at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)

at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:378)

at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)

at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:168)

at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)

at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:138)

at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:648)

at org.jboss.ejb.Container.invoke(Container.java:960)

at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:430)

at org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:103)

at $Proxy210.doSupports(Unknown Source)

at com.adobe.idp.dsc.transaction.impl.ejb.EjbTransactionProvider.execute(EjbTransactionProvider.java:104)

at com.adobe.idp.dsc.transaction.interceptor.TransactionInterceptor.intercept(TransactionInterceptor.java:72)

at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptorChainImpl.java:60)

at com.adobe.idp.dsc.interceptor.impl.InvocationStrategyInterceptor.intercept(InvocationStrategyInterceptor.java:55)

at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptorChainImpl.java:60)

at com.adobe.idp.dsc.interceptor.impl.InvalidStateInterceptor.intercept(InvalidStateInterceptor.java:37)

at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptorChainImpl.java:60)

at com.adobe.idp.dsc.interceptor.impl.AuthorizationInterceptor.intercept(AuthorizationInterceptor.java:132)

at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptorChainImpl.java:60)

at com.adobe.idp.dsc.interceptor.impl.JMXInterceptor.intercept(JMXInterceptor.java:48)

at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptorChainImpl.java:60)

at com.adobe.idp.dsc.engine.impl.ServiceEngineImpl.invoke(ServiceEngineImpl.java:115)

at com.adobe.idp.dsc.routing.Router.routeRequest(Router.java:118)

at com.adobe.idp.dsc.provider.impl.base.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:91)

at com.adobe.idp.dsc.provider.impl.vm.VMMessageDispatcher.doSend(VMMessageDispatcher.java:215)

at com.adobe.idp.dsc.provider.impl.base.AbstractMessageDispatcher.send(AbstractMessageDispatcher.java:57)

at com.adobe.idp.dsc.clientsdk.ServiceClient.invoke(ServiceClient.java:208)

at com.adobe.idp.scheduler.callback.ServiceCallbackHandler.execute(ServiceCallbackHandler.java:87)

... 2 more

Caused by: com.adobe.idp.event.exception.NotificationException: Event instance with id 19424 does not exist.

at com.adobe.idp.event.notification.NotificationManagerImpl.sendNotifications(NotificationManagerImpl.java:256)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:585)

at com.adobe.idp.dsc.component.impl.DefaultPOJOInvokerImpl.invoke(DefaultPOJOInvokerImpl.java:118)

... 44 more

Anyone have any insight on why my route isn't being followed as expected, or anything related to exception handling in long-lived processes that I can investigate?

Message was edited by: groklivecycle

0 Replies