Professional Documents
Culture Documents
****************************
#%RAML 1.0 DataType
type: object
properties:
id?: string
firstName: string
lastName: string
address: string
postal: string
country: string
miles: integer
creationDate?: datetime
type: string
value:
-
id: "55555"
firstName: "xxx"
lastName: "yyyy"
address: "555 xxx St., OverlandPark KS"
postal: "55555"
country: "USA"
miles: 999
creationDate: 2020-06-04T11:11:11.111Z
type: "personal"
-
id: "55555"
firstName: "xxx"
lastName: "yyyy
**********************************************************
Json Type declaration in program
{| id: String,
firstName: String,
lastName: String,
address: String,
postal: String,
country: String,
miles: Number {"typeId": "int"},
creationDate: String, "type": String
|}
**********************************************************
Json sample file for type
[
{
"id": "ABC-1234",
"firstName": "John",
"lastName": "Doe",
"address": "123 Main St., Dallas TX",
"postal": "77777",
"country": "US",
"miles": 999,
"creationDate": "2019-08-21T04:34:41.098Z",
"type": "Personal"
},
{
"id": "XYZ-8989",
"firstName": "Jane",
"lastName": "Doe",
"address": "10 Downing St., San Francisco CA",
"postal": "89897",
"country": "US",
"miles": 101,
"creationDate": "2018-12-09T21:53:12.127Z",
"type": "Business"
}
]
*********************************************
remember
Simple Types - String, Boolean, Number, Regex, Null, Temporal: Date, DateTime,
LocalDateTime, LocalTime, Time, Period
Null is a type and it has value null, null cannot be assigned to the type String
or any other type except for the type Null.
composite types - Array, Object and Function.
Close and Open Objects - Object type can be either closed or open.
The following example succeds even if age is not in the type declaration because
the type of the variable user is an open object:
var user: {firstName: String, lastName: String} = {firstName: "John", lastName:
"Smith", age: 34}
The syntax to specify a closed object is {| |}. The following example makes the
User type support only the keys firstName and lastName.
The script throws an exception because the age field is not accepted.
var user: {|firstName: String, lastName: String|} = {name: "John", lastName:
"Smith", age: 34}
Function Type
The syntax to define a function type is: (paramType: ParamType,...) -> ReturnType,
(paramA: String, paramB: Number) -> Boolean
*********************************************
You can see error mapping option
Validator
Http Request connector
mostly all connectors has but no http listner
getFlight connector has
*********************************************
1. assuming no error handler on the flow but error handle in application level
On Error Continue
when error occurs, application On Error Continue handles the error,
then it return backs to the flow continues process from next valid porcess and
ends,
finally throws the error message at the end.
on error propagate
when error occurs in child flow, application on error propagate - handles the error