How to get differentiate flowable case tasks from process tasks

Flowable process, cmmn tasks (getting tasks list) API’s listing both process tasks and cmmn tasks.
How can we differentiate these tasks such that when we use process tasks API we need to get only the related to process similarly when we use case tasks API we need to get tasks related to the case.

Cmmn tasks have scopeType=ScopeTypes.CMMN. So you could get these by applying that filter to the query. However, bpmn tasks don’t have such a thing (historical/backwards compatibility reasons)

Hi @Joram,

Is there any way to set the scopeType like ‘bpmn’ for process tasks. If yes how can we achieve?

Tried by setting scopeType as ‘bpmn’ in UserTaskActivityBehavior execute() method.

taskEntity.setScopeType(ScopeTypes.CMMN);

But it is causing issue while running ‘saveUserTaskTest()’ in TaskServiceTest.

Getting the SQL exception

Syntax error in SQL statement "UPDATE ACT_RU_TASK SET REV_ = ?, NAME_ = ?,
PRIORITY_ = ?, CREATE_TIME_ = ?, EXECUTION_ID_ = ?, PROC_DEF_ID_ = ?,
TASK_DEF_KEY_ = ?,
SCOPE_TYPE_ = ?
DUE_DATE_[*] = ?,
CATEGORY_ = ?, SUSPENSION_STATE_ = ?, IS_COUNT_ENABLED_ = ?, VAR_COUNT_ = ?, ID_LINK_COUNT_ = ?, SUB_TASK_COUNT_ = ? WHERE ID_= ? AND REV_ = ? ";