Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 14 Next »

Control objects in the toolbox include the following:

Break

Break is used to exit the loop if the condition is met. If it used outside the loop, the rest of the rule is skipped.

Call Include

Call Include allows you to move a part of the rule into an external include (.inc) file and attach this file to one or more rules. Call Include allows to choose an existing .inc file or to create a new one. 

Example of Call Include object

Const

The Constant element is used to store decimal constants.
It has only two attributes: Name and Value.
Please double-click the Constant element in the worksheet to edit its value in the pop-up box (like shown in the figure below):

Example of Const element
This object is used for a constant you want to reference.
Properties: 

  • Name – Defaults to const

Continue

Continued is used for cycle processing. It is often used during lookups to retrieve data.
If the evaluation is true, the processing goes to the next iteration, skipping the rest of the cycle.
If the evaluation is false, the cycle goes forward.

Copy File

Copy File was designed for copying files. 

Example of Copy File element

The "Settings" button allows you to specify such parameters as Timeout and Retry Interval:

Example of Settings element
There are also two very important parameters: 

  • LOCALFILENAME - the name of the file to be copied 
  • REMOTEFILENAME - the path, where to copy the file 

You can give a Name to your Copy File object. It is used to construct the result status variable names.
If the Name is not empty, the name_STATUS_CODEname_CHANNEL STATUS_CODEname_STATUS_MESSAGE{_} variables are created, and can be used in other expressions. See the following table for more details:

Variable

Possible Values and their Description

name_STATUS_CODE

0 (Success)
-1 (Connection/initialization error)
-2 (Send error)
-3 (Receive timeout)
-4 (Reply read error)

name_CHANNEL_STATUS_CODE

If name_STATUS_CODE is not 0, this variable will contain a channel specific status code.

name_STATUS_MESSAGE

Contains the status message.

Editcheck

EditCheck is designed to check the validity of certain data in an input message. To do so, add an EditCheck element to your working area and specify an appropriate check expression and an error message in the "Properties" tab or double click the corresponding properties in the EditCheck box as shown in the figure below.

If the value of the EditCheck expression returns False, the Rule Processor on the ESTAR Web Server can be used to interrupt output messages generation based on input messages. Also, if it returns False, output messages are not created. You can find the reasons blocking output messages in Message Center Console. This feature is especially useful when your rule requires specific values in the input message.

Example of Use

Example of Edit check
The EditCheck above checks the length of the value of the third field in the incoming CSV message. The creation of output messages on the ESTAR Web Server is interrupted if this length is less than or equal to 0.

In this case, you will see the error "|3| is NULL" in the Message Center Console. The error code will be shown as 100008, and the Message Center Console will show that it is related to tag 33 (this is also specified in the properties of the EditCheck).
 

Preprocessor 

The Preprocessor allows you to execute any command line inside the rule. It has several properties. To specify commands, please use the Settings button in the left bottom corner of the shape: 


The dialog window helps you add desired commands: 

Edit parameters dialog

Variable

Values and Description

Name_EXEC_STATUS

0 – The preprocessor was not executed. For example, the preprocessor execution condition did not evaluate to TRUE.


1 – Success with data.


2 – Success with no data.


-1 – Error.

Name_EXEC_STATUS_MESSAGE

Success.


Query returned no data.


Error.

Name_PREPROCSTATUS

1 – Success with data.


101 – Success with no data.


Other values – error.

Name_PREPROCSTATUS_STDERR

Error text from the console.

Name_PREPROCSTATUS_STDOUT

Output from the console.

Raise Exception

Raise Exception shows an Info, Warning or Error message. In the Translation rules, you can choose whether to stop executing the rule or not. 
It is a helpful especially for debugging and analysis. 


The Expression, Code, Description and ReasonTag can be changed after double-clicking them.
Severity is a drop-down list which allows to choose between Info, Warning or Error and to decide If execution should be stopped.
Expression and ReasonTag can be connected to other objects – for example, to source.
The Code field is for storing a specific digit code for the event.
The Description field helps to understand  why the RaiseException occurred. 

Example of Raise exception

Read Data from File 

Read Data from File allows to get data from a specified file. 

Example of Read data from file
The "Settings" button opens the following dialog window: 

Example of Edit parameters
The main window of this object and the "Object Settings" window contain such a set of parameters: 

  • REMOTEFILENAME. The name of the file from which to read the data.
  • REMOVEFILE. If ticked, then the file  is removed after it is read.
  • LOCALFILENAME. File of the local file.
  • TIMEOUT. Timeout (in seconds) for receiving the E-mails. 
  • RETRY INTERVAL. The number of seconds to wait before retrying in case of failure. 
  • OPTIONS. Various options. 

You can give a Name to your Read Data from File object. It is used to construct the result status variable names.
If the Name is not empty, the name_RESULT_DATA, name_STATUS_CODE, name_CHANNEL_STATUS_CODE, name_STATUS_MESSAGE{_} variables are created, and can be used in other expressions. See the following table for more details:

Variable

Possible Values and their Description

name_RESULT_DATA

Contains the data read from the specified file.

name_STATUS_CODE

0 (Success)
-1 (Connection/initialization error)
-2 (Read error)
-3 (Receive timeout)
-4 (Reply read error)

name_CHANNEL_STATUS_CODE

If name_STATUS_CODE is not 0, this variable will contain a channel specific status code.

name_STATUS_MESSAGE

Contains the status message.

Receive E-mail

Receive E-mail allows you to get an E-mail. Its "Settings" button is for specifying parameters: 

Example of Receive Email
The following dialog window opens:

Edit Parameters dialog
You can specify several parameters here:

  • POP3SERVER. IP address or host name of the POP3 mail server.
  • POP3PORT. Port of the POP3 mail server.
  • SMTPSERVER. IP address or host name of the SMTP mail server.
  • SMTPPORT. Port of the SMTP mail server.
  • USERNAME. User ID used to log into the mail server.
  • ENCRYPTED. A value of 1 indicates the password is Eagle encrypted.
  • PASSWORD. The password to be used to log into the mail server. It can be clear text or encrypted text based on the value of the ENCRYPTED parameter. This is typically an expression.
  • FROM. Contains the string value which is considered the sender address.
  • FROMSELECTION. Filter to the FROM parameter. Possible values are:
    1. Exact. Only letters are received where the From string equals the value defined in the FROM parameter.
    2. Starts with. Only letters are received where the From string starts with the value defined in the FROM parameter.
    3. Contains. Only letters are received where the From string contains the value defined in the FROM parameter.
    4. None. The value in the FROM parameter is ignored.
  • SUBJECT. Contains the string value which is rated as the Subject of mail received.
  • SUBJECTSELECTION. Filter to the SUBJECT parameter. The list of possible values is the same as in the FROMSELECTION parameter: Exact, Starts with, Contains, and None. 
  • DELETE ON READ. If ticked, will delete E-mail messages from the server after getting them. 
  • TIMEOUT. Timeout (in seconds) for receiving the E-mails. 
  • RETRY INTERVAL. The number of seconds to wait before retrying in case of failure. 
  • OPTIONS. Various options. 

Receive E-mail  has properties, which include the above parameters and a set of properties for any shape: 

Properties dialog
You can give a Name to Receive E-mail. It is used to construct the result status variable names. If the Name is not empty, the name_RESULT_DATA, name_STATUS_CODE, name_CHANNEL STATUS_CODE, name_STATUS_MESSAGE{_} variables are created, and can be used in other expressions. See the following table for more details:

Variable

Possible Values and their Description

name_RESULT_DATA

Contains the received E-mail message(s).

name_STATUS_CODE

0 (Success)
-1 (Connection/initialization error)
-2 (Send error)
-3 (Receive timeout)
-4 (Reply read error)

name_CHANNEL_STATUS_CODE

If name_STATUS_CODE is not 0, this variable will contain a channel specific status code.

name_STATUS_MESSAGE

Contains the status message.

Send E-mail

Send E-mail  allows you to get an E-mail. Its "Settings" button is for specifying parameters: 

Send email dialog
The following dialog window opens:

Edit Parameters dialog
You can specify several parameters: 

  • POP3SERVER. IP address or host name of the POP3 mail server.
  • POP3PORT. Port of the POP3 mail server.
  • SMTPSERVER. IP address or host name of the SMTP mail server.
  • SMTPPORT. Port of the SMTP mail server.
  • USERNAME. User ID used to log into the mail server.
  • ENCRYPTED. A value of 1 indicates the password is Eagle encrypted.
  • PASSWORD. The password to be used to log into the mail server. It can be clear text or encrypted text based on the value of the ENCRYPTED parameter. This is typically an expression.
  • SENDMAILFROM. Contains the e-mail address of the sender.
  • SENDMAILTO. E-mail address of the recipient.
  • SENDMAILSUBJECT. Subject of the e-mail.
  • CONTENT TYPE. Select the type of the content from the drop-down list. 
  • SEND AS ATTACHMENT. If ticked, the content will be sent as an attachment to the E-mail instead of placing the content inside the message body. 
  • ATTACHMENT FILE NAME. Specify the file name for the attachment. 
  • TIMEOUT. Timeout (in seconds) for receiving the E-mails. 
  • RETRY INTERVAL. The number of seconds to wait before retrying in case of failure.

Send E-mail has properties, which include the above parameters and a set of properties for any shape: 

Send Email Properties dialog
You can give a Name to your Send Email object. It is used to construct the result status variable names.
If the Name is not empty, the name_STATUS_CODEname_CHANNEL STATUS_CODEname_STATUS_MESSAGE{_} variables are created, and can be used in other expressions. See the following table for more details:

Variable

Possible Values and their Description

name_STATUS_CODE

0 (Success)
-1 (Connection/initialization error)
-2 (Send error)
-3 (Receive timeout)
-4 (Reply read error)

name_CHANNEL_STATUS_CODE

If name_STATUS_CODE is not 0, this variable will contain a channel specific status code.

name_STATUS_MESSAGE

Contains the status message.

Status

The Status element is a tool used to create information messages in Message Center Console. It is especially useful when you are debugging a solution (this shape in fact returns the value of the node specified at a moment of processing).
Please drag and drop the Status element to the working area to use it. Then fill in the Status expression in the dialog window after double clicking "STATUS" in the element inside the working area. Properties like Comment, Execute On, Content Type, Scope, Element Type, XML Path, Concatenate, Rows To Include, Condition To Include – can be filled in the "Properties" window in the box on the right.

Status element

Variable

Use the Variable element to create a variable.
It has a value (which can be taken, for example, from the Source or can be specified as an expression manually by double-clicking the Variable element). You can also edit the attributes in the "Properties" window at the right.
The Variable element has an outgoing "result". The result can then be used in other elements. 

Example of Variable element

Warning

This shape displays a warning if its value has evaluated to True and the condition to run the Warning has evaluated to True as well.

Example of Use:
You can find a warning row that checks the length of the value of tag 10 in the figure below. It will show a warning if this length exceeds 15 symbols. This particular Warning will always be checking the length of :tag10:, because its condition is set to '1' – always True.

Example of Warning element
The value of a Warning can be edited by double-clicking the Warning object in the work area.

Write Data to File

Write Data to File allows to write data to a specified file.

Example of Write Data to File element
The "Settings" button allows to setup Timeout and Retry Interval for this shape: 

Edit Parameters dialog
The basic parameters for the Write Data to File shape are: 

  • DATA. Expression that contains the data to be written.
  • REMOTEFILENAME. It is the file name in which to place data. 
  • LOCALFILENAME. Parameter used to define the name of the local file to be written.

You can give a Name to your Write Data to File shape. It is used to construct the result status variable names.
If the Name is not empty, the name_STATUS_CODEname_CHANNEL STATUS_CODEname_STATUS_MESSAGE{_} variables are created, and can be used in other expressions. See the following table for more details:

Variable

Possible Values and their Description

name_STATUS_CODE

0 (Success)
-1 (Connection/initialization error)
-2 (Send error)
-3 (Receive timeout)
-4 (Reply read error)

name_CHANNEL_STATUS_CODE

If name_STATUS_CODE is not 0, this variable will contain a channel specific status code.

name_STATUS_MESSAGE

Contains the status message.

  • No labels