Tasks that are open in a process can’t be deleted - they can only be completed.
Deleting a task would leave the process in a ‘corrupted’ state - the execution does’t know where to go to (e.g. imagine doing doing this to a task that’s after a parallel gateway fork - what should the execution do?).
Have you looked at the process migration API? That might suit your use case.
is there anyway to force cancel or complete the task if it has no outgoing sequence error.
(e.g the process were not design correctly and it has the no outgoing sequence error, how we can cancel the process or complete its task programmatically)
I have tried below method but getting the "No Outgoing sequence exception)
runtimeService.deleteProcessInstance(processInstanceId, deleteReason);