How to know when a bpt light has finished
Question

Hello I need to know when a process has finished to notify the user and activate a new screen, how can I know?

mvp_badge
MVP
Solution

Hi,

There is nothing builtin in OutSystems that allows you to check that by code.

You need to code this logic yourself and execute it as last step in the automatic activity.

Regards,

Daniel


Hello Cris,

can't you do it as the last step of the process?

Not sure what kind of notification and actions you want to perform, but inside the process you can create logic.

Best regards

mvp_badge
MVP
Solution

Hi,

There is nothing builtin in OutSystems that allows you to check that by code.

You need to code this logic yourself and execute it as last step in the automatic activity.

Regards,

Daniel


No, I cannot enter it as the last step since it is in a service module, which is called from an end-user that shows a loading.

I wanted to pass a process output variable, so that I could unload and redirect the user to another screen, but I don't see how.

After lauching the process, you get the ProcessId:


From here you can create a loop to query Activity table from (System) and check the Status of the Process. Don't forget to limit in time or tries the number of iterations of the loop.


Regards


mvp_badge
MVP

If you launch a process, it is no longer a Light BPT, instead it will be scheduled as a BPT process.

Light BPT is only possible on create of an entity record.

Right, thanks for the heads up detail. 

The screenshot should have the create action instead of the LaunchProcess.

mvp_badge
MVP

But it will not return an ActivityId, and as such your proposed solution will not work for Light BPT.

See screenshot below, the LBPT is started on create of the record, ActivityId and ProcessId are 0.


https://www.outsystems.com/forums/discussion/41063/light-processes-under-the-hood/


Thanks, it worked perfect!

mvp_badge
MVP

It only worked, because the presented solution creates a BPT and not a light-BPT process, so it does imho not answer your question.

Maybe you don't understand the concept well, my process has only one action, doesn't that make it a light bpt?

mvp_badge
MVP

I think I understand the concept of Light BPT very well, and have successfully used it in several projects.

Having a BPT process with only 1 automatic activity is only one of the conditions that make a BPT process be executed as a light BPT:

To enable light process execution, a process must meet all the following conditions:

  • The process flow includes only one Automatic Activity, having a simple Start > Automatic Activity > End flow.

  • The Launch On property of the process is set with a database event.

  • The Expose Process Entity property of the process is set to No.

  • You need to enable light process execution in the Module in Service Center:

Even if a process is enabled for light process execution, only a trigger by a database event executes the process as a light process. The manual launch of the process using the Launch Process action still executes the process as a regular process.

Here is some extra reading material:

Kind regards,

Daniel

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.