How to correctly resume state?
See original GitHub issueHello, I created small sample diagram and script, that must resume execution of diagram if it unexpectedly stops. But in fact it executes only last block and stops whole script. Please help, what I’m doing wrong?
Normal execution, without interrupt ( with debug )
~ node index.js
START Test process
START Start
START Task A
START Task B
Waiting Task B for 5 seconds...
START Parallel 2
Resume Task B!
START Task C
Script completed
Execution with interrupt on Task B ( with debug ) :
~ node index.js
START Test process
START Start
START Task A
START Task B
Waiting Task B for 5 seconds...
START Parallel 2
^C
~ node index.js
Resuming saved state
START Task B
Waiting Task B for 5 seconds...
Resume Task B!
START Parallel 2
Code: index.js and Services.json
Diagram: diagram_1.bpmn
engine.getState() output when I interrupted execution by ^C: state.json
Issue Analytics
- State:
- Created 7 years ago
- Comments:13 (5 by maintainers)
Top Results From Across the Web
How To Create a Resume for a State and Local Government Job
For example, if you were given a task to lead a project, mention how many people worked under you. Also, you can state...
Read more >How to Make a Resume in 2023 | Beginner's Guide
Everything you need to know about how to write a resume. Step-by-step guide, covering 21+ real-life examples, resume templates that you can use,...
Read more >How To Make a Comprehensive Resume (With Examples)
Be brief. Employers have mere seconds to review your resume, so you should keep your descriptions as concise and relevant as possible. Try ......
Read more >How to Write a Resume in 2023: A Step-by-Step Guide
Company name and location – Include the full name of the company you worked for followed by the city and state of its...
Read more >How to Make a Resume: Step-by-Step Writing Guide for 2023
Photo/Headshot: In the United States, resume images and profile photos are usually ... Not sure about the proper resume education format?
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have tried to make sure there is a state to save when listening on
start
, e.g:@NeonXP: Can you update the engine with
npm i bpmn-engine@rc
and try again?@christopherRiddersater I would, imho, consider a message broker, e.g. RabbitMQ. When the listener emits
wait
orstart
(or ends) a message is published with the state. It is non-interrupting and the state is saved even if the instance is abruptly terminated.Regarding states, what I’m trying to argue is that the diagram designer (or devops) knows best when a recoverable state is in place. To facilitate this the bpmn-engine could expose the activity properties (defined in the modeler), as such:
Would that help? (#20?)