{
	"factory": {
		"id": "common-profile",
		"type": "entaxy.runtime.profile",
		"displayName": "System profile [LEGACY]",
		"isDeprecated": true,
		"isAbstract": false
	},
	"entaxy.runtime.profile": {
		"profileType": "SYSTEM"
	},
	"fields": {
		"systemName": {
			"displayName": "System Name",
			"type": "String",
			"required": true,
			"immutable": true,
			"@TYPEINFO": {
				"validation": {
					"rules": [
						{
							"length": {
								"min": 3
							}
						},
						{
							"content": {
								"regex": "^[a-zA-Z][a-zA-Z0-9-]*$",
								"errorMessage": "Value can contain only latin letters, numbers and hyphen and should start with a letter"
							}
						}
					]
				}
			}
		},
		"description": {
			"displayName": "Description",
			"type": "String"
		},
		"useDefaultRoute": {
			"displayName": "Use Default Route",
			"type": "Boolean",
			"required": true,
			"defaultValue": true
		},
		"defaultRoute": {
			"type": "entaxy.runtime.default-route",
			"isRef": true,
			/* actually there's no reference, but the object must be in a model */
			/* so while producing we must check the defaultRoute is found */
			"isBackRef": true,
			/* but only if useDefaultRoute is set to true */
			"condition": "${useDefaultRoute}",
			"required": true,
			"immutable": true,
			"defaultValue": {
				"type": "entaxy.runtime.default-route",
				"factoryId": "default-route",
				"properties": {
					"description": "Default route for ${systemName}"
				}
			}
			
		},
		"##publish": {
			"defaultValue": {
				"profileType": {
					"@CALCULATED": {
						"expression": "${#FACTORY#.#TYPEINFO#.profileType}",
						"lazy": false
					}
				}
			}
		}
	},
	"outputs": {
		"init": {
			"isDefault": true,
			"fields": {
				"systemName": {},
				"description": {},
				"useDefaultRoute": {},
				"defaultRoute": {}				
			}
		}
	}

}