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

ActiveMemberHandler: Handler

ItemValue
BrieflyBrief description missing.
Definition PathImprovingApp.MemberContext.Member.RegisteredMemberState.ActiveMemberHandler
View Source Linkmembers.riddl(280:21)

OnMessageClause command ImprovingApp.MemberContext.RegisterMember

Statements

\nerror "Member has already been registered."\n

OnMessageClause command EditMemberInfo

Statements

                       contact = @EditMemberInfo.info.contact,
                       handle = @EditMemberInfo.info.handle,
                       avatar = @EditMemberInfo.info.avatar,
                       firstName = @EditMemberInfo.info.firstName,
                       lastName = @EditMemberInfo.info.lastName,
                       notificationPreference = @EditMemberInfo.info.notificationPreference,
                       organizationMembership = @EditMemberInfo.info.organizationMembership,
                       tenant = @EditMemberInfo.info.tenant
                    )"set field RegisteredMemberState.meta to "!MemberContext.MetaInfo(
                        createdOn = @RegisteredMemberState.meta.createdOn,
                        createdBy = @RegisteredMemberState.meta.createdBy,
                        lastUpdatedOn = now(),
                        lastUpdatedBy = @EditMemberInfo.editingMember,
                        currentState = @MemberStates.Draft
                    )"send event MemberInfoEdited to outlet ImprovingApp.MemberContext.MemberEventsSource.Events```\n
### _OnMessageClause command ImprovingApp.MemberContext.SuspendMember_

#### Statements
```\nif "all required fields in requiredInfo are not None or Empty" then
{
  send event MemberSuspended to outlet MemberEventsSource.Events
  become entity Member to handler SuspendedMemberHandler
}
```\n
### _OnMessageClause command ImprovingApp.MemberContext.TerminateMember_

#### Statements
```\nset field RegisteredMemberState.meta to "record MemberContext.MetaInfo"morph entity ImprovingApp.MemberContext.Member to state ImprovingApp.MemberContext.Member.TerminatedMember with record TerminatedMemberState```\n
### _OnMessageClause query GetMemberData_

#### Statements
```\nreply record MemberInfo```\n
## *Used By*
* [OnMessageClause 'On command ImprovingApp.MemberContext.ActivateMember'](/improvingapp/membercontext/member/registeredmemberstate/suspendedmemberhandler#on-command-improvingapp.membercontext.activatemember) in [Handler 'SuspendedMemberHandler'](/improvingapp/membercontext/member/registeredmemberstate/suspendedmemberhandler)

## *Uses Nothing*