Execute task in application without open portal



i'm new to bonita software and i'm trying to create my first application. I have created a workflow that basicly is a sequence of human task. I have created the home page of my application and i created a button the make the process start. Once th process start the portal opens and the task is available to the user. There is a way to execute the task without open the portal?

2 answers


If you want to interact with the Bonita platform/engine without using the portal, they have REST and Java API's:


In my application, I have a scenario where I want to execute tasks as users but don't want them to log into the portal. When my users do actions in my application, I use the Java (Engine) API to execute the related Bonita human tasks on their behalf.



If you have defined the application, that application has a link like: "http://localhost:8080/bonita/apps/appname/app_page" where appname is the name you just give to the app and app_page is the name of the custom page that define the application you are running. If you want to stay on the app without go to the portal, in each task form, the submit button has a property called "Target URL on success". This field tells to the task form where go after the form has successfully sent. For example see here: https://gyazo.com/f2971e5782b348d87a63c123d4bd8f3a

In this way when you submit the form, you'll automatically goes to the app page.

Just remember that if you want to stay on the app and never go to the portal, you have to implement strategy to assign task to the user. You can also implement actor filters to auto-assign task to specified user.

Best regards,



Submitted by m.gusmini004_1421257 on Mon, 02/24/2020 - 09:54

In my case i have to execute more task in a row so how i can link the "Target URL on success" to the next form? I have to convert every custom form in a page an the add it to application?

Submitted by massimiliano.do... on Mon, 02/24/2020 - 15:57

You can't convert form to application page. Instead you could manage task directly from your application. For example, think that you have a page where you want to show all task assigned to a user and give the opportunity to run the task. In your application page, define such variables:

loggedUser : external API: ../API/system/session/1

user : external API: ../API/identity/user?p=0&c=30&o=lastname%20ASC&f=enabled%3dtrue&s={{loggedUser.user_name}}&d=professional_data&d=manager_id

taskList : external API: ../API/bpm/humanTask?p=0&c=20&f=assigned_id={{user[0].id}}

Then you should put a container in the page and the Collection property of the container to the variable taskList.

In the container you can put text object that contain for example:

{{$index + 1}} to show a progressive number

{{$item.displayDescription}} to show the display description of the task

{{$item.last_update_date}} to show the last update date of the task

{{$item.caseId}} - {{$item.id}} to show both caseId and task ID

Then you put a link with type Human Task Form, in the Task Id you put $item.id and Frame Current frame (_self)

In this container You'll see all the task assigned to the user. If you execute a task, then You'll see the next task available when you'll go back to the page.