Flowable Variable reset to NULL

we have created a process in Flowable and it is calling child sub-processes and it is inheriting variables from parent to child for processing the request. we want to nullify the sub-processes and root process variables to NULL or empty.
Kindly suggest if child processes are completed, and how we can NULLIFY the subprocess variable to NULL from the parent process.
If we reset in child process then the parent process variable is also set to NULL which is causing in the parent process.
we want to do this in the last task of the parent process.
Kindly share your input.

I’m not sure I follow this yet … can you give a more elaborate example?

In any case, the variable between child and parent process instance are separated and they are mapped in and out of the child process. So there’s no need to make a child process instance variable null from the parent process instance.

The parent process is - order validation process.bpmn and it is taking few input variables to process the request and then adds a subprocess as validate portfolio rule “portfolio.bpmn” and it inherits a few variables to validate against the order.
once the parent process is finished we need to delete these variables for the parent and sub-process at the last task in the parent process. Is there any method or way to delete these variables?

Could you explain why you need to delete the variables at the end of the parent process? What are they interfering with? Are you trying to use their presence/absence to determine some kind of state? Generally speaking I would think that once a process instance is done/complete, its variables would be left with whatever values they had and shouldn’t affect anything else.

ok. But we want to keep corelation id into flowable rest order payload we want to remove post processing of the request.