{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://schemas.apps.smartmate.io/processes/processForms/processForm.schema.json",
  "$$target": "https://schemas.apps.smartmate.io/processes/processForms/processForm.schema.json",
  "type": "object",
  "title": "processForm",
  "description": "A :ref:`process form <process-forms>`, which is a form to be used in a :ref:`user task <user-tasks>`.",
  "properties": {
    "name": {
      "type": "string",
      "description": "Name of the form"
    },
    "title": {
      "type": "string",
      "description": "Title to show to the user when looking at the task. It's different to the name that it accepts variables and fields."
    },
    "rows": {
      "type": "array",
      "description": "Rows to display in the form. A row can be a field, a title, etc.",
      "items": {
        "$ref": "https://schemas.apps.smartmate.io/forms/rows/row.schema.json"
      }
    },
    "outcomes": {
      "type": "object",
      "description": "Actions the user can take when they complete the task",
      "propertyNames": {
        "allOf": [{
          "$ref": "https://schemas.apps.smartmate.io/patterns/identification.schema.json"
        }]
      },
      "patternProperties": {
        "": {
          "$ref": "https://schemas.apps.smartmate.io/processes/processForms/outcomes/outcome.schema.json"
        }
      }
    }
  },
  "required": ["name", "rows"],
  "additionalProperties": false
}
