Getting version mismatch error while updating into DCTM using java

463 views Asked by At

I am trying to update into DCTM through java code, below is the code snippet

IDfDocument communication = (IDfDocument) getDfSession().getObject(DfId.valueOf(communicationId));
communication.setString(ATTR_STATUS, status);
communication.save();

but I am getting the below error

Caused by: DfException:: THREAD: be.ing.ca.xpression.DCTM001P-1; MSG: [DM_OBJ_MGR_E_VERSION_MISMATCH]error: "save of object 090283e589bf689d of type xx_document failed because of version mismatch: old version was 4"; ERRORCODE: 100; NEXT: null

I thinki am getting this error because there is another process which is trying to modify the object ,and when more than one process try to modify anyobject DCTM throws this exception,

But after lot of searching i dident found any solution which can solve this error

If anyone knows the solution please reply..

Link that i refer
http://www.javablog.fr/?s=version+mismatch

1

There are 1 answers

0
Henning Winter On

Try calling a fetch() on the object before doing updates.

communication.fetch()

There are some optional parameters AFAIK.