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?