Hi,
I am using jBPM 3.2 with jbpm bpel 1.1.1.GA.
I am trying to delete a bpel process definition using the deleteProcessDefinition API on Grpah Session Object . This is my code for the delete
graphSession = jbpmContext.getGraphSession(); graphSession .deleteProcessDefinition(Long.parseLong(processDefId));
14:40:34,147 WARN [JDBCExceptionReporter] SQL Error: 0, SQLState: 23503 14:40:34,147 ERROR [JDBCExceptionReporter] ERROR: update or delete on table "jbpm_token" violates foreign key constraint "fk_scopeinst_token" on table "bpel_scopeinstance" Detail: Key (id_)=(246) is still referenced from table "bpel_scopeinstance". 14:40:34,147 ERROR [AbstractFlushingEventListener] Could not synchronize database state with session org.hibernate.exception.ConstraintViolationException: could not delete: [org.jbpm.graph.exe.Token#246] at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:71) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43) at org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:2541) at org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:2697) at org.hibernate.action.EntityDeleteAction.execute(EntityDeleteAction.java:74) at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:250)