CaseMaster Scripting
reviewed: 14 February 2025
Each .cms file is written in CaseMaster Script, the scripting language of CaseMaster. It is a procedural language with several concepts from Object Oriented languages.
The language itself is small and is mainly concerned with flow. The actual functionality is delivered by the function handlers.
CaseMaster Script offers a number of features:
- Statements that handle flow control (e.g.
if.then.else,iterate.end-iterate,switch.end-switch,return, etc.) - Error handling (
try.catch.end-try) - Function definitions
- Call functions
- Conditions (entities only)
- Resources
- Inheritance
- Tracing
- Comments
The following is an example of a simple routine in CaseMaster Script:
function getFormalName()
return buildString(
' ',
bo.attrFormatted( [_me], 'title' ),
concat( left( bo.attr( [_me], 'firstName' ), 1 ), '.' ),
bo.attr( [_me], 'middleName' ),
bo.attr( [_me], 'surName' )
)
end-function
The details of CaseMaster Script will be explained in detail in other documents.
The CaseMaster runtime eco system consists of executables (mainly casemaster.web.exe and casemaster.process.exe), optionally some dynamic link libraries with additional function handlers and several CaseMaster Script files (which can all be found in the application runtime folder).
CaseMaster Script is an interpreted language. You can use the function script.quickrun() to run CaseMaster Script code. This can, for example, be used to add scripting support to your application.