-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conditional flows. Understanding the number of steps to be executed. #99
Comments
@joseconstela has funded $140.00 to this issue.
|
@joseconstela has cancelled funding for this issue.(Cancelled amount: $140.00) See it on IssueHunt |
Ongoing solution on https://github.com/tideflow-io/puzzles_99 |
All use cases are now implemented on https://github.com/tideflow-io/tideflow/tree/joseconstela/issue85 |
5 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As the implementation of conditional steps is reaching to its end, I've encountered a good number of use cases and situations where Tideflow needs to change how it's calculating if the execution of a workflow should be considered as completed.
You can check the progress of the conditional steps implementation in #85.
Until now this was calculated based on the number of steps in the flow, and the number of completed tasks. But as per the conditional steps implementation, Tideflow needs your help and expertise to update its logic to match the new requirements.
Please be aware that this issue description might change in the upcoming days as new cases might come to light.
Number of steps meant to be executed in a flow with conditional steps
Hello!
I'm looking for someone to write some javascript code (for both the server via NodeJS and for the browser). It must be capable of understanding how many steps does a flow have, and how many are meant to be executed - as some steps represents conditions.
Whatever code you write (let's call it "your function") must be able to intake two different parameters.
Help for implementation:
Diagrams, code snippets, images, etc
examples-for-tideflow-99.zip
Deliverables
Deliverables are:
You can either provide the solution as a zip file or upload it as brand new files at https://github.com/tideflow-io/tideflow/tree/joseconstela/issue85/imports/queue/server - this is: a branch you create out of joseconstela/issue85.
Your function
The first parameter
The "flow diagram" - is a json representation of the flow. Including its trigger, list of steps, how they are connected to each other, and how are conditional steps outputs connected. This "flow diagram" have the following format:
The second parameter
OPTIONAL - the "steps results" - is an array that contains the list of executed steps - at any given time. It tells your function the list of conditions, and if they passed or not. An example for this parameter could be:
What this tells your function is that the conditions of the 3rd and 10th steps did not passed, and the 5th step condition did passed.
Your function's result
Your function's result must be - when possible - the number of total steps in the flow, but also (if it have any conditions) the number of steps that are meant to be executed, given the list of steps results. But also to check for some cases that could jeopardize the correct behaviour of a flow execution.
Some example outputs for your function could be:
A flow that does not have any conditions
We simply expect the number of steps in total
You can find examples for this flows diagrams in:
simple.js
A flow that does have conditions
The behaviour of your function in this case will vary depending on the content of the second parameter - the "steps results" array.
For example, if the "steps result" array is empty, them the result is expected to contain the list of total steps (as in
flow.steps.length
) andexecutionSteps
as "unknown".The reason behind the "unknown" value is that, as the flow does have some conditional steps, it's impossible for your function to know how many steps it will execute, as it has no clue if those conditions are met or not.
And in case the "steps result" array is provided with condition(s) result(s), then
executionSteps
is meant to contain the number of tasks that could be executed - unless such number is "unknown" for the given "steps result" array.You can find examples for this flows diagrams in:
complex-with-conditions.js
condition.js
conditions-no-results.js
conditions-only-one-result.js
In the case of a circular flow
Circular flows detection is already implemented: https://github.com/tideflow-io/tideflow/blob/joseconstela/issue85/imports/modules/flows/both/flow.js#L115
A circular flow is a flow diagram in which any of it steps could be executed more than once. Your function must throw an error in such case, as we don't want to execute flow steps in a loop :).You can find examples for this flows diagrams in:circular.js
circular-with-condition.js
circular-complex-with-conditions.js
IssueHunt Summary
Backers (Total: $0.00)
Become a backer now!
Or submit a pull request to get the deposits!
Tips
The text was updated successfully, but these errors were encountered: