View on GitHub

Microservice DSL (MDSL)

A Domain-Specific Language (DSL) to specify (micro-)service contracts, their data representations and API endpoints.

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:

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 
;

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.