Skip to content

Commit 59754ae

Browse files
author
Tihomir Surdilovic
authored
Merge pull request #19 from tsurdilo/functiondefreadmeupdate
Readme update for function def changes
2 parents 473ebd3 + 5abc6c8 commit 59754ae

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

README.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ version: '1.0'
110110
name: Greeting Workflow
111111
description: Greet Someone
112112
functions:
113-
- name: greetingFunction
114-
resource: functionResourse
113+
- name: greetingFunction
114+
operation: file://myapis/greetingapis.json#greeting
115115
states:
116116
- name: Greet
117117
type: operation
@@ -168,15 +168,13 @@ assertEquals(DefaultState.Type.OPERATION, operationState.getType());
168168
You can also programmatically create Workflow instances, for example:
169169

170170
``` java
171-
Workflow testWorkflow = new Workflow().withId("test-workflow").withName("test-workflow-name").withVersion("1.0")
172-
.withEvents(new Events(Arrays.asList(
173-
new EventDefinition().withName("testEvent").withSource("testSource").withType("testType"))
174-
))
171+
Workflow workflow = new Workflow().withId("test-workflow").withName("test-workflow-name").withVersion("1.0")
175172
.withFunctions(new Functions(Arrays.asList(
176-
new FunctionDefinition().withName("testFunction").withResource("testResource").withType("testType"))
177-
))
173+
new FunctionDefinition().withName("testFunction")
174+
.withOperation("testSwaggerDef#testOperationId")))
175+
)
178176
.withStates(Arrays.asList(
179-
new DelayState().withName("delayState").withType(DefaultState.Type.DELAY)
177+
new DelayState().withName("delayState").withType(DELAY)
180178
.withStart(
181179
new Start().withKind(Start.Kind.DEFAULT)
182180
)

0 commit comments

Comments
 (0)