jerryfiunam (61) [Avatar] Offline

I am developing two web applications, one for administration of the process definitions (along with other objets) and another for traking the process instances. I have taken a look into the source code of the activiti project and I found this class:

I have extended this class in order to load rules written in XLS and CSV. Regarding this and taking into account the last version of Activiti (5.12) I have the next questions or doubts:

1. I Have realized that some clasess and methods dont exist any more for instance in the implementation this line does not work anymore:

DeploymentCache deploymentCache = Context.getProcessEngineConfiguration().getDeploymentCache();

beacuse .getDeploymentCache() does not exist, also next line:

deploymentCache.addKnowledgeBase(deployment.getId(), knowledgeBase);

does not work.

Hence I carried out some modification in the code and I chance the code with this:

DeploymentManager deploymentCache = Context

and the last line with this:

deploymentCache.getKnowledgeBaseCache().add(deployment.getId(), knowledgeBase);

so the question is, are these the correct changes needed to load Business Rules in real time?

2. As I said I will have two web applications, the rules loading is performed in the admin webapp, but theses rules have to be reflected in the operation webapp as well beacuse in the operational web app is where the process instances will be traked and operated, so my question is if I load a business rules in the admin webb app, theses rules will also be loaded and used in real time in the other webapp (the operational webapp)? I make this question in order to decided if is a good idea to have two webapps or develop just only one.

Thanks and I look forwad to any help with theses doubtssmilie.

tijs.rademakers (494) [Avatar] Offline
Re: How to implement loading of Business Rules (in DRL o XLS) in real time.

1. Yes you're right, the DeploymentCache has changed. And yes the code you mention in your post is correct.
2. If you need the business rules in both applications, it will mean that you'll have to deploy them in both applications. So one application will definitely be simpler to do this.

Best regards,

jerryfiunam (61) [Avatar] Offline
Re: How to implement loading of Business Rules (in DRL o XLS) in real time.
Thanks a lot for your replay Tijs smilie.