take a look at this example project that does exactly the thing you need. Note two main aspect of this project:
- utility class and extended JPAPlaceholderResolverStrategy that can be found here these are required to make sure hibernate will find entities from the kjar - in 6.3 this will already be in regular code base so no need for extra classes in kjar but for 6.2 they are still required
- defined marshaling strategy in deployment descriptor that refers to extended implementation and pass the classLoader
With that you should be able to store entities from the project with jpa as process variables
I was able to use your example and create new processes with my custom JPA entity. However, I'm having problems using the remote API to retrieve the variable.
When I hit the rest endpoint
I see this warning in the log
Exception while unmarshaling content: java.lang.IllegalStateException: No strategy of type persistence.ProjectJPAResolverStrategy available.
I do get a response with a long content string but I don't know how to deserialize it.