|
standard library package Connections { |
|
doc |
|
|
|
|
|
|
|
|
|
|
|
private import Base::Anything; |
|
private import Occurrences::Occurrence; |
|
private import Occurrences::HappensDuring; |
|
private import Objects::LinkObject; |
|
private import Objects::linkObjects; |
|
private import Objects::BinaryLinkObject; |
|
private import Objects::binaryLinkObjects; |
|
private import Transfers::Transfer; |
|
private import Transfers::transfers; |
|
private import Transfers::FlowTransfer; |
|
private import Transfers::flowTransfers; |
|
private import Transfers::FlowTransferBefore; |
|
private import Transfers::flowTransfersBefore; |
|
private import ScalarValues::Natural; |
|
private import Parts::Part; |
|
private import Parts::parts; |
|
private import Actions::Action; |
|
private import Actions::actions; |
|
|
|
abstract connection def Connection :> LinkObject, Part { |
|
doc |
|
|
|
|
|
|
|
|
|
} |
|
|
|
abstract connection def BinaryConnection :> Connection, BinaryLinkObject { |
|
doc |
|
|
|
|
|
|
|
|
|
|
|
|
|
end source: Anything[0..*] :>> BinaryLinkObject::source; |
|
end target: Anything[0..*] :>> BinaryLinkObject::target; |
|
} |
|
|
|
abstract flow def MessageConnection :> BinaryConnection, Transfer, Action { |
|
doc |
|
|
|
|
|
|
|
|
|
|
|
|
|
end occurrence source: Occurrence[0..*] :>> BinaryConnection::source, Transfer::source; |
|
end occurrence target: Occurrence[0..*] :>> BinaryConnection::target, Transfer::target; |
|
|
|
ref payload :>> 'item'; |
|
|
|
private ref part thisConnection = self; |
|
|
|
in event occurrence sourceEvent [1] default thisConnection.start { |
|
doc |
|
|
|
|
|
|
|
|
|
} |
|
in event occurrence targetEvent [1] default thisConnection.done { |
|
doc |
|
|
|
|
|
|
|
|
|
} |
|
|
|
connection :HappensDuring connect sourceEvent to source[1]; |
|
connection :HappensDuring connect targetEvent to target[1]; |
|
|
|
private attribute seBeforeNum: Natural[1] = if sourceEvent==thisConnection.start ? 0 else 1; |
|
private attribute teAfterNum: Natural[1] = if targetEvent==thisConnection.done ? 0 else 1; |
|
succession [seBeforeNum] first sourceEvent[0..1] then self[0..1]; |
|
succession [teAfterNum] first self[0..1] then targetEvent[0..1]; |
|
} |
|
|
|
abstract flow def FlowConnection :> MessageConnection, FlowTransfer { |
|
doc |
|
|
|
|
|
|
|
|
|
|
|
|
|
end occurrence source: Occurrence[0..*] :>> MessageConnection::source, FlowTransfer::source; |
|
end occurrence target: Occurrence[0..*] :>> MessageConnection::target, FlowTransfer::target; |
|
} |
|
|
|
abstract flow def SuccessionFlowConnection :> FlowConnection, FlowTransferBefore { |
|
doc |
|
|
|
|
|
|
|
|
|
|
|
end occurrence source: Occurrence[0..*] :>> FlowConnection::source, FlowTransferBefore::source; |
|
end occurrence target: Occurrence[0..*] :>> FlowConnection::target, FlowTransferBefore::target; |
|
} |
|
|
|
abstract connection connections: Connection[0..*] nonunique :> linkObjects, parts { |
|
doc |
|
|
|
|
|
|
|
} |
|
|
|
abstract connection binaryConnections: Connection[0..*] nonunique :> connections, binaryLinkObjects { |
|
doc |
|
|
|
|
|
|
|
} |
|
|
|
abstract message messageConnections: MessageConnection[0..*] nonunique :> binaryConnections, transfers, actions { |
|
doc |
|
|
|
|
|
|
|
|
|
end occurrence source: Occurrence[0..*] :>> MessageConnection::source, binaryConnections::source, transfers::source; |
|
end occurrence target: Occurrence[0..*] :>> MessageConnection::target, binaryConnections::target, transfers::target; |
|
} |
|
|
|
abstract message flowConnections: FlowConnection[0..*] nonunique :> messageConnections, flowTransfers { |
|
doc |
|
|
|
|
|
|
|
|
|
|
|
end occurrence source: Occurrence[0..*] :>> FlowConnection::source, messageConnections::source, flowTransfers::source; |
|
end occurrence target: Occurrence[0..*] :>> FlowConnection::target, messageConnections::target, flowTransfers::target; |
|
} |
|
|
|
abstract message successionFlowConnections: SuccessionFlowConnection[0..*] nonunique :> flowConnections, flowTransfersBefore { |
|
doc |
|
|
|
|
|
|
|
|
|
end occurrence source: Occurrence[0..*] :>> SuccessionFlowConnection::source, flowConnections::source, flowTransfersBefore::source; |
|
end occurrence target: Occurrence[0..*] :>> SuccessionFlowConnection::target, flowConnections::target, flowTransfersBefore::target; |
|
} |
|
} |