Skip to content

Instantly share code, notes, and snippets.

@RickCarlino
Created February 3, 2022 16:54
Show Gist options
  • Save RickCarlino/267a390f8f3846b8bda044be75f077a2 to your computer and use it in GitHub Desktop.
Save RickCarlino/267a390f8f3846b8bda044be75f077a2 to your computer and use it in GitHub Desktop.
Celeryscript example

Passing a Number to a Sequence

SCENARIO:

  • You have a sequence with an ID of 123.
  • The sequence exposes one numberic variable with a label of My number (capitalization is important).
  • You want to execute the sequence and pass a value of 456 to the variable.
{
  "kind": "rpc_request",
  "args": {
    "label": "label123",
    "priority": 500
  },
  "body": [
    {
      "kind": "execute",
      "args": { "sequence_id": 123 },
      "body": [
        {
          "kind": "parameter_application",
          "args": {
            "label": "My number",
            "data_value": {
              "kind": "numeric",
              "args": {
                "number": 456
              }
            }
          }
        }
      ]
    }
  ]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment