Showing results for 
Search instead for 
Did you mean: 

can I test if a consolidation is already running before running a new one ?

New Contributor II

Is it possible to test if a consolidation or a data management job is already running before running it again ?

Ex: I run a consolidation (about 10min) but another people run the same consolidation the same time

Thank you for your help


Contributor II

Hi Stan, unfortunately, I do not have time to test this or write the code at the moment, but you should be able to access the task activity, filter the Task Activity for the DM job you want to run and check the Task Status column for <> Completed / Failed / etc. And when one is running, you can return a message to the user.


Please note that this very much depends on your process. In your example (=DM job), you can just run a BR as the first step of the DM sequence to check. In reality, I never implemented this but rather educated the users not to blindly click "consolidate" all the time but rather check the consolidation status of their entity. Also, setting up the workflow and general process in a way that there is no need to consolidate all the time is another complementary setup.

New Contributor III

You can use a wcfEventHandler to listen for a consolidaton and pick up the data unit info. You could then query the TaskActivity framework table to see what is running and return an error if needed. The SQL would look somethign like this:

Select Description, UserName, AppName, StartTime, PercentComplete

From TaskActivity Where taskactivitytype = 11000 and appname = 'GolfStream' and taskactivitystatus = 1000

The descirption field will have the data unit info to compare to the requested consolidation.