WebAPI: a!fromJson() - Date issue

While calling a!fromJson() method in WebAPI, the Date and time attribute is populated as Date out of range (2147483647).
When I pass date format as "Feb 20, 2017 1:30:00 PM" in request body I confront issues, but while passing date format as “20/02/2017 1:30 PM” it works.
Code snippet:

with(
a!startProcess(
processModel: cons!SampleModel,
processParameters:
'type!{urn:com:appian:types}Employee'(action:"Update",Employee:a!fromJson(http!request.body).Employee)
          


/*a!fromJson(
http!request.body
)*/,
onSuccess: a!httpResponse(
statusCode: 200,
headers: {
a!httpHeader(name: "Content-Type", value: "application/json")
},
body: a!toJson(
index(fv!ProcessInfo,"pv", {}).Employee
)
),
onError: a!httpResponse(
statusCode: 500,
headers: {
a!httpHeader(name: "Content-Type", value: "application/json")
},
...

OriginalPostID-261414

  Discussion posts and replies are publicly visible

Parents
  • ... body: a!toJson(
    {
    error: "There was an error starting the process"
    }
    )
    )
    )
    )
    =============================Request body=========

    {"action":"Update",
    "Employee":{
    "id": null,
    "entityDetail": {
    "datalessKey": 1686401,
    "shortName": "INDEPENDENT OIL",
    "altId": "11P999",
    "entityType": "BUS_ENT",
    "dataLessKeyText": "1686401"
    },
    "categoryDetail": {
    "categoryId": null,
    "categoryName": "BUSINESS_ENTITY",
    "subjectArea": "INSTRUMENT_BUSINESS_ENT",
    "appianProcessId": 537014155,
    "owner": "bragadeesh.perumal.swamy@fmr.com",
    "claimDate": "Nov 7, 2016 1:30:00 PM",
    "status": "ONPREM",
    "deferral_DateTime": "Feb 20, 2017 1:30:00 PM",
    "SLA": 480,
    "autoDeferFlag": false,
    "environment": "fmrcoappian.sit"
    },
    "violationList": [
    {
    "id": 1,
    "categoryId": null,
    "violationType": "UNKNOWN_KINGLAND:697373657232",
    "attributeKeyList": [
    {
    ...
Reply
  • ... body: a!toJson(
    {
    error: "There was an error starting the process"
    }
    )
    )
    )
    )
    =============================Request body=========

    {"action":"Update",
    "Employee":{
    "id": null,
    "entityDetail": {
    "datalessKey": 1686401,
    "shortName": "INDEPENDENT OIL",
    "altId": "11P999",
    "entityType": "BUS_ENT",
    "dataLessKeyText": "1686401"
    },
    "categoryDetail": {
    "categoryId": null,
    "categoryName": "BUSINESS_ENTITY",
    "subjectArea": "INSTRUMENT_BUSINESS_ENT",
    "appianProcessId": 537014155,
    "owner": "bragadeesh.perumal.swamy@fmr.com",
    "claimDate": "Nov 7, 2016 1:30:00 PM",
    "status": "ONPREM",
    "deferral_DateTime": "Feb 20, 2017 1:30:00 PM",
    "SLA": 480,
    "autoDeferFlag": false,
    "environment": "fmrcoappian.sit"
    },
    "violationList": [
    {
    "id": 1,
    "categoryId": null,
    "violationType": "UNKNOWN_KINGLAND:697373657232",
    "attributeKeyList": [
    {
    ...
Children
No Data