statelyai / feedback

Request features and give feedback for Stately tools.
https://stately.ai
1 stars 1 forks source link

json code doesn't include guard implementation #382

Open SirJo opened 9 months ago

SirJo commented 9 months ago

Details

when adding some logic to guards this implementation is not visible at the json code

https://stately.ai/registry/editor/d800d0b9-f2bd-40c6-9f78-7158c94124af?machineId=57a7c59d-177d-4ffc-a997-2d7dc05577af

**json**
{
  "context": {
    "CW": 0
  },
  "id": "Guards Implementation",
  "initial": "SwithOnInibited",
  "states": {
    "SwithOnInibited": {
      "on": {
        "Next": {
          "target": "ReadyToSwitchOn",
          "cond": "xxxx_xxxx_xxxx_xxx0"
        }
      }
    },
    "ReadyToSwitchOn": {
      "on": {
        "Next": {
          "target": "NotReadyToSwitchOn",
          "cond": "xxxx_x1xx_xxxx_x110"
        }
      }
    },
    "NotReadyToSwitchOn": {}
  }
}
**missing code**
export default function({ context, event }, params) {
  context.CW == 0;
  return true;
}

Category

None

farskid commented 9 months ago

@SirJo I'm curious to know the use-case for including code implementations in the JSON export.