-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDataMapperFlow-flow.json
1 lines (1 loc) · 4.34 KB
/
DataMapperFlow-flow.json
1
[{"id":"main.flow","type":"tab","label":"main","disabled":false,"info":""},{"id":"test.flow","type":"tab","label":"test","disabled":false,"info":""},{"id":"eacbb9ef.69d5c8","type":"EventListener","z":"main.flow","name":"GET /employee","eventSource":"api","dynamodbOperation":"","apiMethod":"post","apiUrl":"/employee","albMethod":"any","albUrl":"","bucketName":"","event":"s3:ObjectCreated:*","x":120,"y":160,"wires":[["e953b265.d2b14"]],"caname":"aws-event-handler","category":"aws"},{"id":"b5fc6ccd.17dd7","type":"EventListener-End","z":"main.flow","name":"Success","statusCode":"200","headers":{"Content-Type":"application/json"},"payload":"msg.payload","x":520,"y":160,"wires":[],"caname":"eventlistenerend","category":"aws"},{"id":"3aa032bd.826cae","type":"TestCase","z":"test.flow","name":"Test Get /hello","selectedTargetNode":"eacbb9ef.69d5c8","payload":"{\n \"path\": \"/hello\",\n \"headers\": {\n \"Accept\": \"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8\",\n \"Accept-Encoding\": \"gzip, deflate, lzma, sdch, br\",\n \"Accept-Language\": \"en-US,en;q=0.8\",\n \"CloudFront-Forwarded-Proto\": \"https\",\n \"CloudFront-Is-Desktop-Viewer\": \"true\",\n \"CloudFront-Is-Mobile-Viewer\": \"false\",\n \"CloudFront-Is-SmartTV-Viewer\": \"false\",\n \"CloudFront-Is-Tablet-Viewer\": \"false\",\n \"CloudFront-Viewer-Country\": \"US\",\n \"Host\": \"wt6mne2s9k.execute-api.us-west-2.amazonaws.com\",\n \"Upgrade-Insecure-Requests\": \"1\",\n \"User-Agent\": \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36 OPR/39.0.2256.48\",\n \"Via\": \"1.1 fb7cca60f0ecd82ce07790c9c5eef16c.cloudfront.net (CloudFront)\",\n \"X-Amz-Cf-Id\": \"nBsWBOrSHMgnaROZJK1wGCZ9PcRcSpq_oSXZNQwQ10OTZL4cimZo3g==\",\n \"X-Forwarded-For\": \"192.168.100.1, 192.168.1.1\",\n \"X-Forwarded-Port\": \"443\",\n \"X-Forwarded-Proto\": \"https\"\n },\n \"pathParameters\": {\n \"proxy\": \"hello\"\n },\n \"requestContext\": {\n \"accountId\": \"123456789012\",\n \"resourceId\": \"us4z18\",\n \"stage\": \"test\",\n \"requestId\": \"41b45ea3-70b5-11e6-b7bd-69b5aaebc7d9\",\n \"identity\": {\n \"cognitoIdentityPoolId\": \"\",\n \"accountId\": \"\",\n \"cognitoIdentityId\": \"\",\n \"caller\": \"\",\n \"apiKey\": \"\",\n \"sourceIp\": \"192.168.100.1\",\n \"cognitoAuthenticationType\": \"\",\n \"cognitoAuthenticationProvider\": \"\",\n \"userArn\": \"\",\n \"userAgent\": \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36 OPR/39.0.2256.48\",\n \"user\": \"\"\n },\n \"resourcePath\": \"/{proxy+}\",\n \"httpMethod\": \"GET\",\n \"apiId\": \"wt6mne2s9k\"\n },\n \"resource\": \"/{proxy+}\",\n \"httpMethod\": \"GET\",\n \"queryStringParameters\": {\n \"name\": \"me\"\n },\n \"stageVariables\": {\n \"stageVarName\": \"stageVarValue\"\n }\n}","initialLoad":"false","x":122.5,"y":160,"wires":[["b970b7d2.5454c8"]],"caname":"test-case","category":"testing"},{"id":"b970b7d2.5454c8","type":"Assertion","z":"test.flow","name":"check response","selector":"jsonBody","property":"hello","comparison":"equals","value":"world","x":265,"y":160,"wires":[["e0721cc7.653eb"]],"caname":"test-assertion","category":"testing"},{"id":"e0721cc7.653eb","type":"TestCaseEnd","z":"test.flow","name":"TestCaseEnd","x":425,"y":160,"wires":[],"caname":"test-case-end","category":"testing"},{"id":"e953b265.d2b14","type":"Datamapper","z":"main.flow","name":"Datamapper","datamappertype":"$sort(\n $map(\n msg,\n (\n function($l){\n {\n \"EmpName\" : $l.Candidate_Name,\n \"Emp_Age\" : $l.Candidate_Age\n \n }\n}\n )\n),\n function($l,$r){$l.Emp_Age < $r.Emp_Age}\n)","testdataeditortype":"[\n {\n \"Candidate_Name\" : \"Arun\",\n \"Candidate_Age\" : \"25\"\n \n },\n {\n \"Candidate_Name\" : \"John\",\n \"Candidate_Age\" : \"32\"\n \n },\n {\n \"Candidate_Name\" : \"Sarah\",\n \"Candidate_Age\" : \"22\"\n \n },\n {\n \"Candidate_Name\" : \"Harry\",\n \"Candidate_Age\" : \"28\"\n \n }\n]","x":282.5,"y":160,"wires":[["b5fc6ccd.17dd7"]],"caname":"datamapper","category":"transformation"}]