Operations

An Operation allows you to specify the function of a Class. Defining an Operation enables you to request a Class to perform that function.

If you have a Class called policy for example, you could create an Operation called createClaim to create a claim against this policy.

Warning: Operations are not supported in BPM. If you add an operation in Business Object Modeler when BPM is your specified destination, a warning message is generated. Operations may still be useful for analysis purposes, but they do not map to anything in BPM at runtime.

You can specify arguments and argument types for Operations. Arguments often add extra data that the operation needs. For example, the createClaim operation could specify the Doctor’s visit notes as a parameter.

An Operation can also return a value after it has finished. You can show the value it returns and the value’s type. For example, the createClaim operation could return the Claim once it has completed.

Each Class can have a number of Operations. Operations that are defined for a Class are displayed in the Operations Compartment of the Class, below a line that separates them from the attributes, as shown below.

The example shows the createClaim operation that has a parameter of VisitNotes and whose return value is the Claim.