Is it possible start a process , using API REST , without to press the execute button from bonita studio?

1
0
-1

Hi ,i want to create a personal web page that allow me to start a process through a button . I have reviewed this documentation :http://documentation.bonitasoft.com/bpm-api-1#process

but i haven't understood, i saw that for start a case for example i have to get the processDefinitionId, so how i obtain it , if the process still has not begun.

I'm using : PHP with CURL library in order to create my querys , and bonita 6.5.1

Regards.

2 answers

1
+1
-1

When you click on "Run" button several steps are actually performed automatically for you:

  • Process is build: the .bar file is generated with the current configuration of the process and connector implementation are embedded in the bar file.
  • bar file is deployed to the test environment embedded in Bonita Studio (i.e. Apache Tomcat application server + h2 database)
  • The process instantiation form is loaded in your web browser. If you click on the submit button of this process instantiation form a new instance of the process is created (before that no instance exist).

So if you build your own program to do the same you will need to take of similar steps:

  • To generate the bar file do it manually in the Studio. You can also do it using Studio API (only in Subscription edition).
  • To deploy the bar file, take a look at the documentation example. Client program is in Java but should be easy to adapt to PHP.
  • Then to instantiate the process I think you already find the correct method!

1
0
-1

Further to Antoine's answer I think you're looking at this all wrong.

Studio is purely for Bonitasoft Development and not to run processes that have been considered finished and ready for production.

In this instance what you need to do is

Create your process in Bonitasoft Studio, export/import it to a PORTAL environment (User Test Environment), and then have your personal page start the process to this environment.

Yes you will still have to get the processDefinitionId, and in this case the one specific to the User Test Environment environment but you already know how to do that from a previous article.

regards
Seán

Notifications