Comments (3)
Since user tasks are asynchronous by nature, the lib-bpmn-engine is designed to pause a workflow and continue later.
In the example, Line 11
This is where your workflow is started in the engine until the point, where the user task happens,
then the handler is called.
Since the handler notifies the user for action (Line 21) it then just returns, so then engine will pause the workflow and return the control to your application, in Line 12.
Now, your application must somehow get the input from the user and then "continue" the workflow instance, as shown in Line 13.
Since the user task was paused, the same task handler will be called and now the handler knows, that the desired user input is present and can finally call
job.Complete()
to signal the engine to continue the workflow.
Typically, you need to store the user input in some database or similar.
In the example you see if externalEvent == "user is done" {
- this must be your logic, which baybe fetches user input from a database or similar - OR the user input comes in via API-Request ... completely up to your design and needs.
Does this make more sense to you?
from lib-bpmn-engine.
ok. seems i need to build a full structure with database in order to continue evaluate. Will update again afterwards.
from lib-bpmn-engine.
OK, thank you for the feedback.
Please, keep in mind the feature of loading/storing BPMN state from/into a database is still on the roadmap:
https://github.com/nitram509/lib-bpmn-engine/milestone/3
I consider this question answered.
If you have further questions, don't hesitate to create new issues/questions :)
from lib-bpmn-engine.
Related Issues (20)
- QUESTION: Process not in COMPLETED state? HOT 4
- Ensure that parallel flows are executed independently HOT 7
- QUESTION: How to execute a process in async way HOT 3
- Add support for link events HOT 3
- improve documentation: synchr. vs. asynch. jobs
- bpmn is driven through for temporal HOT 4
- Refactor using go-style Getters and Setters
- implement support for start timer event HOT 1
- evaluate expression using jsonlogic HOT 3
- Even more flexible task handlers HOT 9
- rework job.SetVariable() only when calling complete() or fail() HOT 8
- support handlers being registered for (task definition) types
- support assignee and candidateGroups for user tasks
- tried in private production project? HOT 1
- bpmnEngine.NewTaskHandler undefined HOT 6
- improve error handling handleIntermediateTimerCatchEvent() HOT 1
- improve test coverage
- Rework engine-name to be optional HOT 5
- fix data house keeping / cleanup
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 lib-bpmn-engine.