Hi @gustavjf,
Sorry for the late reply.
Actually we think there is a huge opportunity to orchestrate the “User Subtasks” within an app in order to perform a “User Task” of a workflow, if modeled as a sub-process of the workflow User Task. This will eliminate developer logic for controlling the subtask flow that typically goes in the “controller” or “application services” layer of the client-side app and the flow logic will be orchestrated by the BPMN engine like bpmn-js.
While server-side execution by a high-performance relatively lower-latency engine like Zeebe is still possible for client-side subtask level flow orchestration, there will be the typical client-server lag associated with it. Also, the execution logic is mostly local, so a local engine makes most sense.
We’re in fact adopting Dart for all our client-side apps (now that Flutter for Web is eliminating need for traditional web frameworks) and exploring how we can execute BPMN in client-side apps within Dart. It’s possible to port the bpmn-js library to Dart. We’re looking at what else is out there.
By the way, Statecharts-based (https://statecharts.github.io) orchestration of user interaction is receiving a renewed interest now and the two approaches, Statecharts and BPMN, actually serves the same role and BPMN has some advantages.
Thanks!