the alternative block
play

The Alternative Block Nondeterministially choose and execute any - PowerPoint PPT Presentation

Specification Approaches Message Sequence Diagrams The Alternative Block Nondeterministially choose and execute any fragment whose guard is true c:Customer m:Merchant Provide Quote alt Accept Quote [Yes] Reject Quote [ Yes] Munindar P.


  1. Specification Approaches Message Sequence Diagrams The Alternative Block Nondeterministially choose and execute any fragment whose guard is true c:Customer m:Merchant Provide Quote alt Accept Quote [Yes] Reject Quote [ ¬ Yes] Munindar P. Singh (NCSU) Service-Oriented Computing Fall 2018 203

  2. Specification Approaches Message Sequence Diagrams The Optional Block Modeling error here: Showing internal detail (free (spare time)) in a protocol c:Customer m:Merchant Provide Goods Pay Charges opt Submit Comments [free] Munindar P. Singh (NCSU) Service-Oriented Computing Fall 2018 204

  3. Specification Approaches Message Sequence Diagrams The Loop Block Usually bounded in our examples c:Customer m:Merchant Provide Goods Pay Charges loop Offer [5 times] Counter Offer Munindar P. Singh (NCSU) Service-Oriented Computing Fall 2018 205

  4. Specification Approaches Message Sequence Diagrams Purchase (Just the Happy Path) Notice the hand off pattern, indicative of delegation s:Shipper c:Customer m:Merchant Request for Quotes Quote Accept Ship Deliver Munindar P. Singh (NCSU) Service-Oriented Computing Fall 2018 206

  5. Specification Approaches Message Sequence Diagrams The Parallel Block c:Customer m:Merchant b:Bank Provide Goods Pay Charges par Deliver Goods [] Request Payment [] Munindar P. Singh (NCSU) Service-Oriented Computing Fall 2018 207

  6. Specification Approaches Message Sequence Diagrams Exercise: Diagramming Precedence ◮ Four roles: A , B , C , D (could map to the same parties) ◮ Two messages: m AB and m CD (sender to receiver: distinct parties) ◮ We would like to assert that m AB precedes m CD Munindar P. Singh (NCSU) Service-Oriented Computing Fall 2018 208

  7. Specification Approaches Message Sequence Diagrams All Possible Sequence Diagrams Given messages from a to b and from c to d b � = d b � = c a � = d b = d b = c a � = c b � = c a = d a � = b b = c c � = d b � = d a = c b = d Munindar P. Singh (NCSU) Service-Oriented Computing Fall 2018 209

  8. Specification Approaches Message Sequence Diagrams Exercise: Which of the Sequence Diagrams for Precedence are Compatible with Asynchrony? Invariant outcomes regardless of relative execution speed, communication delays, and no global clock Munindar P. Singh (NCSU) Service-Oriented Computing Fall 2018 210

  9. Specification Approaches Message Sequence Diagrams Exercise: Diagramming Occurrence and Exclusion Use guards that refer to message occurrence If [ m AB ] occurs then so does [ m CD ] ◮ Four roles: A , B , C , D (could map to the same parties) ◮ Two messages: m AB and m CD (sender to receiver) ◮ We would like to assert that ◮ m AB excludes m CD ◮ m AB and m CD mutually exclude each other ◮ m AB requires m CD Munindar P. Singh (NCSU) Service-Oriented Computing Fall 2018 211

  10. Specification Approaches Message Sequence Diagrams Properties of a (Point-to-Point) Message Channel Can we take a system snapshot that violates any of these properties? How can we achieve each property? Noncreative: Must a message that is received have been sent by someone? ◮ Will a channel create messages? Reliable: Must a message that is sent be received? ◮ Will a channel drop messages? Ordered: Must the messages received from the same sender be received in the order in which they were sent? ◮ In which direction does the information flow? Global: Must the messages received from different senders be received in the order in which they were sent? ◮ Called “causal” ordering in the literature but that term refers to potential causality Munindar P. Singh (NCSU) Service-Oriented Computing Fall 2018 212

  11. Specification Approaches Message Sequence Diagrams Challenges to Correctness of Protocols Not specific to sequence diagrams Distribution: different parties observe different messages, i.e., each lacks remote knowledge Asynchrony: different parties observe messages in inconsistent orders ◮ Despite FIFO channels ◮ Intuitions about correctness ◮ If each party interacts correctly, is the overall behavior correct? ◮ If not, our sequence diagram is not realizable or enactable ◮ Is the design of each party obvious? ◮ Does the design of the parties preclude some legal enactments? Munindar P. Singh (NCSU) Service-Oriented Computing Fall 2018 213

  12. Specification Approaches Protocols and Policies Business Protocols Interactions among autonomous parties, understood at the business level ◮ Conversation : An instance of a protocol ◮ Operational representations: steps taken ◮ Procedural ◮ Sequence diagrams ◮ State diagrams ◮ Activity diagrams ◮ Petri Nets ◮ Declarative ◮ Temporal logic ◮ Dynamic logic ◮ Information-based specifications ◮ Meaning-based representations: underlying business transaction ◮ Declarative, if captured formally at all ◮ Commitment machines ◮ Constitutive specifications Munindar P. Singh (NCSU) Service-Oriented Computing Fall 2018 214

  13. Specification Approaches Protocols and Policies Exercise: Identify the Public and Private Components Process = Protocol + Policies s:Shipper c:Customer m:Merchant Request for Quotes Quote Accept Ship Deliver Munindar P. Singh (NCSU) Service-Oriented Computing Fall 2018 215

  14. Specification Approaches Protocols and Policies Exercise: How Might we Modularize Protocols? Consider Purchase Munindar P. Singh (NCSU) Service-Oriented Computing Fall 2018 216

  15. Specification Approaches Protocols and Policies Modular Business Protocols ◮ Identify small, well-defined interactions with clear business meanings ◮ Improve flexibility and concurrency ◮ Possibly lead to invalid executions ◮ How can we ensure good properties despite modularity? ◮ Begin from a constraint language ◮ Standardize modular fragments as patterns, e.g., RosettaNet Munindar P. Singh (NCSU) Service-Oriented Computing Fall 2018 217

  16. Specification Approaches Protocols and Policies Sequence Diagrams for Business Modeling No! ◮ No internal reasoning ◮ No private predicates in guards ◮ No method calls ◮ No self calls ◮ No synchronous messages ◮ No business puts itself on indefinite hold waiting for its partner to proceed ◮ No causally invalid expectations ◮ No nonlocal choice ◮ No nonlocal choice that matters ◮ No control of incoming message occurrence or ordering ◮ No dependence on occurrence or ordering of remote message emission or reception ◮ No reliance on ordering across channels ◮ No reliance on ordering within a channel unless warranted Munindar P. Singh (NCSU) Service-Oriented Computing Fall 2018 218

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend