cancel
Showing results for 
Search instead for 
Did you mean: 

Using GORM(Grails) instead of JPA...

wolpert
Champ in-the-making
Champ in-the-making
Folks-

  I'd like to use GORM entities as process variables, much the same way you can use JPA variables now, while using the grails-activiti plugin. What would have to be written to make this possible? Can someone outline necessary steps?

  Thanks
2 REPLIES 2

frederikherema1
Star Contributor
Star Contributor
Have a look how the JPA-variables are hooked in. If you want to make custom variable, you should extend the VariableType and implement your own, storing the data you need in the available db-fields on the variable or in byte-array, exposed to you in the VariableType.

If you also need some kind of initialisation of a transaction/entitymanager of some kind, have a look at EntityManagerSession and EntityManagerSessionFactory. These participate in the command-context and allow the JPAVariables to get hold of the entitymanager in the current command-context to fetch the actual entity when the variable is loaded…

The type and factory can be plugged in, no need to alter any activiti-sourcecode.

wolpert
Champ in-the-making
Champ in-the-making
Thanks for the info. I'll take a look and try to come up with a plan for the grails plugin.
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.