ORA-02291: integrity constraint (WMESBDEV.FK_BIZDOCCONT_DOCID_BIZDOC) violated

Hi,

I’m trying to modify a service that originally was used to process files containing a single event. The service sends the event in a single transmission to our internal system.

The problem is that we are now receiving files containing multiple events, but the transmissions must contain single events.

The original steps of the service are as follows:

  1. Transform from the inbound file to the outbound file.
  2. pub.xml:documentToXMLString
  3. pub.io:stringToStream
  4. wm.tn.doc:addContentPart
  5. post the data to our internal system using pub.client:http

I’m trying to modify the service such that steps 2 through 5 are now inside of a loop that loops over the events. I’ve also included a step 6 inside of the loop using the wm.tn.doc:resubmit service that I was hoping would create a new bizdoc (wm.tn.rec:BizDocEnvelope) for the next loop.

I am running into issues such as the following error:

wm.tn.doc:addContentPart

com.wm.app.tn.db.DatastoreException
Could not insert the new document.
(0) java.sql.SQLIntegrityConstraintViolationException: [SoftwareAG][Oracle JDBC Driver][Oracle]ORA-02291: integrity constraint (WMESBDEV.FK_BIZDOCCONT_DOCID_BIZDOC) violated - parent key not found

Any idea on how I might best find a resolution to the problem of looping through files with multiple events and sending multiple transmissions (one transmission per event)?

based on the error, when you call doc:addContentPart service, the bizdoc object is not a valid one.
if you intend to add to a new bizdoc, you need to create it using one of the services first.