statusRegistry
id: py-statusRegistry
statusRegistry
conststatusRegistry:StatusRegistry
Global registry of all defined status vendors and codes for the current project. Includes the built-in "LAY" vendor plus any custom vendors defined in Resource Status Definition Assets.
At a Glance
VENDOR = Status.getVendorByName('MyCompany')
def on_message():
if invalid:
message.addStatus(Severity.ERROR, Status.create(VENDOR, 'INVALID_DATA', reason))
Common Tasks
| Task | Method / Property |
|---|---|
| Get all vendors | statusRegistry.vendors |
| Get vendor by ID | statusRegistry.getVendorById(0) |
| Get vendor by long name | statusRegistry.getVendorByLongName('MyCompany') |
| Get vendor by short name | statusRegistry.getVendorByShortName('MYCO') |
| Get language codes | statusRegistry.languages |
| Access status codes | statusRegistry.vendors[0].statusCodes |
See Also
StatusRegistry— Full class referenceStatus— Creating status objectsSeverity— Severity levels