User bio
404 bio not found
Member since Aug 1
Replies:

This is my code:
 

Class bd.webapp.OutboundMessageRequest Extends (%Persistent, Ens.Request, %JSON.Adaptor)

{



Property Metadata As bd.webapp.OutboundMessageRequestMetadata;

Property MessageContent As %DynamicObject;

Method %GetContentType() As %String
{
    If $ISOBJECT(..MessageContent) {
        Quit "application/json"
    } Else {
        Quit ##super()
    }
}

Method %ShowContents(pZenOutput As %Boolean = 0)
{
    If $ISOBJECT(..MessageContent) {
        Set json = ..MessageContent.%ToJSON()
        set formatter = ##class(%JSON.Formatter).%New()
        If pZenOutput {
            Write formatter.Format(json)
        } Else {
            Write json
        }
    } 
    
  
    /*If $ISOBJECT(..Metadata) {
        Set json = ..Metadata.%ToJSON()
        set formatter = ##class(%JSON.Formatter).%New()
        If pZenOutput {
            Write formatter.Format(json)
        } Else {
            Write json
        }
    }*/
}

Method %ShowContentsHead(pZenOutput As %Boolean = 0)
{
    If $ISOBJECT(..MessageContent) {
        If pZenOutput {
            Write "<b>MessageContent (JSON)</b><br>"
        } Else {
            Write "MessageContent (JSON):", !
        }
    }
}


Class bd.webapp.OutboundMessageRequestMetadata Extends (%RegisteredObject, %JSON.Adaptor)
{

Property RegionSlug As %String;

Property TenantSlug As %String;

Property SystemSlug As %String;

Property MessageId As %String;

Property MessageType As %String [ InitialExpression = "JSON" ];

Property OccurredAt As %String;

Property CorrelationId As %String;

}
Certifications & Credly badges:
Aditi has no Certifications & Credly badges yet.
Global Masters badges:
Aditi has no Global Masters badges yet.
Followers:
Aditi has no followers yet.
Following:
Aditi has not followed anybody yet.