We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
1.To create more than 1 fsm with the same config, const cfg = { ... events: { ... { name: 'step', from: 'init', to: ['a', 'b', 'c'], condition: function (options) { const {args:[{instanceid, id}]} = options; console.log(instanceid(${instanceid}) ID:{id:${id}- method condition was called); return new Promise(function (resolve, reject) { resolve(id%3); }); }, }, ... } ... }
instanceid(${instanceid}) ID:{id:${id}- method condition was called
fsm_(1...n) = StateMachine({...cfg});
concurrent process data by different fsm created above, the condition method will not be called properly and the state machine was broken.
The text was updated successfully, but these errors were encountered:
Hi! Can you create a minimal example that demonstrates the issue? Thanks!
Sorry, something went wrong.
No branches or pull requests
1.To create more than 1 fsm with the same config,
const cfg = {
...
events: {
...
{
name: 'step',
from: 'init',
to: ['a', 'b', 'c'],
condition: function (options) {
const {args:[{instanceid, id}]} = options;
console.log(
instanceid(${instanceid}) ID:{id:${id}- method condition was called
);return new Promise(function (resolve, reject) {
resolve(id%3);
});
},
},
...
}
...
}
fsm_(1...n) = StateMachine({...cfg});
fsm_(n) .step({instanceid: fsm_(n).instanceId(), id: a_random_num});
concurrent process data by different fsm created above, the condition method will not be called properly and the state machine was broken.
The text was updated successfully, but these errors were encountered: