Services & operations
Services group operations callable from components.
Complete example
cmn
package com.example.customer
import org.joinedworkz.facilities.common.base
platform Base
type Customer {
id**: Id
name*: Name
}
service CustomerService {
find(id*: Id): Customer
search(name: String): Customer[]
}Operation structure
An operation is declared directly by its name; there is no operation keyword.
id*: Idis a mandatory parameter.name: Stringis optional because it has no mandatory*.: Customeris a single return value.: Customer[]is a collection return value.- Stereotypes and properties can add platform-specific metadata.
The CMN 1.3.80 grammar does not define a separate error-response list for service operations. HTTP response codes belong to resource methods and method types instead.
