Comments (5)
Not obvious what the correct behaviour here is. Let's suppose an entry node has a few actions and a wait, so it's events are going to be:
- action_event1
- action_event2
- msg_wait
But our caller is starting with these events....
- set_environment
- msg_received
- something_else
What is the correct event timeline?
from goflow.
Agreed that if there's actions to take prior to the wait it might be a bit different. This arises from migrating previous ruleset-first flows that are meant to handle an inbound message from a trigger. Perhaps it's different if it leads with a wait with no actions?
from goflow.
It does kinda make sense that if you want your wait to not actually wait but "consume" the initial message then it should be the absolute first thing in the flow..
I guess there's also a larger question of whether waits and the event they're waiting for have to be beside each other in the event timeline, or whether waits can pick from a set if events.
from goflow.
We have implicit behavior in our current flows now right? IE, if a flow's first node is a split on @step.value then we consider it having a wait..
Seems we can make that more explicit in the new engine, as in whether that node has a wait or not.
I think waits currently have a way of immediately determining whether they should end. This is the case for flow waits for example, where a subflow may have run to completion in an action before the wait is even reached. So in that way this seems very similar.
I wonder if maybe we should change the model for waits and resumes a bit that happen inline. For example, maybe when a subflow is called that actually CREATES a resume event that is then processed by the wait when it is reached. That would then remove the need for the special casing for waits, essentially they would figure out if they can resume where they are immediately based on what resume events exist perhaps?
from goflow.
It definitely feels slightly weird to me to have waits act differently if they are the first node vs not. I think that is especially weird in the new world where nodes can actually have actions on them. So what would be the rule then, nodes with no actions and wait that are the first node will "ingest" the first incoming message, but if it has actions or if there is anything else then it won't and will wait for the next incoming message?
That feels weird to me though I'm not coming up with anything better, just from a generic flow perspective that feels odd. Is this maybe special behavior of the msg_wait itself? In that it looks back to see if there were say any outgoing messages sent after the last msg_received
and if not then treats that message as its resume event? That would make the behavior specific to msg_wait
which will feel more correct at least.
from goflow.
Related Issues (20)
- Combine editor autocompletion files into single JSON file
- Doc generation shouldn't use fuzzy entries from localization files
- Docs shouldn't be in the repo? HOT 5
- Add flow_exited event?
- Limit message attachment length to 2048
- Support formatting of date components as words HOT 4
- Similar implementation of SUM HOT 1
- @count() always return 11 HOT 2
- ContactQL query normalization adds superfulous parentheses
- Re-evaluate groups after ticket opening
- Only set `expires_on` for waiting runs HOT 2
- Expose campaign on `@trigger` HOT 1
- Don't include router fields in PO extraction for subflow, webhook nodes etc HOT 3
- Failing a session should exit all runs
- Switch to https://github.com/Shopify/gomail
- Allow querying datetime values with time accuracy
- Time limits on dial waits
- Record on `msg_created` events whether contact is messageable HOT 1
- Make call available to expressions
- Consider UNICODE confusables when text matching HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from goflow.