Home > Forum > General > On start (cyclical) - question

On start (cyclical) - question
0

Hello,

I have a question regarding: Global action -> On start (cyclical).
If I create an automation that runs every minute (infinitely) - for example: syncing users from another external database to the local BPS groups.

From your experience, do you see any concerns or risks? Are these runs saved to a table in the database?

Thanks.

WEBCON

Hi AndreeLl,

I would strongly advice against using cyclical action every minute, even if executed actions won't affect workflow elements directly (ie. creating historical versions).
On each recurrent action execution, new entries would be added to WFActionExecutions table (action logs) and AutomationSessionExecutions table (automation logs), making database size grow quickly and slowing down the system.
Not mentioning the fact, that it would burden the Workflow Service, as it'd have constant work to do (alongside other tasks).

Because the discussed topic is syncing users, I'd suggest configuring such automation to run, for example, every 3 hours, which is the same as default incremental synchronization of BPS Users List.

Sincerely

WEBCON
In reply to: Raluca-Mirabela Lupu

Hi,
If we are forced to use a timeout every minute, could you recommend a more optimal alternative?

It's impossible to answer that question without knowing the use case/business scenario.

For example, if you're making an integration with external system and want to update a workflow element when corresponding document in external system is updated, a common mistake is to cyclically check status of external document using timeout/recurrent actions on workflow elements. That would create multiple versions of workflow element + log a lot of data. A better idea would be to do integration other way around - once a document in external system is updated, it could invoke WEBCON BPS internal API to update workflow element.

Generally it is not bad to execute timeouts every minute, as long as they're not infinite or you don't update thousands of elements at once. Ask yourself how long you'll need to wait until the timeout stops being executed, how many element versions it will create and how many elements you're updating at once. Sometimes you could get better results simply by executing timeouts with less frequency.

In reply to: Konrad Keppert (WEBCON)

It's impossible to answer that question without knowing the use case/business scenario.

For example, if you're making an integration with external system and want to update a workflow element when corresponding document in external system is updated, a common mistake is to cyclically check status of external document using timeout/recurrent actions on workflow elements. That would create multiple versions of workflow element + log a lot of data. A better idea would be to do integration other way around - once a document in external system is updated, it could invoke WEBCON BPS internal API to update workflow element.

Generally it is not bad to execute timeouts every minute, as long as they're not infinite or you don't update thousands of elements at once. Ask yourself how long you'll need to wait until the timeout stops being executed, how many element versions it will create and how many elements you're updating at once. Sometimes you could get better results simply by executing timeouts with less frequency.

Hello,

Thank you both for your answers.

What do you think of this scenario:
I have an external view and i add those users to some bps groups depeding on a value. It takes some seconds to execute.

Is there a problem to delete those entries to free up space? I literally don’t need it.
And what is the best way to achieve it? (Through API? - lets say i create a process which runs every week and delete everything from the first process.)

Thanks.

MVP
In reply to: Maksymilian Stachowiak

I'd suggest using Webcon API to achieve it, and some Powershell/Python/any scripting language running with Cron, or Windows Task Scheduler, depending on host system.

There are endpoints, which should make it possible (https://portal.webconbps.com/api/index.html?urls.primaryName=API%20v5.0) - attachment.

Hi,

There's not necessarily a need to use the API.
You can remove workflow instances using the archive action with retention mode: Remove from content database
https://docs.webcon.com/docs/2023R3/Studio/Action/DBRetention/Action_ArchiveElements

I'm using this quite a lot. Cyclical action triggers a technical workflow which again gets deleted after x days.

This action is not available in the freemium version.

Best regards,
Daniel