BPM Start Process Programmatically

Hello,
I am trying to manage programmatically my workflow application, in order to generate automatically actors from system users. I followed the documentation (6.1. Starting a Process Programmatically) and everything is working perfectly.
Now I want to open, from startProcess(), the StandardProcForm with only attachments and comments (after assigning actors programmatically). Is it possible? How can I do that?
One last thing, I still don’t understand why after using startProcess() I find two BPM instances of the same invocation (one is correct, the other one is empty, like a dummy instance).
Thank you

If you want to hide process actors in the standard form, then just set the procActorsVisible parameter in the start form configuration in the modeler to “false”

image

As for the process instance duplication, do you get when running the github demo (GitHub - Haulmont/cuba-bpm: OUTDATED, IS NOT MAINTAINED)?

Thank you for your answer.
I don’t have any Standard Form at the moment.
I followed the documentation “Start Process Programmatically” and now I have only one Button that invokes the startProcess(), assigning actors and procIstance automatically.
I wanted to know if it is possible to open a StandardProcForm from the startProcess() itself to manage e.g. Attachments. Or if there is an easy way to manage ProcAttachments programmatically and assign them from my Entity editor.
I tried to add a ProcAttachmentsFrame but I ended to have the same attachments to all my entities.

Sure you can do anything you want in the startProcess() method. An example of how to open the process form may be found in the com.haulmont.bpm.gui.action.StartProcessAction class. You may open a StandardProcessForm or any other screen of your project.
ProcAttachment can be created programmatically. It is a regular entity and it can be created and saved like any other entity (for instance, like ProcActor in the example) using the DataManager