Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Parameter

Description

"valueName"

The workflow alarm value name, as defined in the Alarm Detection Editor

value

Any value to be associated with the name

Returns

Nothing

Info

Example - Using dispatchAlarmValue

The following code example displays a situation and syntax useful for the dispatchAlarmValue.

Code Block
consume {
 if ( timeToPay ) {
 udrRoute(chargingUdr, "to_billing");
 //Enable for 'amount out of range' Alarm Detection
 dispatchAlarmValue("chargingAmount", chargingUdr.amount);
 }
}

...

Parameter

Description

message

A main message appearing in the log

parameterName_n

Name of an optional parameter. If declared, parameterValue_n must be declared as well.

parameterValue_n

Value of an optional parameter. If declared, parameterName_n must be declared as well.

Returns

Nothing

Info

Example - Using logWarning

The following code example logs a warning message, which when displayed in the System Log will look like the following figure:

Code Block
logWarning( "UDR failed validation",
 "ANUMBER IS ", input.anum, 
 "BNUMBER IS ", input.bnum,
 "DURATION IS ", input.duration);

...

These functions invokes logging with log4j. For information about how to configure the logging, see Customizing APL Logging for ECDs (4.23).

Code Block
void log.fatal
(any message, 
any tag ) //optional

void log.error
(any message, 
any tag ) //optional

void log.warn
(any message, 
any tag ) //optional

void log.info 
(any message, 
any tag ) //optional

void log.debug 
(any message, 
any tag ) //optional

void log.trace
(any message, 
any tag ) //optional

Parameter

Description

message

A value that will be appear in the message field in the log output
This parameter will be ignored if cannot be typecasted to a primitive data type e g string or int.

tag

Objects(s) that will appear in the tag field in the log output.

Returns

Nothing

Info

Example - Using log.debug

Code Block
consume {
   log.debug("In consume.");
  list<int> rcDebug =listCreate(int);
 int rc=0;
 listAdd(rcDebug,rc);
 rc=1;
 listAdd(rcDebug,rc);
 log.debug(rc,rcDebug);
 }

...

Sends an email to a configured recipient. In order to operate, the system must have an email remitter and an SMTP mail server defined.

Warning

Warning!

If used within the consume block, make sure that conditional expressions guarantees that this function does not get called for each UDR.

...

Note!

This field will be sent as plain text. For sending in HTML format, refer to the mailNotifyHtml function.

Parameter

Description

address

Email address to the recipient on the form: "user@xxx.com"

subject

Text ending up as the email subject

message

Message string ending up as the body of the email

Note

sender

Name or address of the sender of the email

Note

Optional

This field will remain optional only when the attachment field is not populated. Once attachment is populated, the sender field will be a mandatory field.

attachment

A list that will contain one or many attachments to be sent with the email. Each list entry will be the full directory path of the attachment.

Info

Example

"/home/admin/attachments/word.txt"

Returns

Nothing

...

Sends an email in HTML format to a configured recipient. In order to operate, the system must have an email remitter and an SMTP mail server defined.

Warning

Warning!

If used within the consume block, make sure that conditional expressions guarantees that this function does not get called for each UDR.

...

Parameter

Description

address

Email address to the recipient on the form: "user@xxx.com"

subject

Text ending up as the email subject

message

Message string ending up as the body of the email

info

Note!

Supports standard HTML content.

sender

Name or address of the sender of the email

Note

Optional

This field will remain optional only when the attachment field is not populated. Once attachment is populated, the sender field will be a mandatory field.

attachment

A list that will contain one or many attachments to be sent with the email. Each list entry will be the full directory path of the attachment.

Info

Example

"/home/admin/attachments/word.txt"

Returns

Nothing

...