Skip to content

Instantly share code, notes, and snippets.

@ChakshuGautam
Last active February 14, 2024 07:49
Show Gist options
  • Save ChakshuGautam/7bcdf58ec8fc67ac7d623ba43a5981b1 to your computer and use it in GitHub Desktop.
Save ChakshuGautam/7bcdf58ec8fc67ac7d623ba43a5981b1 to your computer and use it in GitHub Desktop.
{
 "start": "transformer1",
 "transformer1": {
     "impl": "tranform(xMsg) => {xMsg, state}",
     "states": [
        "onSuccess",
        "onFailure",
     ],
     "onSuccess": "tranformer2",
     "onFailure": "transformer1",
 }
}
{
  "name": "Switch",
  "impl": "tranform(xMsg) => {xMsg, state}",
  "states": [
    1, 2, 3, 4, 5
  ],
  "1": "tranformer1",
  "2": "tranformer2"
  ...
}

Transformer Impl

{
  "name": "Switch",
  "impl": "tranform(xMsg) => {xMsg, state}",
  "states": [
    1, 2, 3, 4, 5
  ]
}

States

  1. IfElse - if, else
  2. Switch - 1-5
  3. onSuccess
  4. onFailure

Orchestration

State => Node | End

Defining the Transformer

  1. Defining the Tranformer => Code that will run | End States for a transformer
  2. DI => Config

Orchestration

  1. End States for a transformer <> Next Transformer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment