Hello!
We have a need for some already running processInstance add new actions.
Every action we have it is a serviceTask(delegate expression) which consists of two parts and is executed in another system (an external system can execute its Task for several days and send a response). For example:
processDefenition_V1:
startEvent → TaskA → TaskB → TaskD → … → End
. . . . . . . . . . . . . . . . → TaskC
@Component
public class TaskExecutor extends AbstractBpmnActivityBehavior {
public void execute(final ActivityExecution execution){
String executionId = execution.getId();// save for signal
// do on start
}
public void signal(ActivityExecution execution, String signalName, Object signalData) {
// do on finish
leave(execution);
}
}
when we need to add another action, we add it to:
processDefenition_V2
startEvent → TaskA → TaskB → TaskD → … → End
. . . . . . . . . . . . . . . . → TaskC
. . . . . . . . . . . . . . . . → TaskNew
and we try to migrate the specific processInstance to processDefenitionV2, but we get the next exeption for each Task that is currently open (executed on another system and signal has not been received yet):
“The type of the source activity is not supported for activity instance migration”
This error is due to validation, from source camunda:
class SupportedActivityInstanceValidator
if (!SupportedActivityValidator.INSTANCE.isSupportedActivity(sourceActivity)) {
instanceReport.addFailure(“The type of the source activity is not supported for activity instance migration”);
}
in debag sourceActivity is ServiceTaskDelegateExpressionActivityBehavior.
Could you help me please:
- perhaps instead of AbstractBpmnActivityBehavior we need to use something else;
- maybe there is another mechanism for adding Task to the already running processInstance instead of migration;
-something else.
Thanks