In project I work on we have an entity browser screen for some entity (let’s call it Work), from which I want to call different BPM processes for these entities. Processes in question have Input dialogs with parameters defined in each process individually in their starting node. Also they have one common parameter - Work process is called for, which is already defined by the row in entity browser, for which BPM-calling action is triggered. How exactly should I call process exectution to correctly pass selected Work into it and summon Input dialog for process-dependent parameters at the same time?
If I use RuntimeService.startProcessInstanceByKey(String processDefinitionKey, String businessKey, Map<String, Object> variables) method, I can pass selected Work as parameter, however input dialog in starting node is skipped.
If I use ProcessFormScreens.createStartProcessForm(ProcessDefinition processDefinition, FrameOwner frameOwner) method, I see input dialog of starting node and can input other parameters, however there is nowhere to pass selected Work entity.
Jmix version 1.6.2 (plugin version 2.0.4-223), Intellij Idea Community Edition 2022.3.3