cancel
Showing results for 
Search instead for 
Did you mean: 

Replacing Repository Service

goodboy
Champ in-the-making
Champ in-the-making
Hi,

I'm trying to replace the repository service. The deploy of one process, instead of being stored in the DB, it will be stored in a our own proprietary user database.
But after seeing the Activiti source code, i have some questions around DbSqlSession, DbSqlSessionFactory classes

It's supposed to re-implement/extend those classes? Because if i do, i think i have to extend almost all manager's that extends AbstractManager. Or am i confusing things?


Basically what i need is instead of using a know DB, that exists in the configurations, i need to use our Object saving methods. 


new ideias are welcome Smiley Happy

thanks
4 REPLIES 4

jbarrez
Star Contributor
Star Contributor
I just want to add it's going to be pretty complex to get working like that … and it will not only be the services, but also the internal EntityManagers for each type of entity the engine uses …

What exactly is your use case? You might be able to get away introducing a custom repositoryService with a custom command that extends the existing one if your use case is fairly easy.

goodboy
Champ in-the-making
Champ in-the-making
Yeah, i'm just entering in the part of the Managers Smiley Sad

The use case is simple, we just want to control the deploy's, i.e. the "place" where they are stored.

For example:
Instead of using directly one Oracle or a hsql DB, we want to use our own "ObjectManager" to store the Process's Definition and some more information.

So when we say to activiti to complete one Process/Task, the place where the Activiti engine gets the Process Definition is at the "ObjectManager".

Doesn't know if i was explicit enough to give the ideia. :s

Thanks.

frederikherema1
Star Contributor
Star Contributor
As Joram says, that's pretty hard to achieve, as this is the core of the engine and can't be abstracted out. Perhaps you can take a look at the DeploymentCache class which is consulted every time a processDefinition is needed for execution (not when externally queried).

goodboy
Champ in-the-making
Champ in-the-making

Extending the core of the engine, seems that we will generate many other problems.
So, we are going to use another approach to solve the problem.

thank you both for the clarifications Smiley Happy