cancel
Showing results for 
Search instead for 
Did you mean: 

How to get Hibernate Object using Activiti 1.6 Annotation based

ashokhathal
Champ in-the-making
Champ in-the-making

Need Hibernate Object to insert value in custom table.

Using Activiti 1.6 Annotation based.

Please suggest

1 ACCEPTED ANSWER

gdharley
Elite Collaborator
Elite Collaborator

The users guide provides a good example on how to handle this here: Activiti User Guide - JPA Support and here Activiti User Guide - JPA 

Also, for an example, check out the test case here:

Activiti/JpaTest.java at activiti-6.0.0.Beta4 · Activiti/Activiti · GitHub 


Just to make sure I pointed you in the right direction, I tested this in my Activiti Enterprise 1.6 environment.

As expected.

1. JPA is already enabled (Hibernate is used for the Enterprise tables such as COMMENTS, DATA_SOURCE, TENANT etc) so no need to configure.

2. Create your JPA Entities under the com.activiti.domain (Scan path set in DatabaseConfiguration.java)

3. Create your JPA Repository classes under com.activiti.repository (Scan path set in DatabaseConfiguration.java)

4. Add any beans to manage the Entities in com.activiti.extension.bean

5. Create your table

Entities and Repository classes will automatically be picked up.

Cheers,
Greg

bp3‌

View answer in original post

1 REPLY 1

gdharley
Elite Collaborator
Elite Collaborator

The users guide provides a good example on how to handle this here: Activiti User Guide - JPA Support and here Activiti User Guide - JPA 

Also, for an example, check out the test case here:

Activiti/JpaTest.java at activiti-6.0.0.Beta4 · Activiti/Activiti · GitHub 


Just to make sure I pointed you in the right direction, I tested this in my Activiti Enterprise 1.6 environment.

As expected.

1. JPA is already enabled (Hibernate is used for the Enterprise tables such as COMMENTS, DATA_SOURCE, TENANT etc) so no need to configure.

2. Create your JPA Entities under the com.activiti.domain (Scan path set in DatabaseConfiguration.java)

3. Create your JPA Repository classes under com.activiti.repository (Scan path set in DatabaseConfiguration.java)

4. Add any beans to manage the Entities in com.activiti.extension.bean

5. Create your table

Entities and Repository classes will automatically be picked up.

Cheers,
Greg

bp3‌