How to use the CaseOverview without data in the Bonita Database?

1
0
-1

Hello
I need to display a case overview, using the Case overview form.
Let's imagine that we want to display the case 2001. So, the URL to display 2001 is /bonita/portal/form/processInstance/2001

Fine, it works.

Ok, now let's imagine the case 2001 is not anymore in the Bonita Database, but save outside. But we still want to use the Process Form to display theses information, and just the data is not in the Bonita Database
So, I imagine to do a filter, and each time Bonita want to get information on the case, if the case is not in Bonita, just send it as Bonita.
But the point is the /bonita/portal/form/processInstance/2001 does 2 different operations:
1/ it checks that 2001 exist in the database
2/ and it returns an HTML.

Option on the table are:
1/ in the filter, I return the HTML. Where is the original one?
2/ in the filter, I replace 2001 by 13003 (because this case exists), and then Bonita should continue, isn't it? I didn't detect 2001 in the HTML...
But when I try to forward the request, via
newURI = "/bonita/portal/form/processInstance/" + processInstanceCandidate;
servletRequest.getRequestDispatcher(newURI).forward(servletRequest, servletResponse);

It's not working, I still get a 404
3/ I deliver a url "/bonita/portal/form/processInstance/13003?realid=2001, then I should pass the first pass, and in the filter, I saved 2001 in the TomcatSession.realid and then for all another call, I recalculate for 2001. But when to stop and clear the TomcatSession.realId? Ok, next time I see a "/bonita/portal/form/processInstance" ?

And the main issue is that maybe there is no more active case, or the user does not have access right to 13003.

4/ I save one line in the Bonita Database, only one record in the ARCH_PROCESS_INSTANCE table, then Bonita should accept to return the first URL.

Any idea?

Comments

Submitted by nicolas.chabanoles on Mon, 10/19/2020 - 16:54

Hi,

Case Overview is the capacity to display a form attached to a Bonita Case (it requires an existing case in Bonita).

Why would you like to "hack" the feature to display the case overview of a non-existing case?

In Bonita, you can create your own page using the UIDesigner, put it in your application and display the information you want. Why not simply go in this direction to implement your own Overview that will handle the data retrieval where it is stored?

Captain Bonita

Submitted by Pierre-yves Monnet on Mon, 10/19/2020 - 22:14

Thank Cap Bonita,

the point is a UI Designer form is already developed to display the case overview. So, what you proposed is to duplicate each overview, isn't? There is about 50 processes so far.

I found that it seem possible to use this mechanism if we save in the Archive Bonita Database

* a or 2 records per case in the ARCH_PROCESS_INSTANCE (I have to pay attention to not fire the Dross Data mechanism) - for root and subprocess cases)

* a record per user tasks

Then, the Bonita Portal detect the case, check permission (that why you need to keep user's tasks) and return the HTML.

After, filter is used to search the information where it should be present.

I perfectly understand this is a "hack", but it seem acceptable. For Bonita point of view, it's acceptable to have a partial information in the Archives tables (with the Configurable Archive service, we can decide to not save some content), just what is necessary, is not keep the information consistent then the Purge Dross mechanism to not delete that.

And then, it's make sense,when you have a lot of archive data (more than 1 000 000 cases) to try to reduce the Bonita Database size to keep the performance. So, externalize data.

No answers yet.
Notifications