{
  "StartAt": "Upserting",
  "States": {
    "Upserting": {
      "Type": "Task",
      "InputPath": "$.person",
      "Resource": "module:upserting",
      "ResourceConfig": {
        "modelId": "people"
      },
      "ResultPath": null,
      "Next": "Finding"
    },
    "Finding": {
      "Type": "Task",
      "InputPath": "$.person",
      "Resource": "module:findingOne",
      "ResourceConfig": {
        "modelId": "people",
        "filter": {
          "where": {
            "employeeNo": {
              "equals": "$.employeeNo"
            }
          }
        }
      },
      "ResultPath": "$.upsertedPerson",
      "End": true
    }
  },
  "restrictions": [
    {
      "roleId": "$authenticated",
      "allows": [
        "*"
      ]
    }
  ]
}
