@@ -169,14 +169,14 @@ You can also programmatically create Workflow instances, for example:
169169
170170``` java
171171Workflow testWorkflow = new Workflow (). withId(" test-workflow" ). withName(" test-workflow-name" ). withVersion(" 1.0" )
172- .withEvents(Arrays . asList(
172+ .withEvents(new Events ( Arrays . asList(
173173 new EventDefinition (). withName(" testEvent" ). withSource(" testSource" ). withType(" testType" ))
174- )
175- .withFunctions(Arrays . asList(
174+ ))
175+ .withFunctions(new Functions ( Arrays . asList(
176176 new FunctionDefinition (). withName(" testFunction" ). withResource(" testResource" ). withType(" testType" ))
177- )
177+ ))
178178 .withStates(Arrays . asList(
179- new DelayState (). withName(" delayState" ). withType(DELAY )
179+ new DelayState (). withName(" delayState" ). withType(DefaultState . Type . DELAY )
180180 .withStart(
181181 new Start (). withKind(Start . Kind . DEFAULT )
182182 )
@@ -222,16 +222,16 @@ If you build your Workflow programmatically, you can validate it as well:
222222
223223``` java
224224Workflow workflow = new Workflow (). withId(" test-workflow" ). withVersion(" 1.0" )
225- .withStates(Arrays . asList(
226- new DelayState (). withName(" delayState" ). withType(DELAY )
227- .withStart(
228- new Start (). withKind(Start . Kind . DEFAULT )
229- )
230- .withEnd(
231- new End (). withKind(End . Kind . DEFAULT )
232- )
233- .withTimeDelay(" PT1M" )
234- )
225+ .withStates(Arrays . asList(
226+ new DelayState (). withName(" delayState" ). withType(DefaultState . Type . DELAY )
227+ .withStart(
228+ new Start (). withKind(Start . Kind . DEFAULT )
229+ )
230+ .withEnd(
231+ new End (). withKind(End . Kind . DEFAULT )
232+ )
233+ .withTimeDelay(" PT1M" )
234+ ));
235235);
236236
237237WorkflowValidator workflowValidator = new WorkflowValidatorImpl ();
0 commit comments