diff --git a/README.md b/README.md index 5c71fb30..ad10f26b 100644 --- a/README.md +++ b/README.md @@ -118,15 +118,23 @@ You can convert it to its string representation in JSON or YAML format by using the static methods `Workflow.toJson` or `Workflow.toYaml` respectively: ```typescript -import { Workflow } from '../src/lib/definitions/workflow'; +import {Specification, workflowBuilder} from "@severlessworkflow/sdk-typescript"; -const workflowAsJson: string = Workflow.toJson(workflow); +const workflow: Specification.Workflow = workflowBuilder() + //... + .build() + +const workflowAsJson: string = Specification.Workflow.toJson(workflow); ``` ```typescript -import { Workflow } from '../src/lib/definitions/workflow'; +import {Specification, workflowBuilder} from "@severlessworkflow/sdk-typescript"; + +const workflow: Specification.Workflow = workflowBuilder() + //... + .build() -const workflowAsYaml: string = Workflow.toYaml(workflow); +const workflowAsYaml: string = Specification.Workflow.toYaml(workflow); ```