Get data from another database (not from business data) and do some operations at the start of a process (before instantiation form)

1
0
-1

Hi,

I would like to know if there is a way to get some data from another database, which is not the business data database as well as do some operations, at the very start of a process, before the user is being shown a form.

There are some data that needs to be retrieved before the start of a process and currently we're using a service task right after the start of the process to retrieve the necessary data and do some operations before displaying a page to the user. After the service task, then we have the human task, where the user will be able to input their request.

This way works fine, except for the annoying page the user will be shown at the start, which is a page that says "The information has been submitted. A task is now available." along with the link to the page on the human task. The user can then click the link and the task will be executed as normal.

The question is, is it possible to remove that page? I believe the page itself is the result of changing the pool instantiation form to 6.x and checking the "skip" at the 6.x. Application tab's Pageflow. It's just that we've been getting some complaints about why we need to have that page before the actual input page. As of now, the only way I can think of is making some kind of an autoredirection so that the user will not have to click the button and be brought to the human task right after the service task has been completed. But I'm not sure as to how to do autoredirection here either. Maybe there is a better solution as well?

Any kind of help will be very much appreciated. Thank you!

1 answer

1
0
-1

Hello,

To request an external DB is a really common use case:

  • From process: use a Database Connector (there are multiple of them by default)
  • From UI: build your own REST API Extension that does the request the DB with JDBC or so

You cannot execute something from the process before the instantiation form because the instantiation form is displayed before an instance of the process is created (after you submit the form). If you need to display information on the instantiation form you will need to use the option #2 for sure.

HIH,

Comments

Submitted by jo.pris_1380889 on Fri, 11/16/2018 - 03:34

Hi and thanks for your answer.

A few more questions:

  • We're using the community edition, is it possible to build our own REST API Extension?

  • Is it possible to use another way than using the instantiation form? As I have written above, we're currently using a human task to display the form, although there is a page displayed before the input page we designed in the human task that we would like to remove. I've attached the image: 2aaB9Zo

Thank you.

Submitted by pierrick.voulet on Fri, 11/16/2018 - 04:25

You can have your REST API Extension on Community but cannot manage them directly from the Studio though.

If you are using a human task then you use a task form. The drawback of this solution is that some process instance may never end when the end user never submit the task form for whatever (good or bad) reason. We usually like to start a new instance of a given process ONLY if we have all the necessary input to start which is done using the instantiation form as I suggested previously.

Anyway, not sure exactly what is going on but you might want to give a try to the "no form" option. Best would be to share screenshots or BOS file to better understand where this message is from.

Cheers,

Submitted by jo.pris_1380889 on Fri, 11/16/2018 - 04:56

Is it possible for you to post a link or point me out as to how to create a new REST API Extension without managing them through the Studio? The documentation that I could find is only for the Subscription Edition, and I suspect it would have to be created differently?

Yes, the drawback you mentioned is yet another problem with our BPM process. We are also trying to find a workaround for that, and if the solution you mentioned previously, using a custom made REST API Extension would fix this too, we would definitely give it a try!

I also tried the "no form" option and when I run it directly from the Studio, it will go to the case details on the portal (not the form on the human task), while running it through the living application would present us with a blank page. I would post screenshots of the BOS file but I'm afraid some parts might be considered to be the company's confidential information. We're definitely willing to try the custom REST API Extension solution though!

Thanks!

Submitted by pierrick.voulet on Fri, 11/16/2018 - 06:08

Any REST API Extension project is a Java/Maven project. The Enterprise Studio integrates a perspective to develop directly from there but you can use your favorite Java IDE too. Here is the REST API Extension example project, you will need to change some dependency versions and groupIds from COM to ORG but it should work.

Submitted by jo.pris_1380889 on Fri, 11/16/2018 - 09:32

Thank you. We'll give it a try!

Notifications