Comments (5)
ok @geomagilles , understood! I will have a look.
So I still do not understand why it was throwing a modified decider exception in Production & not in development?
from zenaton-node.
Good news from what I can see, we do not have this behaviour in the php-sdk
from zenaton-node.
This is the job sent in Node.js to the agent in the execute
HTTP CALL
%{"branch" => 0, "duration" => 10, "event" => nil, "input" => "{\"v\":\"1.0.0\",\"s\":[{\"k\":[\"event\"],\"v\":[null]}],\"o\":\"@zenaton#0\"}", "maxProcessingTime" => nil, "name" => "_Wait", "position" => "1", "sync" => true, "timestamp" => nil, "type" => "wait"}
This is the job sent in PHP to the agent in the execute
HTTP CALL
%{"branch" => 0, "duration" => 5, "event" => nil, "input" => "{\"a\":{\"event\":null,\"_buffer\":[[\"seconds\",5]]},\"s\":[]}", "maxProcessingTime" => nil, "name" => "Zenaton\\Tasks\\Wait", "position" => "1", "sync" => true, "timestamp" => nil, "type" => "wait"}
As you can see, the parameter sent with the wait are not included in the input serialization in Node.js, this is why the hash is the same and so it does not generate a ModifiedDeciderException.
Now I'm wondering why it was generating one in production, we should have a deeper look to Amine's workflow
from zenaton-node.
So I dug a little bit more,
In Node.js, the JobBox.js in the Agent has data[ATTRIBUTE_INPUT] = serializer.encode(this.job.data);
And for a wait, this.job.data
has only the event
properties, not the _buffer
like in PHP.
I believe this is something we don't want. After having a look to the waitClass here:
https://github.com/zenaton/zenaton-node/blob/master/src/async/Tasks/Wait.js
You can see that it apply a WaitTimestamp
trait:
https://github.com/zenaton/zenaton-node/blob/master/src/async/Traits/WithTimestamp.js, where properties _buffer
is used
And the Trait class is defined here, https://github.com/zenaton/zenaton-node/blob/master/src/async/Services/Trait.js
You can see that the apply method is:
mix.apply(this, [baseClass.prototype].concat(traits));
return baseClass;
I may be wrong because it's voodoo JS to me, but I believe this is injecting trait properties to the base this
of the waitClass and we maybe want to be injected in this.data
@jalric your help will be appreciated ;)
from zenaton-node.
Fixed.
from zenaton-node.
Related Issues (20)
- Version management of workflow is buggy since v7.0
- Check use of the library with various NodeJS frameworks
- Event triggered 2 times HOT 1
- No Init check library side: provided variable or connection HOT 1
- Useless dependency
- Ability to load ES6 imports HOT 1
- Workflow's data property set to null/undefined leads to crash
- Error when defining custom methods in Tasks and Workflows
- Use of `execute` method outside a workflow should thrown an error HOT 2
- Use of `Wait` class outside a workflow should thrown an exception HOT 2
- Add scheduling
- Wait months method issue HOT 1
- ModifiedDeciderException in Wait following upgrade to 0.5.7
- Generate ID when scheduling things
- When trying to serialize a json object that contains a function we should raise an error.
- TypeScript support HOT 1
- You cannot wait and event without a timeout HOT 1
- You cannot wait and event without a timeout HOT 2
- Launching a workflow within an inexistent environment is buggy
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 zenaton-node.