SuspendedTenantHandler: Handler
Item | Value |
---|---|
Briefly | Brief description missing. |
Definition Path | ImprovingApp.TenantContext.Tenant.EstablishedTenant.SuspendedTenantHandler |
View Source Link | tenant.riddl(213:21) |
\n"Copy fields which are present from TenantContext.EditInfo.newInfo into info fields"set field EstablishedTenantState.meta to "TenantContext.TenantMetaInfo"send event TenantContext.InfoEdited to outlet TenantEventsSource.Events
\n
{
error "User is not authorized to Activate Tenant"
} else {
set field EstablishedTenantState.meta to "TenantContext.TenantMetaInfo"
send event TenantContext.TenantSuspended to outlet TenantEventsSource.Events
become entity Tenant to handler ActiveTenantHandler
}
```\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 Suspended state"```\n
## *Used By None*
## *Uses Nothing*