# Migrate task and invoking springbean method

**URL:** <https://forum.flowable.org/t/migrate-task-and-invoking-springbean-method/4967>\
**Category:** Uncategorized\
**Created:** [November 27, 2019, 9:58am UTC](https://forum.flowable.org/t/migrate-task-and-invoking-springbean-method/4967 "2019-11-27T09:58:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kajetan](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/kajetan/32/1096_2.png) [@kajetan](https://forum.flowable.org/u/kajetan)\
**Post date:** [November 27, 2019, 9:58am UTC](https://forum.flowable.org/t/migrate-task-and-invoking-springbean-method/4967/1 "2019-11-27T09:58:06Z")

</div>

Hi. We have service for migrating task to other task inside one process.

```
	ActivityMigrationMapping mapping = new ActivityMigrationMapping.OneToOneMapping(fromTaskDefId, toTaskDefId);

	// Run task migration
	runtimeService.createProcessInstanceMigrationBuilder()
		.migrateToProcessDefinition(processDefinitionId).addActivityMigrationMapping(mapping)
		.migrate(processInstanceId);

```

But taskListener ${someSpringBean.doSomething(execution)}

is not executed. Are there some instructions to execute it?

Thanks

---

<div class="post-metadata">

**Author:** ![joram](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/joram/32/26_2.png) [@joram](https://forum.flowable.org/u/joram)\
**Post date:** [December 4, 2019, 5:58pm UTC](https://forum.flowable.org/t/migrate-task-and-invoking-springbean-method/4967/2 "2019-12-04T17:58:17Z")

</div>

Do you mean that task listeners are not executed during migration?

If so, that’s indeed currently not supported and would need an additional setting during migration (as you often wouldn’t want this to trigger automatically during migration).
