# org.flowable.common.engine.api.FlowableException: Could not find a dataSource for tenant null

**URL:** <https://forum.flowable.org/t/org-flowable-common-engine-api-flowableexception-could-not-find-a-datasource-for-tenant-null/6832>\
**Category:** Uncategorized\
**Created:** [September 24, 2020, 1:42pm UTC](https://forum.flowable.org/t/org-flowable-common-engine-api-flowableexception-could-not-find-a-datasource-for-tenant-null/6832 "2020-09-24T13:42:31Z")\
**Posts on this page:** 1\
**Showing post:** 3

<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:** [September 30, 2020, 10:13pm UTC](https://forum.flowable.org/t/org-flowable-common-engine-api-flowableexception-could-not-find-a-datasource-for-tenant-null/6832/3 "2020-09-30T22:13:26Z")

</div>

When starting the process instance, do you set the current tenantId? The TenantAwareDataSource can’t know which tenant it needs to pick. It won’t pick it up from the .tenantId() in the start method.  
See example here: [https://github.com/flowable/flowable-engine/blob/master/modules/flowable-engine/src/test/java/org/flowable/engine/test/cfg/multitenant/MultiTenantProcessEngineTest.java#L152](https://github.com/flowable/flowable-engine/blob/master/modules/flowable-engine/src/test/java/org/flowable/engine/test/cfg/multitenant/MultiTenantProcessEngineTest.java#L152)

---

_[View the full topic](https://forum.flowable.org/t/org-flowable-common-engine-api-flowableexception-could-not-find-a-datasource-for-tenant-null/6832)._
