RIDDL Specification For improving.app
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

ActiveTenantHandler: Handler

ItemValue
BrieflyBrief description missing.
Definition PathImprovingApp.TenantContext.Tenant.EstablishedTenant.ActiveTenantHandler
View Source Linktenant.riddl(153:21)

OnMessageClause command TenantContext.EditInfo

Statements

\n"Copy fields which are present from TenantContext.EditInfo.newInfo into info fields"set field EstablishedTenantState.meta to "record TenantContext.TenantMetaInfo"send event TenantContext.InfoEdited to outlet TenantEventsSource.Events\n

OnMessageClause command SuspendTenant

Statements

{
  error "User is not authorized to suspend Tenant"
} else {
  set field EstablishedTenantState.meta to "record TenantContext.TenantMetaInfo"
  send event TenantContext.TenantSuspended to outlet TenantEventsSource.Events
  become entity Tenant to handler SuspendedTenantHandler
}
```\n
### _OnMessageClause command TerminateTenant_

#### Statements
```\nif "terminating user is not authorized to make changes to the tenant" then
{
  error "User is not authorized to modify Tenant"
} else {
  set field EstablishedTenantState.meta to "TenantContext.TenantMetaInfo"
  send event TenantContext.TenantTerminated to outlet TenantEventsSource.Events
  morph entity Tenant to state TerminatedTenant with record TerminatedTenantState
}
```\n
### _On Other_

#### Statements
```\nerror "Command not allowed in Active state"```\n
## *Used By None*

## *Uses Nothing*