Long-running as microflow property

4
What is long-running as microflow property?
asked
3 answers
8

Long running should be used if the time to execute a microflows takes longer than 10-20 seconds.
What long running is the following: it calls the xas with the message execute this action. The xas returns the id of the process. Than the client will call the xas every 30 seconds and requests the status of the process. If the xas is finished with that process it returns all feedback messages and opens the forms that should be opened. If the process isn't finished the client waits another 30 seconds.

Why should you use long running instead of letting the user wait until the action is finished?
If the user is behind a proxy server or has some fancy internet tooling installed on his computer that software might send the request for a second time to the xas.
Because when the xas takes too long to respond those programs think the request has never arrived in the XAS and the microflow will be called a second time, which results in either an exception that the microflow does not allow concurrent execution or the microflow will just be executed twice

answered
7

Short answer: If you think your microflow takes longer than 10 seconds to run, set the "Long running" property to "True".

Long answer: The "Long running" property specifies how the client will call a microflow on the runtime. When "Long running" is set to "False", the client calls the microflow on the runtime synchronously , i.e., it waits for a response. When an action takes a substantial amount of time, this method is not sufficient, as a time-out of the pending web request can interrupt the microflow call.

Setting "Long running" to "True" alleviates this problem by using another method to call microflows on the runtime. The microflow is started asynchronously and the client keeps asking the runtime whether the operation has finished (polling). This prevents time-outs from occurring on a pending request.

answered
4

In addition to the previous answers:

Disallowing concurrent execution can be useful when long running actions should not interfere with each other (e.g. imports). Concurrent microflows can be disallowed by configuring the ‘disallow concurrent execution’ property.

answered