Process design choice

Process design choice

  

Hi,

I'm designing a system to support the process for join, move and exit of employees. 

The Join process is easy, it starts when a person is created.

For the exit and move process, I wanted to check on update, but it is not possible to start a process on a update.

So I was thinking, should I make a lifecycle process that is dormant most of the time, and use a conditional start on an update of person to check if the leave date is filled in? Or should I put a check in the Screen action saving?

The goal in the end is to use an API to the HR system, so I would prefer to work on update than a manual trigger. 

I only recently started using OutSystems so I'm still finding out the best design decisions. 

Thanks in advance!

The problem with depending on user actions is that you might not get immediate results (in some cases no result at all).

You could use a process (but it will keep running and taking resources!) thought I haven't read into Light BPT that much, but that could be an alternative.

Another option is to use a timer, which runs once a day to fetch any employees whose leave date has passed (this will require an extra boolean or attribute to signify that this employee has been checked already)

Joey Moree wrote:

The problem with depending on user actions is that you might not get immediate results (in some cases no result at all).

You could use a process (but it will keep running and taking resources!) thought I haven't read into Light BPT that much, but that could be an alternative.

Another option is to use a timer, which runs once a day to fetch any employees whose leave date has passed (this will require an extra boolean or attribute to signify that this employee has been checked already)

Thanks! I think I will opt for a daily timer. 


Hi, 

# You can use BPT just to pause and check that a record has been updated automatically using Wait Activity or you can use Human Activity just in case the update needs human interaction.

# Timer is another work around

regards

Box wrote:

Hi, 

# You can use BPT just to pause and check that a record has been updated automatically using Wait Activity or you can use Human Activity just in case the update needs human interaction.

# Timer is another work around

regards

But won't it use a lot of resources since there would be 2000 processes waiting all the time?


Solution

Loic Fortems wrote:

Box wrote:

Hi, 

# You can use BPT just to pause and check that a record has been updated automatically using Wait Activity or you can use Human Activity just in case the update needs human interaction.

# Timer is another work around

regards

But won't it use a lot of resources since there would be 2000 processes waiting all the time?


I think a "waiting" process is calling a variant of the void sleep(ms); function.
This doesn't take much resources other than that it's locking the current thread.

Your server only has a limited amount of available threads in the thread pool, I'm not sure if your server (on premise or cloud) can even hold that many (2000) threads?

Even if it does, it will limit the availability for other processes.
The best would be to have 1 process (or timer) checking if it needs to do any work and if so, start another "worker" process which only has to do the work.

That way you keep an async process (batching 2000 at the same time if needed, since these workers will close their thread on completion, they shouldn't take up a ton of time) but only use a limited amount of resources.


Solution