You are viewing limited content. For full access, please sign in.

Question

Question

How to prevent starting new process when another process of the same BP is running?

asked on November 7, 2018 Show version history

I have a business process which update a set of entries in repository and in the end of workflow, a updated entry report is created,

Processing Time for each process depend on quantity entries.

Sometimes it take a lot of time to end a process.

 

I would like some ideas, how to prevent user from starting new process while a process of this BP is not yet completed?

Thank you!

 

 

0 0

Replies

replied on November 8, 2018

You can do it 2 ways. If you want the actual Business Process button to "Grey Out" making it perfectly clear they can't start the process, you will need to setup BP conditions. This means they need to have a specific entry selected before starting the BP to begin with, for example the parent folder of the entries.

1st method

If it's possible to say, select the parent folder of the entries in question, then click the BP button to start then you could simply:

Set a flag on the parent folder when running (IE: a hidden field with a value). Check this flag in your BP starting conditions.

When they select the parent folder, the BP button will be grey when a process is running and light up when it is ready again.

2nd method

If there is no entry for them to select when starting the BP (IE: it just doesn't make sense in any way), you will have to just allow them to start the BP, then do nothing in the workflow. Do this buy setting a flag on the entries your processing, and check for the flag at the beginning of the workflow when searching / retrieving the entries.

1 0
replied on November 8, 2018

Also another way to set a flag in the second method besides a hidden field is to bind to a random primary entry using a simple sync sequence, it is an activity in workflow that uses a single entry as a key to prevent any other workflows from taking actions on the same key until finished.

0 0
replied on November 10, 2018

Hi Chad,

     You are absolutely right!, That ‘s very good idea. I totally forgot about it.

Appreciate your time!

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.