So everything is ok if the user is “pushing the button”, but how to deal with timer logic using “express” endpoints? Do I maybe have to resume all my processes when express starting, something like this?(I don’t think that it’s a good idea):
const app = express()
const states = getAllProcessStates()
for (const state of state) {
const engine = new Engine({
moddleOptions: {
camunda: require('camunda-bpmn-moddle/resources/camunda'),
},
}).recover(state)
const listener = new EventEmitter()
engine.resume(
{
listener,
}
)
}
app.listen(5000)
Or maybe there is some proper approach? Maybe you have some server examples to provide?
Thank you!
I have the same problem.
I'm working on a "cron" service that checks every X minutes if the timer has completed.
To do this, I save the state to a database.
Hi! Can you please give me a suggestion, I am trying to implement a workflow server, using "express" and "bpmn-engine". So let's consider a process:
Here is how I am trying to implement my server:
Implementing endpoint that “signals” the UserTask:
So everything is ok if the user is “pushing the button”, but how to deal with timer logic using “express” endpoints? Do I maybe have to resume all my processes when express starting, something like this?(I don’t think that it’s a good idea):
Or maybe there is some proper approach? Maybe you have some server examples to provide? Thank you!