File tree 1 file changed +12
-4
lines changed
1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -118,15 +118,23 @@ You can convert it to its string representation in JSON or YAML format
118
118
by using the static methods ` Workflow.toJson ` or ` Workflow.toYaml ` respectively:
119
119
120
120
``` typescript
121
- import { Workflow } from ' ../src/lib/definitions/workflow ' ;
121
+ import {Specification , workflowBuilder } from " @severlessworkflow/sdk-typescript " ;
122
122
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 );
124
128
```
125
129
126
130
``` 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 ()
128
136
129
- const workflowAsYaml: string = Workflow .toYaml (workflow );
137
+ const workflowAsYaml: string = Specification . Workflow .toYaml (workflow );
130
138
```
131
139
132
140
You can’t perform that action at this time.
0 commit comments