Generating REST Connector Fails, Exposing integration using a data type.

I am following the Detailed Instructions for the exercise. After I click to create the REST integration (step 6):

  • I get a popup saying

http://localhost:9080/prweb says

Generation process has been canceled and all created records have been removed”

  • I dismiss the popup
  • In the generation summary I see details
    “Canceling rule generation, Error evaluating rules using sample JSON stream

Json Structure :-

{
“majorDimension”: “ROWS”,
“range”: “Sheet1!A1:D5”,
“values”: [
[
“Item”,
“Cost”,
“Stocked”,
“Ship Date”
],
[
“Wheel”,
“$20.50”,
“4”,
“3/1/2016”
],
[
“Door”,
“$15”,
“2”,
“3/15/2016”
],
[
“Engine”,
“$100”,
“1”,
“3/20/2016”
],
[
“Totals”,
“=SUM(B2:B4)”,
“=SUM(C2:C4)”,
“=MAX(D2:D4)”
]
]
}

@VishwajeetD1125

Seems the Json you are inputting is not a valid json ( to generate rules in PEGA) as there are invalid identifiers. You will need to update the JSON in such a format that pega understands and generate rules. Please find the attached text file for the valid Json (sample format).

Valid JSON.txt (209 Bytes)

@VinayKumarL16594575

Thanks for your reply. Seems solution you have provided is not working for me. I am not sure whether I am still going wrong somewhere.

Please find the screenshot of response below:-

@VishwajeetD1125

Seems like pega rest integration wizard doesn’t allow creation of value list properties. In my case the request payload only accepts valuelist structure.

Workaround:-

  1. Complete pega rest wizard with pagelist structure. Wizard will create “values” as Pagelist properties.

  2. Delete the values page list property

  3. Now create a json data transform and pass the original payload to json data parameter and pass "“deserialize” in mode parameter.

  4. This will parse the json structure and pass the payload to request.