I have a use case where I would want 10 worker threads in my system. Out of this, 6 worker threads should poll to one Task List and 4 worker threads to another task list.
I configured my code in such way on Flow Framework.
One of my activities is registered to a different task List. All other activities to a default task list. I have 6 worker threads listening to the default task list and remaining four listening to the other task list.
However when i execute my workflow, I get the error:
Task List Name: CIMSProposalActivityValidationTList
Identity: 29547@ccs-master-1001.vdc.xyz.com
Details: ["java.lang.IllegalStateException",{"cause":null,"stackTrace":[{"methodName":"current","fileName":"AsyncContextBase.java","lineNumber":27,"className":"com.amazonaws.services.simpleworkflow.flow.core.AsyncContextBase","nativeMethod":false},{"methodName":"","fileName":"AsyncContextBase.java","lineNumber":49,"className":"com.amazonaws.services.simpleworkflow.flow.core.AsyncContextBase","nativeMethod":false},{"methodName":"","fileName":"TryCatchFinallyContext.java","lineNumber":46,"className":"com.amazonaws.services.simpleworkflow.flow.core.TryCatchFinallyContext","nativeMethod":false},{"methodName":"","fileName":"TryCatchFinally.java","lineNumber":233,"className":"com.amazonaws.services.simpleworkflow.flow.core.TryCatchFinally","nativeMethod":false},{"methodName":"","fileName":"TryCatch.java","lineNumber":22,"className":"com.amazonaws.services.simpleworkflow.flow.core.TryCatch","nativeMethod":false},{"methodName":"","fileName":"GrooveScheduleAspect.java","lineNumber":93,"className":"com.amazon.transportation.groove.aspectj.GrooveScheduleAspect$1","nativeMethod":false},{"methodName":"processGrooveSchedule","fileName":"GrooveScheduleAspect.java","lineNumber":93,"className":"com.amazon.transportation.groove.aspectj.GrooveScheduleAspect","nativeMethod":false},{"methodName":"validate","fileName":"ValidationActivitiesImpl.java","lineNumber":23,"className":"com.amazon.cimsworkflow.activities.impl.ValidationActivitiesImpl","nativeMethod":false},{"methodName":"invoke0","fileName":"NativeMethodAccessorImpl.java","lineNumber":-2,"className":"sun.reflect.NativeMethodAccessorImpl","nativeMethod":true},{"methodName":"invoke","fileName":"NativeMethodAccessorImpl.java","lineNumber":57,"className":"sun.reflect.NativeMethodAccessorImpl","nativeMethod":false},{"methodName":"invoke","fileName":"DelegatingMethodAccessorImpl.java","lineNumber":43,"className":"sun.reflect.DelegatingMethodAccessorImpl","nativeMethod":false},{"methodName":"invoke","fileName":"Method.java","lineNumber":606,"className":"java.lang.reflect.Method","nativeMethod":false},{"methodName":"execute","fileName":"POJOActivityImplementation.java","lineNumber":63,"className":"com.amazonaws.services.simpleworkflow.flow.pojo.POJOActivityImplementation","nativeMethod":false},{"methodName":"execute","fileName":"ActivityImplementationBase.java","lineNumber":46,"className":"com.amazonaws.services.simpleworkflow.flow.generic.ActivityImplementationBase","nativeMethod":false},{"methodName":"execute","fileName":"SynchronousActivityTaskPoller.java","lineNumber":196,"className":"com.amazonaws.services.simpleworkflow.flow.worker.SynchronousActivityTaskPoller","nativeMethod":false},{"methodName":"run","fileName":"ActivityTaskPoller.java","lineNumber":97,"className":"com.amazonaws.services.simpleworkflow.flow.worker.ActivityTaskPoller$1","nativeMethod":false},{"methodName":"runWorker","fileName":"ThreadPoolExecutor.java","lineNumber":1145,"className":"java.util.concurrent.ThreadPoolExecutor","nativeMethod":false},{"methodName":"run","fileName":"ThreadPoolExecutor.java","lineNumber":615,"className":"java.util.concurrent.ThreadPoolExecutor$Worker","nativeMethod":false},{"methodName":"run","fileName":"Thread.java","lineNumber":744,"className":"java.lang.Thread","nativeMethod":false}],"message":"Attempt to execute asynchronous code outside of AsyncScope.doAsync() method","localizedMessage":"Attempt to execute asynchronous code outside of AsyncScope.doAsync() method","suppressed":["[Ljava.lang.Throwable;",[]]}]
Reason:
- Attempt to execute asynchronous code outside of AsyncScope.doAsync() method
My task list is the new one I created. The threads are also as expected. but I am getting this error. Any leads on how to solve this. Please reply