Sounds reasonable to me to, however I'm wondering what is happening with the false return value. Wouldn't that result in a similar error (no route found). If the up-bubbling exception (RETIRED_CAUSE_CODE) leads to the same situation but with a more specific error message, that's fine (my concern is just whether this is the best possible position for the check).
Tammo On 22.10.2010 05:12, Jeff Yu wrote: > Removing the isActive() check makes sense to me. > > Regards > Jeff > > On Wed, Oct 20, 2010 at 11:42 PM, Milinda Pathirage < > milinda.pathir...@gmail.com> wrote: > >> I had a offline chat with Tammo and found out that this happens due to >> isActive check in line 299 of BpelProcess.java. >> >> boolean invokeProcess(final MyRoleMessageExchangeImpl mex, boolean >> enqueue) { >> return invokeProcess(mex, new InvokeHandler() { >> public boolean invoke(PartnerLinkMyRoleImpl target, >> PartnerLinkMyRoleImpl.RoutingInfo routing, boolean createInstance) { >> if (routing.messageRoute == null && createInstance && >> isActive()) { >> // No route but we can create a new instance >> target.invokeNewInstance(mex, routing); >> return true; >> } else if (routing.messageRoute != null) { >> // Found a route, hitting it >> >> >> >> _engine.acquireInstanceLock(routing.messageRoute.getTargetInstance().getInstanceId()); >> target.invokeInstance(mex, routing); >> return true; >> } >> return false; >> } >> }, enqueue); >> } >> >> Due to this check process state checking in invokeNewInstance will never >> get >> executed. >> >> if (_process._pconf.getState() == ProcessState.RETIRED) { >> throw new InvalidProcessException("Process is retired.", >> InvalidProcessException.RETIRED_CAUSE_CODE); >> } >> >> Is it ok to remove this isActive check or will there be any issues if I >> remove this? >> >> Thanks >> Milinda >> >> >> >> On Wed, Oct 20, 2010 at 5:10 PM, Milinda Pathirage < >> milinda.pathir...@gmail.com> wrote: >> >>> Hi Devs, >>> >>> Current way of handling instance creation requests to retired processes >>> doesn't throw any error to client and client will get a timeout when mex >>> timeout happens. And the request will be queued in the job processor. Is >>> this the correct behavior. Don't we need to send a error back to the >> client >>> saying the process is retired. >>> >>> Thanks, >>> Milinda >>> >>> >> > > > -- Tammo van Lessen - http://www.taval.de