Enhancements to tasks recipe

- Fix AbstractStateMachineFactory so that it does not try
  to create transitions with null source or target. Basically we
  just skip transition source or target which doesn't belong to
  region.
- Change DefaultExtendedState to use ConcurrentHashMap so that
  there's less change to get into trouble with concurrency.
- Add statechart for tasks recipe.
- Fix various concepts in TasksHandler and its tests.
- Prepare some examples for docs.
- Fixes #74
This commit is contained in:
Janne Valkealahti
2015-07-25 17:09:54 +01:00
parent 0fba91cbf2
commit 178ee816a4
7 changed files with 399 additions and 46 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View File

@@ -0,0 +1,46 @@
+----------------------------------------------------------------------------+
| SM |
+----------------------------------------------------------------------------+
| |
| +---------------------------+ |
| FORK | TASKS | JOIN |
| | +---------------------------+ | |
| +-------------+ RUN | | +-------------------+ | | |
| *-->| READY |----->|----->| *-->| TASK_id_INITIAL | |---->|----+ |
| +-------------+ | | +-------------------+ | | | |
| ^ ^ | | | | | | |
| | | | v | | |
| | | | +-------------------+ | | |
| | | | | TASK_id | | | |
| | | | +-------------------+ | | |
| | | |===========================| | |
| | | | +-------------------+ | | |
| | | | *-->| TASK_id_INITIAL | | | |
| | | | +-------------------+ | | |
| | | | | | | |
| | | | v | | |
| | | | +-------------------+ | | |
| | | | | TASK_id | | | |
| | | | +-------------------+ | | |
| | | +---------------------------+ | |
| | | | |
| | | [OK] +------------+ | |
| | +--------------------------| CHOICE |<----------------+ |
| | +------------+ |
| | | |
| | | [ERROR] |
| | v |
| | +-----------------------------------------------+ |
| | | ERROR | |
| | +-----------------------------------------------+ |
| | CONTINUE | +-------------+ FALLBACK +-------------+ | |
| +-------------| *-->| AUTOMATIC |--------->| MANUAL | | |
| | | | | | | |
| | | | | FIX | | |
| | | | | +-----+ | | |
| | | | | | | | | |
| | | | | | v | | |
| | +-------------+ +-------------+ | |
| +-----------------------------------------------+ |
| |
+----------------------------------------------------------------------------+