{
  "eventsAndFunctions": [
    {
      "algorithm": {
        "parameters": [],
        "statements": [
          {
            "command": "ReadModel",
            "modelVariableName": "domain",
            "variableName": "domain"
          },
          {
            "children": [
              {
                "command": "Disable",
                "widgetName": "txtCode"
              }
            ],
            "command": "If",
            "expression": "IsNotNull(^domain) && IsNotNull(^domain.id)"
          },
          {
            "children": [
              {
                "command": "Enable",
                "widgetName": "txtCode"
              }
            ],
            "command": "Else"
          }
        ],
        "typeReturn": "any",
        "variables": [
          {
            "name": "domain",
            "type": "ExtCommonBusiness.BusinessDomain"
          }
        ]
      },
      "name": "main_init"
    },
    {
      "algorithm": {
        "parameters": [],
        "statements": [
          {
            "command": "ReadModel",
            "modelVariableName": "domain",
            "variableName": "domain"
          },
          {
            "children": [
              {
                "command": "Throw",
                "errorName": "Error",
                "expressionData": "\"[[ErrorFillingFormTitle]]\"",
                "expressionInnerError": "\"[[ErrorFillingFormMsg]]\""
              }
            ],
            "command": "If",
            "expression": "IsNull(^domain)"
          },
          {
            "children": [
              {
                "command": "Execute",
                "expression": "ExtCommonBusiness.UpdateBusinessDomain(^domain.id, ^domain)"
              }
            ],
            "command": "If",
            "expression": "IsNotNull(^domain) && IsNotNull(^domain.id)"
          },
          {
            "children": [
              {
                "command": "Execute",
                "expression": "ExtCommonBusiness.CreateBusinessDomain(^domain)"
              }
            ],
            "command": "Else"
          }
        ],
        "typeReturn": "any",
        "variables": [
          {
            "name": "domain",
            "type": "ExtCommonBusiness.BusinessDomain"
          }
        ]
      },
      "name": "main_submit"
    }
  ],
  "model": [
    {
      "name": "domain",
      "required": false,
      "type": "ExtCommonBusiness.BusinessDomain"
    }
  ],
  "root": {
    "children": [
      {
        "children": [
          {
            "children": [
              {
                "binding": "domain.code",
                "label": "[[Code]]",
                "last": true,
                "name": "txtCode",
                "size": 2,
                "widget": "TextBox"
              },
              {
                "binding": "domain.name",
                "label": "[[Name]]",
                "last": true,
                "name": "txtName",
                "size": 2,
                "widget": "TextBox"
              }
            ],
            "cssClass": "blz-padding-top-large blz-padding-left-large",
            "layout": "form"
          }
        ],
        "layout": "fit"
      }
    ],
    "cssClass": "blz-area-default",
    "layout": "responsive"
  },
  "routing": null,
  "unused": []
}