How to access the output parameter in a process

Hi, so I have a process that does all the good stuff and I have added an output parameter that I want to include in a 

feedback message on the screen. I can't access it, it only shows the process ID.

Here is the process:

Inside the process


on the screen

When I search for the result only the ID shows


I need that integrate batch in the process, if it's on the screen I often get a timeout so I am trying to rectify that by using a process instead of calling multiple server actions in a screen action.

Thank you

Hi,

When you launch a process, it starts running asynchronously in the background. In your screen flow, it stays on the Launch node for only a couple of milliseconds just to fire the BPT and continues with the flow.

So you cannot really get any outputs from it. What you can do is that you can save the message coming from the output parameter into an Entity with the ProcessId, and then use it somewhere else as you like. 

But in your example, you cannot expect a result quickly to show in the feedback message, so I assume you can only say something like "Journal integration process has started."

Hi Ozan, thank you so much for clarifying this. I want to avoid creating an entity for this. 

Option 1 If I put my feedback message in the process and just launch the process on the screen, will it display the feedback message that is in the process?

If I put my feedback message in the process after my assign?

Or option 2 take out the Integrate Batch server action from the process and execute it separately in the screen action after I launch the process.

Among the 2 options, which one do you advise is better?

Hey Rudo,

It's not really possible to put feedback message in the process. It's a widget related to frontend, and BPT is something related to backend and runs in the background.

You can indeed run a server action in the screen action after launching the process. But that's a significant change to your flow, so if you make sure that nothing gets broken by doing that (or make sure to make necessary changes), then you can use the output of IntegrateBatch in your feedback message. 

But I guess you had a reason to put IntegrateBatch in the BPT and not in the screen action in the first place?

Actually all this was in a screen action as shown below. It's me who is now moving the functionality to a 

process since this screen action calls a lot of server actions and sometimes we get a timeout. So this is me trying to fix the timeout issue by moving the functionality into a process and I also increased the timeout seconds. So I guess I can put functionality in the process but remove the IntegrateBatch action and run it in the screen after the process. Does that sound better?

Oh I just realized that IntegrateBatch also uses information from InitiateCandidateList.  Since I can't get an output parameter from the process so it means this functionality can't be in a process right?

I can just change the timeout seconds that's all. Please confirm with me if I am correct here. Really appreciate your help

That's correct. But if this is a process that is supposed to take long, you cannot really do anything about the output parameters of it, rather then showing the user just a generic message like "batches are being processed".

Do you think it's normal that only 2 server actions take too long to run that they give a timeout? Do they call external systems? Maybe it's a better idea to try to solve why they take too long to run.

If you think it's normal that they take too long to run, then doing it in the background with BPT is a good idea indeed. But since it takes too long, you cannot really make the user wait for its output on the screen. It's just against the nature of the whole thing.

I think as a general rule, waits for the user after clicking a submit button shouldn't really take more than a couple of seconds. If it will, the best way is to have a screen/section where user can see the statuses of processes running in the background. For this, you would need a new entity where you can insert output messages, as we talked in the beginning.

Regards

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