BPMN-OS
BPMN for optimization and simulation
Loading...
Searching...
No Matches
MyopicMessageTaskTerminator.h
Go to the documentation of this file.
1#ifndef BPMNOS_Execution_MyopicMessageTaskTerminator_H
2#define BPMNOS_Execution_MyopicMessageTaskTerminator_H
3
4#include <bpmn++.h>
8
9namespace BPMNOS::Execution {
10
11/**
12 * @brief Class creating an error event for a token at a message task if the message can not be delivered.
13 *
14 * The MyopicMessageTaskTerminator terminates a @ref BPMN:ReceiveTask or a @ref BPMN:SendTask with an error if
15 * the respective message cannot be delivered. It only raises an error if all tokens have advanced as far as possible,
16 * i.e., if all pending decisions except for message delivery decisions are made, and if no task waits for a
17 * @ref BPMNOS::Execution::ReadyEvent or a @ref BPMNOS::Execution::CompletionEvent, and if no @ref BPMN::TimerCatchEvent
18 * has a token. It assumes that a message handler making possible message delivery decisions has been called before,
19 * so that no message can currently be delivered. The handler is myopic and does not consider future instantiations
20 * of processes.
21 */
23public:
25 std::shared_ptr<Event> dispatchEvent( const SystemState* systemState ) override;
26 void connect(Mediator* mediator) override;
27 void notice(const Observable* observable) override;
28private:
29 auto_list< std::weak_ptr<const Token>, std::weak_ptr<const DecisionRequest> > messageDeliveryDecisions;
30 auto_list< std::weak_ptr<const Token>, std::weak_ptr<const DecisionRequest> > otherDecisions;
31};
32
33} // namespace BPMNOS::Execution
34
35#endif // BPMNOS_Execution_MyopicMessageTaskTerminator_H
36
Class creating an error event for a token at a message task if the message can not be delivered.
std::shared_ptr< Event > dispatchEvent(const SystemState *systemState) override
void notice(const Observable *observable) override
A class representing the state that the execution or simulation of a given scenario is in.
Definition SystemState.h:21
List of tuples with automatic removal of tuples containing an expired weak_ptr.
Definition auto_list.h:15
Represents an abstract base class for a class that is an event listener and notifier.
Definition Mediator.h:13