Tasks and ProcessDefinition with BPM

Hii all, we are migrating from cuba to jmix and we have used Bproc in cuba, so while migrating we came to know about changes in bproc and bpm.
and I would like to know whether somee things are samw or not, please the the code below: TaskDataQuery candidatesTaskDataQuery = this.bprocTaskService.createTaskDataQuery();
reeplaced with
TaskQuery candidatesTaskDataQuery = this.bpmTaskService.createTaskQuery();
and
List(ProcessDefinitionData) processDefinitions = this.bprocRepositoryService.createProcessDefinitionDataQuery()
replaced with
List(ProcessDefinition) processDefinitions = this.bpmRepositoryService.createProcessDefinitionQuery()

are things things same or not

Hello, friend!

Let’s see changes between CUBA and Jmix.

First of all, in CUBA bpmn engine was BProc. Right now, in Jmix there is Flowable. So, platform did same methods and services for internal logics, but in fact, the most of business rules inside BPM provided by it’s BPM platform.
The most difference would be in Flowable/Bproc API. For example, Flowable using Unit of Work pattern for all common APIs like:
RepositoryService, TaskService, etc
image

Flowable tends to offer a more extensive set of APIs and extension points for customizing and extending the platform’s functionality. BProc’s customization options may be limited to what the community provides or requires more effort to implement customizations.

API common

If you check flowable api docs, you would see they are really similar. Example:

  1. BProc
List<TaskData> tasks = bprocTaskService.createTaskDataQuery()
    .taskAssignee("kermit")
    .processVariableValueEquals("orderId",  "0815")
    .desc()
    .list();
  1. Flowable
List<Task> tasks = taskService.createTaskQuery()
    .taskAssignee("kermit")
    .processVariableValueEquals("orderId", "0815")
    .desc()
    .list();

TaskData and Task models are not the same, but very similar.

About your ask

  1. bprocTaskService and bpmTaskService are not the same. bpmTaskService is inheritor of TaskService that come From Flowable.
  2. In case of writing business logics inside your applications they are pretty common.

Regards, Dmitry

1 Like