Hello,
I am using a WebService query smart service to do Get and Update Merchant. We do a Get call to get the latest data, modify the returned object, and update using the UpdateMerchant call. Thers is an attribute "LastModifiedDate" which holds Date Time, not supposed be modified. I am just passing without any change. But there is a random 3 milliseconds difference during the Get and Update. I am seeing random success response but its intermittent.
Becasue of this difference, the Update call is throwing an error with "Unable to add due to typical Microsoft CRUD design - Status - OutOfDate..
I am not sure how Appian gets the raw data. I could only see data once it is converted into an Object. Did anyone face this issue or what could explain the error?
Thanks
Discussion posts and replies are publicly visible
Can you post some details? BTW, Appian will only parse the data if you enable it. Might be an idea to disable that to understand what is going on.
Could you please explain what do you mean "Appian will only parse the data if you enable it"?
https://docs.appian.com/suite/help/22.2/Integration_Object.html#http-integration-definition
I mean "Response Body Parsing". If enabled, Appian will convert the JSON formatted data into an Appian dictionary. Did you check whether there are any deviations in the JSON timestamps and the parsed timestamps?
I am using "Call Web Service Smart Service", generates the WSDL CDT. The field "LastModifiedDate" received as Date Time.
https://docs.appian.com/suite/help/22.2/Call_Web_Service_Smart_Service.html#node-outputs
I update a different field and call "UpdateMerchant" to modify the respective change. But the field "LastModifiedDate" has 3 milliseconds difference when the API receive the request.
Example
API end stored format - 2022-06-09 12:43:49.233
Get operation returned "LastModifiedDate" - 6/9/2022 12:43 PM GMT+00:00
API received during Update operation - 2022-06-09 12:43:49.230
OK, got it. This is about SOAP web services.
So the issue is that the date is being rounded down and the API refuses a returned date earlier than the sent one. Did you try to just overwrite the timestamp with the current time? This way the sent date will always be later that the received one.
But in the end, you might have to check the requirements of the called API.
Yes, i sent with the current time but it doesn't work.
As per API, we are not supposed to modify the LastModifiedDate. Need to perform GetMerchant and not try to re-use the object we built initially, because the system will think the object is out of date and refuse it. The date has to match what is on the server during the Update operation.
OK. I tried to reproduce your case using this code
a!localVariables( local!xml: "<PersonName> <First>Edward</First> <Last>Denton</Last> <Date>2002-05-30T09:30:10.543</Date> </PersonName>", local!cdt: torecord(local!xml, 'type!{urn:com:appian:types:SSH}SSH_XmlTest'()), toxml(local!cdt) )
The output is
<n1:SSH_XmlTest xmlns:n1="urn:com:appian:types:SSH"><First>Edward</First><Last>Denton</Last><Date>2002-05-30T09:30:10.540Z</Date></n1:SSH_XmlTest>
Appian seems to ignore the last digit of the timestamps millisecond value. This seems to happen when parsing the ISO datetime value from XML to internal.
I suggest to contact Appian.
Thank you.
We did reached out to Appian, waiting for response.