Add support of results for workflow triggers#1182
Merged
Conversation
Member
|
I really think all the Engine should be based on event and it will be simpler to have only one type of data to pass consensus on the network. |
Member
Author
|
Based on the last meeting, we continue with this implementation but we simplify it.
|
f358719 to
e880622
Compare
NicolasMahe
approved these changes
Jul 15, 2019
BREAKING CHANGE: executionsdk.Create signature changed
e880622 to
631b4c0
Compare
NicolasMahe
approved these changes
Jul 16, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The workflow is now listening to the following streams
If it receives a matching even, it creates an execution with the event hash and the event data
If it receives a matching execution, it creates an execution with the parent execution hash and the output of the parent execution
To test:
Current workflow implemented:
engine/workflow/workflow.go
Lines 95 to 103 in f358719
Service here
--env EVENT_INTERVAL=0to remove useless logs)You should see 2 executions, one with the evenHash (event start) and the other with a parentHash (result of taskA)
You can trigger another one with
mesg-cli service:execute test-workflow taskA --data a=helloAnd see again 2 executions, one from the CLI (with an eventHash) the second from the workflow (with an parentHash)