Use of Portal component

Hello!

I am Alfredo Cuevas, I have been spending time learning how to use Bonita Soft since I think it will be very useful for automating the existing processes in a Notary.

Context

I have studied and performed the included exercises

  • With version 7.8x the exercise to create the application of “Leave a Request” (video https: //www.bonitasoft.com/videos/bonita-camp-7-8-learn-how-build-bonita ... and with the exercises.pdf file)
  • With version 7.10 the “Claims Management” exercise shown on this version's page (Getting started tutorial section - https://documentation.bonitasoft.com/bonita/7.10/_getting-started-tutorial)

For the exercises in version 7.8 I also performed them in version 7.10 and I was able to develop them all satisfactorily with the expected results.

Question

For the purposes that I would like to use with the Bonita solution, I would like to know if it is possible not to use the environment of the Portal component, that is, to present to users only the applications that are developed. For example, if I take the exercise of version 7.8 as a basis, the application that was developed allows you to capture the leave request with the walter.bates user and presents a list of applications that have been approved or rejected. If I wish to authorize the leave, I must enter the Portal component, sign up with the user helen.kelly, take the task and authorize / reject it. I use an environment of a web page (application) without the portal environment to request leave and I must sign in portal to be able to validate the leave.

Is it possible to create an application that works with another application-page (using the page group and the customized menu) where on one page you can see this list and the request for new leave, and on the other page within the menu the option is presented Validation for authorization?

I have tried to do it by creating both applications-pages and joining them through the use of a menu, but something is missing to show me on the leave validation page any pending authorization / rejection since it does not show me any data of any Request to validate, the other authorization page in the menu works without problem.

I hope you can support me.

Regards!

Alfredo

Hi Alfredo,

Yes absolutely you can expose to end users standalone applications (aka Living Apps in Bonita) so they don't need to login and/or execute tasks from within the Bonita portal. You can also reuse pages built with the UIDesigner in different applications by using the graphical composition environment available in Bonita Portal->Applications menu (for Administrator profile).

Please make sure that you have defined who can do what in underlying processes of your application. This is probably what is preventing your user to see pending "request to validate" in your example.

best

Dear Alfredo, 

Reading your request it seems that you want to have, in your application page, the same view that you see on the portal Task page, that has the list of available task and when you click on a task in the list you see the task form on the right hand. Correct?

You can have the available task form in your application simply adding some variables and widget. I assume here that you want Task for specific Process, but the same is valid for all process if you want with some modification. 

In your application you should add a variable that ask available human task for the specific user currently logged:

taskList: eternal API:  

../API/bpm/humanTask?p=0&c=20&f=assigned_id={{userLogged.user_id}}

where userLogged is the variable: userLogged: external API:

../API/system/session/1

the variable taskList contain all the human task available for that user. Now if you want only task for specific process/task you have to filter such variable (continue reading).

Now you have to insert a table widget that in the content property has such variable: taskList|filter{name:"takName"} <--- here you filter as you want. Changing filter you can choose to show only specific task instances
In the Selected row property you should link a string variable, for example: selectedTask: string.

In the table you'll see al available (filtered) human task. Selecting one row, You'll find task data in the variable selectedTask. 

Now you have to extract the link that point to the form of the selected uman task. Just create a variable that is:
taskLink: javascript:

if ($data.selectedTask)
{
    var task = $data.selectedTask;
    return "/bonita/portal/form/taskInstance/"+ task.id;
} else
    return "#"

Here you have the link that point the selected human task form. You can just test this link using the link widget with custom url property set to taskLink variable.

Now If you want to see the form on the same page you have to put a livingApplicationFrameV4 widget that take the taskLink as Source. That's it!
Probably here You'll see the form in a scrollable fashion. Here you have to play a bit with CSS. Maybe someone on this forum can give us a hint, because I'm still trying to view the full form instead of the scrollable version.