ActiveTenantHandler: Handler
Item | Value |
---|---|
Briefly | Brief description missing. |
Definition Path | ImprovingApp.TenantContext.Tenant.EstablishedTenant.ActiveTenantHandler |
View Source Link | tenant.riddl(153:21) |
\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
{
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*