Skip to content

Commit 02c0637

Browse files
committed
fix-172
1 parent e7c68be commit 02c0637

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

README.md

+11-3
Original file line numberDiff line numberDiff line change
@@ -118,13 +118,21 @@ You can convert it to its string representation in JSON or YAML format
118118
by using the static methods `Workflow.toJson` or `Workflow.toYaml` respectively:
119119

120120
```typescript
121-
import { Workflow } from '../src/lib/definitions/workflow';
121+
import {Specification, workflowBuilder} from "@severlessworkflow/sdk-typescript";
122122

123-
const workflowAsJson: string = Workflow.toJson(workflow);
123+
const workflow: Specification.Workflow = workflowBuilder()
124+
//...
125+
.build()
126+
127+
const workflowAsJson: string = Specification.Workflow.toJson(workflow);
124128
```
125129

126130
```typescript
127-
import { Workflow } from '../src/lib/definitions/workflow';
131+
import {Specification, workflowBuilder} from "@severlessworkflow/sdk-typescript";
132+
133+
const workflow: Specification.Workflow = workflowBuilder()
134+
//...
135+
.build()
128136

129137
const workflowAsYaml: string = Workflow.toYaml(workflow);
130138
```

0 commit comments

Comments
 (0)