Problem starting a process forom a UI-designer button

Hello,
I build a page with the UI-designer and I’m trying to set up a button to allow the user start a process from that page.
I got the process definition using the REST api: …/API/bpm/process?p=0&c=1&f=name=MiPrueba (process name MiPrueba), this is the result:

[
{
“displayDescription”: “”,
“deploymentDate”: “2017-03-09 11:51:14.483”,
“displayName”: “MiPrueba”,
“name”: “MiPrueba”,
“description”: “”,
“deployedBy”: “26”,
“id”: “8134718264282568855”,
“activationState”: “ENABLED”,
“version”: “1.0”,
“configurationState”: “RESOLVED”,
“last_update_date”: “2017-03-09 11:51:25.923”,
“actorinitiatorid”: “21”
}
]

After that I try to setup a link to this URL:

/bonita/portal/resource/process/MiPrueba/1.0/content/?id=8134718264282568855

But nothing happen. According to the Documentation, the portal URL to start a process is:
Example:
http://localhost:8080/bonita/portal/resource/process/Task%20link%20via%20email/1.0/content/?id=34951576542454

If I try http://localhost:8080//bonita/portal/resource/process/MiPrueba/1.0/content/?id=8134718264282568855 on a blanck page, I just get a blank page, no answer on display. When I check if there is any new task there is none.

I checked the logs and there is no line with errors or success, It’s like the url is just beign ignored.

I’m using bonita 7.4.2 or 7.4.3.

Can you help me understand what am I doing wrong here, I need to be able to start a process instance from a button or link on my ui-designer page.

Thanks a lot in advance

I did more test, and I noticed that my process was configured without a Instantiation form (option No form). I switched to UI designer and left empty the field of the form. Now I cant start the process from the URL, but I have to get to a page warning me that the page has no Instantiation form and I have to press a green Start button.

How can I make this work without an Instantiation form?

Hi

In My Processes, I keep the Instantiation form as No form.
I design my own custom forms and start processes using my Custom made forms.

The Below steps details the process:-

  1. From the UI designer , I select the category Application Page. Its completely Blank. I need to add all the components that I want here. I also provide a Buttom ( Submit) to Start the Process.
  2. We need the Following variables Declared in the Form
    a) context - /bonita/API/bpm/userTask/{{taskId}}/context
    b) taskId - URL paramater - id
    c) formInput and formOutput
    d) processDef - /bonita/API/bpm/process?c=1&p=0&f=name=YourProcessName here&f=activationState=ENABLED&o=version%20DESC - (Incase there is space in between , use the URL encoding to encode the name )
    e) getProcessURL(javascript) - var process = $data.processDef[0];
    return “/bonita/API/bpm/process/” + process.id + “/instantiation”;

Now in the Submit button action should be POST , urlToCall should be {{getProcessURL}} and data sent should be formOutput.

Once Design is complete. Install the Process. Go to resource,Add this page. Go to Application. Create a new Application and add the Page there.
You should Be able to open the Application url to open the Page and then use Submit button to Instantiate the process.

Hope this Helps.

Thanks a lot for your answer, I’m going to try it.

Hope it worked for you.