Where should I initialize the BPM flow?

Hello,

I’m trying use BPM component for the Organization Registration flow.
I’ve created a custom form that extends AbstractWindow and implements ProcForm and set it as the Start Form for the flow Start Event. Though, I don’t understand exactly where I’m supposed to initialize the process programmatically (I don’t want the ‘Start’ button displayed)

Also, as I read in the documentation, the custom form parameters are automatically bound to the process parameters map as form results. Is it possible to bind also some service task outputs in order to use them later as inputs for other service tasks?

Thank you,
Codrin

Screen Shot 2017-08-28 at 5.37.40 PM

1 Like

Hi,
start process button will be displayed if you initialize the ProcActionsFrame as described here: https://doc.cuba-platform.com/bpm-6.6/qs_contract_edit_controller.html. If you don’t want to use this frame, you can create your own button and execute the ProcessRuntimeService.startProcess(…) method in it.
I don’t understand what do you mean by “custom form parameters”, but if you are talking about the map that is returned from the getFormResult() method of you custom form, then yes - these parameters will be automatically added to the process variables. You also can add and get process variables from any place of you code using the com.haulmont.workflow.core.app.ProcessVariableService.
To save the service task output as process variable, just specify the variable name in the ‘Result variable name’ property of service task node in the modeler.