I was able to configure openshift and optaplanner roster application as per instructions from here https://github.com/kiegroup/optashift-employee-rostering
I was trying to add a tenant using
curl -X POST "http://localhost/rest/tenant/add" -H "accept: application/json" -H "content-type: application/json" -d "{ \"id\": 100, \"version\": 10, \"name\": \"Test\"}"
I get error:
org.hibernate.PersistentObjectException: detached entity passed to persist: org.optaplanner.openshift.employeerostering.shared.tenant.Tenantorg.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1692)
org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1602)
org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1608)
org.hibernate.jpa.spi.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:1152)
org.jboss.as.jpa.container.AbstractEntityManager.persist(AbstractEntityManager.java:580)
org.optaplanner.openshift.employeerostering.server.tenant.TenantRestServiceImpl.addTenant(TenantRestServiceImpl.java:52)
org.optaplanner.openshift.employeerostering.server.tenant.TenantRestServiceImpl$Proxy$_$$_WeldSubclass.addTenant$$super(Unknown Source)
How do i add a tenant?
In 7.7, adding a tenant isn't decently supported yet in optashift-employee-rostering. It's a critical missing feature which will be added soon.