Move instance to another component with REST API

Hi there, here is an example of my scenario

Let’s assume that I have an instance at Call Activity. What I’m trying to move the instance to Complete skipping ST1, ST2 and ST3. I think I can achieve that with Migration Rest Calls. If so, how? If there is another option to do this, can you guys give me some tips?

Thanks in advance!

Edit1: I couldnt get success with Migration API. Here is error I got.

{
    "type": "MigrationPlanValidationException",
    "message": "ENGINE-23001 Migration plan for process definition 'order1:4:274af5a9-ddd4-11e9-8800-c0b6f9ad3743' to 'order1:4:274af5a9-ddd4-11e9-8800-c0b6f9ad3743' is not valid:\n\t Migration instruction MigrationInstructionImpl{sourceActivityId='Task_1syz8ax', targetActivityId='order_complete', updateEventTrigger='false'} is not valid:\n\t\tActivities have incompatible types (CallActivityBehavior is not compatible with NoneEndEventActivityBehavior)\n",
    "validationReport": {
        "instructionReports": [
            {
                "instruction": {
                    "sourceActivityIds": [
                        "Task_1syz8ax"
                    ],
                    "targetActivityIds": [
                        "order_complete"
                    ],
                    "updateEventTrigger": false
                },
                "failures": [
                    "Activities have incompatible types (CallActivityBehavior is not compatible with NoneEndEventActivityBehavior)"
                ]
            }
        ]
    }
}

Hi @keremcan,

It is not clear for me if you are talking for migration between two versions of a process or you have running instance which you want to modify?
If it’s the latter please check the following endpoint:
https://docs.camunda.org/manual/develop/reference/rest/modification/post-modification-sync/

Hey @Yana, I don’t want to migrate my instance. I want to skip some components instead of executing them. It’s like “Okey, I’m going to end this flow now.”

Hi @keremcan,

with the API Yana recommended you should be able to achieve that.

Best,
Tobias

1 Like