Skip to content
Lukas Kölbener edited this page Dec 17, 2015 · 10 revisions

Use cases can be imported. They primarly describe the Semantic Proximity of a group of nanoentities.

They can also be marked as latency critical which when results in Latency. (See use case searchArticles in the sample below.)

Use cases are defined by the nanoentities read and written. One challenge is how to model references to entities. We suggest to define a nanoentitity "xxIdentifier" for each entity and add this nanoentities to the nanoentitiesRead if a reference needs to accessed or written. If fore example the Booking entity references an Article, the createBooking use cases contains the Article.articleIdentifier in its nanoentitiesRead list.

Sample file

{ 
"useCases": 
	[
		{	
			"name":"createCustomer",
			"nanoentitiesRead": [],
			"nanoentitiesWritten":["Customer.firstname","Customer.name","Customer.street","Customer.city","Customer.creditCard","Customer.accountNr"]
		},
		{	
			"name":"createBooking",
			"nanoentitiesRead": ["Article.price"],
			"nanoentitiesWritten":["Booking.bookingDate","Booking.paymentDate","Booking.totalPrice","Booking.bookingState"]
		},
		{	"name":"createArticle",
			"nanoentitiesRead": [],
			"nanoentitiesWritten":["Article.articleName", "Article.price", "Article.serial"]
		},
		{
			"name":"searchArticles",
			"nanoentitiesRead": ["Article.articleName", "Article.price", "Article.serial"],
			"nanoentitiesWritten":[],
			"isLatencyCritical":"true"
		},
		{
			"name":"payBooking",
			"nanoentitiesRead": ["Customer.creditCard", "Booking.bookingIdentifier", "Article.articleIdentifier"],
			"nanoentitiesWritten":["Booking.paymentDate", "Booking.bookingState"],
			"isLatencyCritical":"true"
		}
	]
}

JSON Schema to validate the file: ServiceCutter/JSON_Schemas/2_userReps.json

Online Validator: www.jsonschemavalidator.net

Relevant coupling criteria