cancel
Showing results for 
Search instead for 
Did you mean: 

Staging (Past) Data

tomaszk_
Champ in-the-making
Champ in-the-making
Background of the problem:
In application that i am developing we are performing certain statistical and usage calculations based on the tasks that user has completed or not. Based on the scores we are able to suggest user certain behavior (tasks to complete)  in order to improve their score in the future. One of the requirements is that user shall be able to request system with demo/test data in order to test/play with it.

Problem:
Staging data in Activiti by importing processes, tasks that have been created and are completed in the past (a year, a month ago) or are in progress? Important to note this is multi-tenant production environment.

What I have found so far… but is not really the great solution.
What i have found is that you can get the clock from the process engine configuration ( ((ProcessEngineImpl) processEngine).getProcessEngineConfiguration().getClock() ) and set current time to the past time and perform process deployment/task actions. Unfortunately, that would mean i would have to put system into maintenance mode (log out all logged in users, and not allow login) for a period when i am staging the data.

Do you know any better way to stage data that would look as if some of it happened in the past?

Thank you!
3 REPLIES 3

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi Tomasz.

Yes,

use simulation (activiti-crystalball)
🙂

Regards
Martin

Martin,

Crystalball looks like an awesome project which i will definitely need to spend more time on to fully understand and use in the future, but right now all i need is something simple… and i am not able to find that simple solution in crystalball examples/documentation. Here is what i am trying to achieve:
1) Deploy process for tenant 1
2) Change time to 650 days back from the current date
3) Select some tasks and complete them
4) Change time to 365 days back from the current date
5) Select some tasks and complete them
In the meantime it is possible that tenant 2 will be doing some tasks manually so would not want time changes to affect tenant 2.

Thanks for any help.

tomaszk_
Champ in-the-making
Champ in-the-making
Since it is hard to find documentation/tutorials on crystallball i need to find other solution… I was wondering if it will be possible to run two engines on the same database within one Spring app. This way i could have one engine handle all the on going user interactions and have a separate instance for only inserting/staging data by changing the time of the engine. Please let me know if anyone tried doing something like that and if it worked/ or if there are some potential issues with this approach.
Thanks!