Classcast exception after flowable version upgrade to 6.8.0

Hi,
I have recently upgraded from 6.7.2 to 6.8.0 and after that I am getting below Classcast exception. Here error boundary event is added to Call Activity which is calling child process in parallel call activity.

2023-05-18 21:00:38.481 [ERROR] : [processengine-tp-263] org.flowable.job.service.impl.asyncexecutor.DefaultAsyncRunnableExecutionExceptionHandler:execute - Job efecc2a3-f590-11ed-bbf4-9c2dcd7f8b9e failed
java.lang.ClassCastException: org.flowable.engine.impl.bpmn.behavior.IntermediateCatchTimerEventActivityBehavior cannot be cast to org.flowable.engine.impl.delegate.SubProcessActivityBehavior
at org.flowable.engine.impl.agenda.EndExecutionOperation.handleProcessInstanceExecution(EndExecutionOperation.java:102) ~[flowable-engine-6.8.0.jar:6.8.0]
at org.flowable.engine.impl.agenda.EndExecutionOperation.handleRegularExecution(EndExecutionOperation.java:300) ~[flowable-engine-6.8.0.jar:6.8.0]
at org.flowable.engine.impl.agenda.EndExecutionOperation.run(EndExecutionOperation.java:82) ~[flowable-engine-6.8.0.jar:6.8.0]
at org.flowable.common.engine.impl.AbstractEngineConfiguration.lambda$new$0(AbstractEngineConfiguration.java:195) ~[flowable-engine-common-6.8.0.jar:6.8.0]
at org.flowable.engine.impl.interceptor.CommandInvoker.executeOperation(CommandInvoker.java:130) ~[flowable-engine-6.8.0.jar:6.8.0]
at org.flowable.engine.impl.interceptor.CommandInvoker.executeOperations(CommandInvoker.java:114) ~[flowable-engine-6.8.0.jar:6.8.0]
at org.flowable.engine.impl.interceptor.CommandInvoker.execute(CommandInvoker.java:72) ~[flowable-engine-6.8.0.jar:6.8.0]
at org.flowable.engine.impl.interceptor.BpmnOverrideContextInterceptor.execute(BpmnOverrideContextInterceptor.java:26) ~[flowable-engine-6.8.0.jar:6.8.0]
at org.flowable.common.engine.impl.interceptor.TransactionContextInterceptor.execute(TransactionContextInterceptor.java:53) ~[flowable-engine-common-6.8.0.jar:6.8.0]
at org.flowable.common.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:105) ~[flowable-engine-common-6.8.0.jar:6.8.0]
at org.flowable.common.spring.SpringTransactionInterceptor.lambda$execute$0(SpringTransactionInterceptor.java:57) ~[flowable-spring-common-6.8.0.jar:6.8.0]
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:140) ~[spring-tx-5.3.27.jar:5.3.27]
at org.flowable.common.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:57) ~[flowable-spring-common-6.8.0.jar:6.8.0]
at org.flowable.common.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:30) ~[flowable-engine-common-6.8.0.jar:6.8.0]
at org.flowable.common.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:56) ~[flowable-engine-common-6.8.0.jar:6.8.0]

Parent process-

<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:flowable="http://flowable.org/bpmn" xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:bpmndc="http://www.omg.org/spec/BPMN/20100524/DC" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="s">
	<process id="ParallelApp-ParentProcess-s" name="ParentProcess" isExecutable="true">
		<extensionElements>
			<flowable:eventListener events="PROCESS_STARTED" flowable:delegateExpression="${ProcessStartedEventListener}"/>
			<flowable:eventListener events="ACTIVITY_STARTED" flowable:delegateExpression="${ProcessActivityListener}"/>
			<flowable:eventListener events="ACTIVITY_COMPLETED" flowable:delegateExpression="${ProcessActivityListener}"/>
			<flowable:eventListener events="ACTIVITY_CANCELLED" flowable:delegateExpression="${ProcessActivityListener}"/>
			<flowable:eventListener events="PROCESS_CREATED" flowable:delegateExpression="${ProcessEventListener}"/>
			<flowable:eventListener events="PROCESS_COMPLETED" flowable:delegateExpression="${ProcessCompletedEventListener}"/>
			<flowable:eventListener events="PROCESS_CANCELLED" flowable:delegateExpression="${ProcessCancelledEventListener}"/>
			<flowable:eventListener events="TASK_ASSIGNED" flowable:delegateExpression="${ProcessTaskListener}"/>
			<flowable:eventListener events="TASK_COMPLETED" flowable:delegateExpression="${ProcessTaskListener}"/>
			<flowable:eventListener events="TASK_CREATED" flowable:delegateExpression="${ProcessTaskListener}"/>
			<flowable:eventListener events="TIMER_FIRED" flowable:delegateExpression="${ProcessTimerListener}"/>
			<flowable:eventListener events="TIMER_SCHEDULED" flowable:delegateExpression="${ProcessTimerListener}"/>
			<flowable:eventListener events="VARIABLE_CREATED" flowable:delegateExpression="${ProcessVariableListener}"/>
			<flowable:eventListener events="VARIABLE_DELETED" flowable:delegateExpression="${ProcessVariableListener}"/>
			<flowable:eventListener events="VARIABLE_UPDATED" flowable:delegateExpression="${ProcessVariableListener}"/>
			<flowable:historyLevel xmlns:flowable="http://flowable.org/bpmn">
				<![CDATA[full]]>
			</flowable:historyLevel>
		</extensionElements>
		<scriptTask id="ScriptTask_zkmas6" name="set collection" scriptFormat="JavaScript">
			<script>
				<![CDATA[var collection = [];
var a=1;
var limit = 20;

for(; a<=limit; a++){
   collection.push(a);
}

execution.setVariable("collection", collection);
java.lang.System.out.println("In parent process set collection script task executionId="+execution.getId()+"#parentId="+execution.getParentId()+"#superId="+execution.getSuperExecutionId());

]]>
			</script>
		</scriptTask>
		<scriptTask id="ScriptTask_1j25n0m" name="Script Task" scriptFormat="JavaScript">
			<script>
				<![CDATA[java.lang.System.out.println("In parent process process script task final executionId="+execution.getId()+"#parentId="+execution.getParentId()+"#superId="+execution.getSuperExecutionId());
java.lang.System.out.println("++++++++++++++++++Execution ended now--");]]>
			</script>
		</scriptTask>
		<endEvent id="EndEvent_1139n6f" name="End"/>
		<startEvent id="StartEvent_pujeyd" name="Start">
			<extensionElements>
				<flowable:executionListener event="end" class="com.csd.services.processengine.scripttask.ProcessEngineSecureJavascriptExecutionListener">
					<flowable:field name="script">
						<flowable:string>
							<![CDATA[var a =100;]]>
						</flowable:string>
					</flowable:field>
					<flowable:field name="language" stringValue="javascript"/>
				</flowable:executionListener>
			</extensionElements>
		</startEvent>
		<callActivity id="CallActivity_j7wz5d" name="Call Child" flowable:calledElement="ParallelApp-ChildProcess-s" flowable:calledElementType="key" flowable:fallbackToDefaultTenant="true" flowable:processInstanceName="ParallelApp-ChildProcess" flowable:inheritVariables="true" flowable:completeAsync="true" flowable:async="true" flowable:exclusive="false" flowable:noWaitStatesAsyncLeave="true">
			<extensionElements>
				<flowable:executionListener event="start" class="com.csd.services.processengine.scripttask.ProcessEngineSecureJavascriptExecutionListener">
					<flowable:field name="script">
						<flowable:string>
							<![CDATA[

java.lang.System.out.println("In parent process process on before call activity executionId="+execution.getId()+"#parentId="+execution.getParentId()+"#superId="+execution.getSuperExecutionId());

var currentTime = java.lang.System.currentTimeMillis();
execution.setVariableLocal("process_instance_name", ""+currentTime);

]]>
						</flowable:string>
					</flowable:field>
					<flowable:field name="language" stringValue="javascript"/>
				</flowable:executionListener>
				<flowable:executionListener event="end" class="com.csd.services.processengine.scripttask.ProcessEngineSecureJavascriptExecutionListener">
					<flowable:field name="script">
						<flowable:string>
							<![CDATA[java.lang.System.out.println("In parent process process on after call activity executionId::"+execution.getId()+"#parentId="+execution.getParentId()+"#superId="+execution.getSuperExecutionId());]]>
						</flowable:string>
					</flowable:field>
					<flowable:field name="language" stringValue="javascript"/>
				</flowable:executionListener>
				<flowable:in sourceExpression="${process_meta}" target="process_meta"/>
			</extensionElements>
			<multiInstanceLoopCharacteristics isSequential="false" flowable:collection="${collection}">
			</multiInstanceLoopCharacteristics>
		</callActivity>
		<boundaryEvent id="BoundaryEvent_19wlw69" name="Error Event" attachedToRef="CallActivity_j7wz5d">
			<errorEventDefinition flowable:errorVariableName="errorVar" flowable:errorVariableLocalScope="false" flowable:errorVariableTransient="false"/>
		</boundaryEvent>
		<sequenceFlow id="SequenceFlow_1ajlyxw" name="" sourceRef="StartEvent_pujeyd" targetRef="ScriptTask_zkmas6"/>
		<sequenceFlow id="SequenceFlow_w9o1wn" name="" sourceRef="ScriptTask_zkmas6" targetRef="CallActivity_j7wz5d"/>
		<sequenceFlow id="SequenceFlow_cgl232" name="" sourceRef="CallActivity_j7wz5d" targetRef="ScriptTask_1j25n0m"/>
		<sequenceFlow id="SequenceFlow_xi3wpf" name="" sourceRef="ScriptTask_1j25n0m" targetRef="EndEvent_1139n6f"/>
		<sequenceFlow id="SequenceFlow_bx46lv" name="" sourceRef="BoundaryEvent_19wlw69" targetRef="EndEvent_1139n6f"/>
	</process>
</definitions>

Child Process

<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:flowable="http://flowable.org/bpmn" xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:bpmndc="http://www.omg.org/spec/BPMN/20100524/DC" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="s">
	<process id="ParallelApp-ChildProcess-s" name="ChildProcess" isExecutable="true">
		<extensionElements>
			<flowable:eventListener events="PROCESS_STARTED" flowable:delegateExpression="${ProcessStartedEventListener}"/>
			<flowable:eventListener events="ACTIVITY_STARTED" flowable:delegateExpression="${ProcessActivityListener}"/>
			<flowable:eventListener events="ACTIVITY_COMPLETED" flowable:delegateExpression="${ProcessActivityListener}"/>
			<flowable:eventListener events="ACTIVITY_CANCELLED" flowable:delegateExpression="${ProcessActivityListener}"/>
			<flowable:eventListener events="PROCESS_CREATED" flowable:delegateExpression="${ProcessEventListener}"/>
			<flowable:eventListener events="PROCESS_COMPLETED" flowable:delegateExpression="${ProcessCompletedEventListener}"/>
			<flowable:eventListener events="PROCESS_CANCELLED" flowable:delegateExpression="${ProcessCancelledEventListener}"/>
			<flowable:eventListener events="TASK_ASSIGNED" flowable:delegateExpression="${ProcessTaskListener}"/>
			<flowable:eventListener events="TASK_COMPLETED" flowable:delegateExpression="${ProcessTaskListener}"/>
			<flowable:eventListener events="TASK_CREATED" flowable:delegateExpression="${ProcessTaskListener}"/>
			<flowable:eventListener events="TIMER_FIRED" flowable:delegateExpression="${ProcessTimerListener}"/>
			<flowable:eventListener events="TIMER_SCHEDULED" flowable:delegateExpression="${ProcessTimerListener}"/>
			<flowable:eventListener events="VARIABLE_CREATED" flowable:delegateExpression="${ProcessVariableListener}"/>
			<flowable:eventListener events="VARIABLE_DELETED" flowable:delegateExpression="${ProcessVariableListener}"/>
			<flowable:eventListener events="VARIABLE_UPDATED" flowable:delegateExpression="${ProcessVariableListener}"/>
			<flowable:historyLevel xmlns:flowable="http://flowable.org/bpmn">
				<![CDATA[full]]>
			</flowable:historyLevel>
		</extensionElements>
		<endEvent id="EndEvent_1fh51j7" name="End"/>
		<startEvent id="StartEvent_15e1enc" name="Start">
			<extensionElements>
				<flowable:executionListener event="end" class="com.csd.services.processengine.scripttask.ProcessEngineSecureJavascriptExecutionListener">
					<flowable:field name="script">
						<flowable:string>
							<![CDATA[java.lang.System.out.println("In child process on after Start Event executionId="+execution.getId()+"#parentId="+execution.getParentId()+"#superId="+execution.getSuperExecutionId());]]>
						</flowable:string>
					</flowable:field>
					<flowable:field name="language" stringValue="javascript"/>
				</flowable:executionListener>
			</extensionElements>
		</startEvent>
		<serviceTask id="HttpTask_1wkv1wy" name="Http Child Task" flowable:type="http" flowable:parallelInSameTransaction="false">
			<extensionElements>
				<flowable:field name="handleStatusCodes">
					<flowable:string>
						<![CDATA[4XX,5XX]]>
					</flowable:string>
				</flowable:field>
				<flowable:field name="saveResponseVariableAsJson">
					<flowable:string>
						<![CDATA[true]]>
					</flowable:string>
				</flowable:field>
				<flowable:field name="requestUrl">
					<flowable:string>
						<![CDATA[https://httpbin.org/status/404]]>
					</flowable:string>
				</flowable:field>
				<flowable:field name="requestMethod">
					<flowable:string>
						<![CDATA[GET]]>
					</flowable:string>
				</flowable:field>
				<flowable:field name="httpActivityBehaviorClass">
					<flowable:string>
						<![CDATA[com.csd.services.processengine.httptask.ProcessengineHttpActivityBehaviorImpl]]>
					</flowable:string>
				</flowable:field>
				<flowable:field name="saveRequestVariables">
					<flowable:string>
						<![CDATA[true]]>
					</flowable:string>
				</flowable:field>
				<flowable:field name="saveResponseParameters">
					<flowable:string>
						<![CDATA[true]]>
					</flowable:string>
				</flowable:field>
			</extensionElements>
		</serviceTask>
		<sequenceFlow id="SequenceFlow_6q12m9" name="" sourceRef="StartEvent_15e1enc" targetRef="HttpTask_1wkv1wy"/>
		<sequenceFlow id="SequenceFlow_e43rxp" name="" sourceRef="HttpTask_1wkv1wy" targetRef="EndEvent_1fh51j7"/>
	</process>
</definitions>

Due to above exception, job is moving to timer job table with message type But the record is not deleted from job table. Thus flowable-bpmn-acquire-timer-jobs-move is faling saying jobid already exists.

Moreover even after adding flowable:noWaitStatesAsyncLeave=“true”, I am getting FlowableOptimisticLock exception.

Please help.

Thanks,
Prasanta