Lets say a process definition is deployed and process instances are being spawned continuously. There are like x (x1, x2, x3...) number of different user tasks i.e., having a different taskDefinitionKey. Lets assume that there are currently 5 types of x1 task, 17 types of x2 task and so on currently active. The user tasks in the execution flow would have some priority assigned to them initially on basis of exec variables, current workflow metrics and priority weightage already assigned to each kind of task (x1 = 4, x2 = 5, x3 = 4, ...) etc. The priority weightage for x1, x2, ... is maintained as a Consul property so that these could be updated in real time.
Now, suddenly the admin wishes to update the priority weightage like (x1 = 7, x2 = 2, x3 = 1, ...) via an Admin Panel (may be Consul), the priorities must be updated for all the existing tasks. For new upcoming tasks, priorities must be assigned on basis of exec variables and new custom weightage. The question that which all tasks need to be updated can be either all the tasks or a subset of tasks filtered on basis of some criteria.
The new process definitions or new upcoming tasks can behave according to new settings i.e., their priorities can be assigned as per latest exec variables, current workflow metrics and priority weightage.
But, updating existing tasks via Task Update API (there can be one, hundreds, thousands or count may scale upto millions) would be a very heavy activity. I mean iterating over all the tasks of all process instances of all process definitions can be too much cumbersome, verbose and poor programming practise.
I am looking for the best possible solution/infra/worker-process to achieve dynamic assigning/updating of priorities for some or all kinds of tasks.
You can use the public API DynamicBpmnService.
DynamicBpmnService (Activiti - Engine 5.22.0 API)
Sample Code
activiti-examples/ChangeUserTask.java at master · balsarori/activiti-examples · GitHub
Ask for and offer help to other Alfresco Process Services and Activiti Users and members of the Alfresco team.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.