Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
dpavlikovskiy committed May 25, 2017
1 parent f9cf73f commit 7542604
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions README.md
Expand Up @@ -78,6 +78,24 @@ Following code execute flow:


Online documentation how to create first application based on flow available at (http://neuro4j.org/articles/tutorial_hello_world)
### Creating HelloWorld workflow with java
```
Workflow workflow = new WorkflowBuilder("org.neuro4j.flows.HelloWorld", "StartNode1")
.addCustomNode("org.neuro4j.flows.example.HelloWorld")
.withOnError(createEndNode()).done()
.addEndNode()
.build();
WorkflowEngine engine = new WorkflowEngine(new ConfigBuilder());
WorkflowRequest request = new WorkflowRequest();
request.addParameter("name", "Mister");
ExecutionResult result = engine.execute(workflow, "StartNode1", request);
System.out.println(result.getFlowContext().get("message"));
```

### Sync vs Asyn
Workflow can be executed synchronously:
Expand Down

0 comments on commit 7542604

Please sign in to comment.