Transaction
Workflows
flowchart TD
subgraph Transaction1
subgraph Workflow1
wf1_start["Start"] --> wf1_fb1("Function Block")
wf1_fb1 --> wf1_wf2("Workflow (embdeded)")
wf1_wf3("Workflow (dispatched)") --> wf1_fb2("Function Block")
wf1_fb2 --> wf1_end["End"]
end
style Workflow1 fill:#B9EAC9,stroke:#333,stroke-width:2px
subgraph Workflow2
wf1_wf2 --> wf2_start["Start"]
wf2_start --> wf2_fb1("Function Block")
wf2_fb1 --> wf2_end["End"]
wf2_end --> wf1_wf3
end
style Workflow2 fill:#FFCFCFFF,stroke:#333,stroke-width:2px
end
subgraph Transaction2
subgraph Workflow3
wf1_wf3 --> wf3_start["Start"]
wf3_start --> wf3_fb1("Function Block")
wf3_fb1 --> wf3_end["End"]
end
style Workflow3 fill:#FFEBA8FF,stroke:#333,stroke-width:2px
end
Aquiring and locking
Aquiring is done to populate the context of a workflow and apply locks on entities. All entities can have a lock applied, if a workflow/function block/step is run on them.
flowchart LR
subgraph Acquisition phase
entities["Acquire entities"] --> aquire_global["Acquire global"]
aquire_global --> aquire_step["Acquire per step"]
aquire_step --> lock(("Create lock"))
end
subgraph Transation
lock --> step1("Step 1")
step1 --> step2("Step 2")
step2 --> step3("Step 3")
end
Steps
- Acquire entities: Selected entities getting aquired.
- Acquire global: Acquiring statically defined entities (add & remove functionallity)
- Acquire per step: Dynamic acquisition of entities based on configuration of each step (embeded/sub workflow, function block)
- Lock: Create lock on acquired entities based on locking type and strategy
- Transation: Start execution the steps of the worklow
Locking types
Typ | Read | Write |
---|---|---|
Read lock | ok Multiple users or processes can read the entity concurrently when it is under a read lock. |
nok No user or process is allowed to modify the entity while it is under a read lock. |
Write lock | nok No users or processes can access the entity for reading while it is under a write lock. |
nok Only the user who holds the lock can write or modify the entity. |
Locking strategy
Strategy | Read lock behavior | Write lock behavior |
---|---|---|
Normal | same Multiple reads allowed, no writes |
same Only one user can write; all others blocked |
Loose | same Multiple reads allowed, no writes |
Multiple writes allowed, reads also permitted |