How to get Hibernate Object using Activiti 1.6 Annotation based

cancel
Showing results for 
Search instead for 
Did you mean: 
ashokhathal
Member II

How to get Hibernate Object using Activiti 1.6 Annotation based

Jump to solution

Need Hibernate Object to insert value in custom table.

Using Activiti 1.6 Annotation based.

Please suggest

1 Solution

Accepted Solutions
gdharley
Intermediate

Re: How to get Hibernate Object using Activiti 1.6 Annotation based

Jump to solution

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 solution in original post

1 Reply
gdharley
Intermediate

Re: How to get Hibernate Object using Activiti 1.6 Annotation based

Jump to solution

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‌