Skip to content

Files

Latest commit

author
socadk
Jan 12, 2022
95f2065 · Jan 12, 2022

History

History
96 lines (69 loc) · 3.93 KB

scenarios.md

File metadata and controls

96 lines (69 loc) · 3.93 KB
title author copyright
Microservice Domain Specific Language (MDSL) Integration Scenarios and Stories
Olaf Zimmermann
Olaf Zimmermann, 2021. All rights reserved.

HomeEndpoint TypesBindingsProvider and ClientTutorialCheat SheetTools

Integration Scenarios and User/Job Stories

Note: The grammar and the tool support for stories might change in future versions of MDSL.

Use Cases (When to Specify)

The MDSL grammar foresees three scenario types for this optional MDSL concept:

  • Scenarios and stories can define requirements for APIs and services from a client perspective.
  • They can also express frontend and backend integration needs.
  • They can be used for API mocking and testing.

Example

A scenario contains one or more stories. A story has up to five parts, which combine the elements found in user stories and BDD-style examples as specifications and tests. Only actor role and action are mandatory:

scenario Scenario1
  story Story1
   when "something has happened" // trigger
   a "customer and/or integrator" // actor role (can be system)
   wants to "startProcess" in "location"// action, business activity 
   yielding "a result" // outcome
   so that "both actors are satisfied and profit is made" // goal 
    
  story Story2
    a API client wants to CRUD "SomeBusinessObject"

The keyword CRUD is short for create, read, update, and delete.

Language Concepts (Overview)

The grammar combines elements from a common user story template with the given-when-then structure in Behavior-Driven Development (BDD) and Acceptance Test Driven Development (ATDD):


IntegrationScenario:
	'scenario' name=ID ('type' type=ScenarioType)? stories+=IntegrationStory*
 ;

IntegrationStory:
	('story' name=ID ('type' type=StoryType)? related+=RelatedStories*)?
	('when' condition=STRING)? // precondition 
	('a'|'an'|'the') (client=STRING | 'API' 'client') // actor, persona
	'wants' 'to' action=Action on+=StoryObject*  // the responsibility/feature
	('yielding' outcome=STRING)? // postcondition 
	('so' 'that' goal=STRING)? // business impact
;

Action:
	plainAction=STRING | keyword=ActionKeyword ('a'|'an'|'the')? target=STRING
;

enum ActionKeyword:
	CRUD | CRUDSF | CQRS 
;

StoryObject:
	('with'|'against'|'for'|'at'|'in'|'to'|'on'|'from'|'and'|'into'|'within'|'via')? ('a'|'an'|'the'|'its')? object=STRING
;

enum StoryType:
	USER_STORY | JOB_STORY | TEST_CASE | API_MOCK
;

enum ScenarioType:
	BUSINESS_API | FRONTEND_INTEGRATION_SCENARIO | BACKEND_INTEGRATION_SCENARIO 
;

Related Transformations

Scenarios and their stories can be turned into flows and endpoint types. See this page for an overview of the available transformations.

Site Navigation

Copyright: Olaf Zimmermann, 2018-2022. All rights reserved. See license information.