Suspending process instance not suspending service tasks and user tasks

Our usecase is need to invoke custom service(another simple BPM for performing some business checks) before every service task bigin. So we are trying to implement the flow such that
start → User Task → Start task (here added execution listener[event=‘start’] to suspend current process and trigger child process) → Another service task(same child process as previous task) → end.

When we suspend the current process instance in execution listener, process goes to suspension_state, but tasks are still in active state. After child process completion, when we try to activate suspended process, getting below error.

Cannot set suspension state ‘active’ for task … ’: already in state ‘active’.

PS: Child process flow is
start → service task → end (here added execution listener[event=‘end’] to resume parent process)

Suspend using API

CommandContextUtil.getProcessEngineConfiguration().getRuntimeService().suspendProcessInstanceById(execution.getProcessInstanceId());

Process activation using below API

CommandContextUtil.getProcessEngineConfiguration().getRuntimeService().activateProcessInstanceById(execution.getVariable(“parentProcessInstanceId”).toString())

Hi.
Why do you want to suspend parent process?

Martin

Hi Martin, thank you for the reply.
Child process performing some business rules and send back the result to parent process. Based on that next task will get executed and invoke same child process to prepare business data for next task and so on.

We are bit new to flowable. So if there is any other alternatives, we are open to change the flow model.

From my point of view there is no need to suspend the process.
(Do you suspend java thread when you call the method?)

Regards
Martin