{
  "eventsAndFunctions": [
    {
      "algorithm": {
        "parameters": [],
        "statements": [
          {
            "command": "Set",
            "expression": "ExtCommonBusiness.ListGenericCatalog(\"ProductLine\", {})",
            "variableName": "productLines"
          },
          {
            "command": "WriteModel",
            "expression": "^productLines",
            "modelVariableName": "productLines"
          },
          {
            "command": "Load",
            "expression": "Select(^productLines, [id, name])",
            "widgetName": "cboProductLines"
          }
        ],
        "typeReturn": "any",
        "variables": [
          {
            "name": "productLines",
            "type": "list(ExtCommonBusiness.RootEntity)"
          }
        ]
      },
      "name": "main_init"
    },
    {
      "algorithm": {
        "parameters": [],
        "statements": [
          {
            "command": "ReadModel",
            "modelVariableName": "productLines",
            "variableName": "productLines"
          },
          {
            "children": [
              {
                "command": "GetValue",
                "variableName": "productLineId",
                "widgetName": "cboProductLines"
              },
              {
                "command": "Set",
                "expression": "FindFirst(^productLines, id == ^productLineId)",
                "variableName": "productLine"
              },
              {
                "children": [
                  {
                    "command": "WriteModel",
                    "expression": "{ type: \"ProductLine\", id: ^productLine.id, name: ^productLine.name }",
                    "modelVariableName": "productLine"
                  }
                ],
                "command": "If",
                "expression": "!IsNull(^productLine)"
              }
            ],
            "command": "If",
            "expression": "!IsNull(^productLines)"
          }
        ],
        "typeReturn": "any",
        "variables": [
          {
            "name": "productLineId",
            "type": "string"
          },
          {
            "name": "productLine",
            "type": "ExtCommonBusiness.RootEntity"
          },
          {
            "name": "productLines",
            "type": "list(ExtCommonBusiness.RootEntity)"
          }
        ]
      },
      "name": "main_submit"
    }
  ],
  "model": [
    {
      "name": "productLine",
      "required": false,
      "type": "ExtCommonBusiness.Reference"
    },
    {
      "name": "productLines",
      "required": false,
      "type": "list(ExtCommonBusiness.RootEntity)"
    }
  ],
  "root": {
    "children": [
      {
        "children": [
          {
            "children": [
              {
                "dataFormat": "KeyValueList",
                "label": "[[ProductLines]]",
                "last": true,
                "mandatory": true,
                "name": "cboProductLines",
                "size": 2,
                "widget": "ComboBox"
              }
            ],
            "cssClass": "blz-area-default",
            "layout": "form"
          }
        ],
        "layout": "fit"
      }
    ],
    "layout": "responsive"
  },
  "routing": null,
  "unused": []
}