Add data to DBM from a Application Page

I created an application page with data from the DBM, that works perfect.

Now I would like the user to be able to add new data to the DBM. I think what I should do is add a button widget that calls a process with the form to add the information, but I don't know how to do it.

I already added a button and in the properties select "Start a process", but how do I indicate which process to start?

Hi,

There are 2 cases:

  • The process has an instantiation form, and you want to redirect the user to this form: You can use the Link widget and the process instantiation type. You’ll be able to set a process name and version.
  • The process has contract, but you want to reuse your current page without redirecting the user: You can use a Button with a POST action directly from your page. First, you’ll need to retrieve the process definition id using a processDefinitionVar external variable and the following API:
    ../API/bpm/process?f=name=MyProcess&p=0&c=1&o=version%20desc&f=activationState=ENABLED
    It should return a list of process definition with one element.
    Then you can call the POST on the button using the following API:
    ../API/bpm/process/{{processDefinitionVar[0].id}}/instantiation and use the data send on click property of the button to pass the contract (not required if the process has no contract).

HTH
Romain

Thank you Romain!

That's works perfect!