컨텐츠로 건너뛰기
Developer Preview — APIs and language features may change before 1.0

accepts

이 콘텐츠는 아직 해당 언어로 제공되지 않습니다.

accepts

Section: declares the machine’s input fields (name, type, modifiers)

Translations

  • es: acepta
  • fr: accepte
  • en: accepts
  • de: akzeptiert
  • ja: 受け取る
  • zh: 接受
  • ko: 받는다

Example — A simple decision

Checks an order total and decides whether it needs a human to look at it.

machine order_check
accepts
total as number, is required
responds with
approved as boolean
reason as text
implements
decide review
when input.total > 1000
{approved: false, reason: "needs review"}
otherwise
{approved: true, reason: "auto approved"}
verifies
test "large orders need review"
given {total: 5000}
expect {approved: false}