So I have found myself with a rather unique problem. I’m pretty familiar with the standard paradigm of “User Clicks Submit, update the Workflow Task” and all the underlying APIs associated with that behavior (task.CompleteTask() being chief among them).
The problem I find myself looking at now is that I have a UI interface where the user will select multiple objects. Each object is backed by its own workflow. When the user selects multiple objects and submits, only the selected objects (upwards of 500 in a single bundle) update their corresponding workflows (think bulk approval of a bunch of tasks). What’s the best way to target a batch update behavior like this? I can only think of two solutions. The first is to loop through each of my 500 objects and individually update the workflow for each object. That’s going to be awful for performance though (JDBC not being a fan of rapid-fire DB calls like that). The other solution I can think of is to use an intermediate event that waits for the signal from the task API. The problem I run into with this idea is that as far as I understand events are broadcast to all workflows. I need a precise update, because while I want to bulk complete 500 workflow tasks, I could have another 200 tasks that I want to stay right where they are.
Since I can’t see the solution, I thought I throw it out here and see if anyone could offer insight. I’m running Flowable 6.4 currently.