Handling IO-Mapping in Process instance modifications

Hello everyone,

after days of trying around, I might need some help with process instance modifications.

I´ll try to simplify my situation:

Imagine a simple process with one user task (A) with IO-mapping. The process instance currently contains one single token within A. But the input mapping of A worked wrong caused by an invalid value of the “source variable”. Now I have changed the variable value and want to move the token before A again. So I do

 RuntimeService.createProcessInstanceModification("process:instance")
            .cancelActivityInstance("A:old")
            .startBeforeActivity("A", "process:instance")
            .execute(false, true);        

I am forced to skip IO mapping because cancelling “A:old” would process the output-parameters of “A:old”. I do not want that, because the output variable should not be in the scope when A is executed. But then “A:new” does no input mapping…which causes errors within A.

Is there any way to do a token movement (with input mapping inclusive) without processing the output-parameters of the cancelled activity? In my case it would be useful to have the ability to set the skip-parameter for each modification instruction step separately. I don´t see any reasons why I should process output-parameters of an activity I want to cancel.

Thanks in advance!
Carsten

My (dirty) workaround is as follows:

ProcessInstanceModificationBuilder builder = runtimeService.createProcessInstanceModification(camundaInstanceId);
((ProcessInstanceModificationBuilderImpl) builder).getModificationOperations().add(new ActivityInstanceCancellationCmdExt(taskInstance.getProcessInstanceId(), taskInstance.getId()));
((ProcessInstanceModificationBuilderImpl) builder).getModificationOperations().add(new ActivityBeforeInstantiationCmd(taskInstance.getProcessInstanceId(), targetActivity, parent));
builder.execute();

where ActivityInstanceCancellationCmdExt is forced to skip IO-Mapping by myself. I currently do not see any other way to solve my problem, described above. I remain open to suggestions for a better solution.

Best regards,
Carsten