workflow expression code - add an int to a timestamp
I would like to be able to do the following:
On a document have a date IBA and an Int IBA.
within the workflow, use an expression to add the integer (number of days) to the datestamp to get a new datestamp that I can then write back to another IBA in the doc.
My code checks out syntactically but when I run the WF I get a java.nullpointer.expression.
the code is:
wt.doc.WTDocument theDocument =((wt.doc.WTDocument) primaryBusinessObject);
com.ptc.core.lwc.server.PersistableAdapter obj =new com.ptc.core.lwc.server.PersistableAdapter(theDocument,null,null,null);
obj.load("AdditionalDays","resubmitDate","DateDue");
wfAdditionalDays= obj.get("AdditionalDays").toString();
wfresubmitDate= obj.get("ResubmitDate").toString();
wfDateDue= obj.get("DateDue").toString();
// convert the Due Date off the Document unto a java.sql.TimeStamp
java.sql.Timestamp wfDueDate2 = java.sql.Timestamp.valueOf(wfDateDue);
//Convert Additional days to int
odays=java.lang.Integer.parseInt(wfAdditionalDays);
java.time.Instant next600Sec =wfDueDate2 .toInstant().plusSeconds(odays*24*3600);
finalTS2= java.sql.Timestamp.from(next600Sec);
Any ideas would be greatly appreciated

