Adding the UnsuspendAccount Rule

Here is the sample code for adding the UnsuspendAccount rule.

Copy

UnsuspendAccount Rule Source Code

/**
 * @description 
 * @author nprade-nb
 */
rule Rules.UnsuspendAccount {
    
    attribute {
        priority = 1;
        forwardChain = true;
    }
    
    declare {
        Concepts.Account account;
        Events.Unsuspend request;
    }
    
    when {
        account@extId == request.AccountId;
        account.Status == "Suspended";
    }
    
    then {
        account.Status = "Normal";
    }
    
}

Congratulations! You have now configured the project’s ontology and rules. Now you are ready to configure the Cluster Deployment Descriptor (CDD) and build the archive for deployment. But before you do, it’s wise to validate and analyze the project, and look at it in the Project diagram.