MSG_SEND

LANSA Composer

MSG_SEND

This Activity will send a file through a supported message brokering system such as IBM MQ Series. Refer to 2.3.9 Messaging Configuration for further information on this Activity and the pre-requisites for using it.

The MSGCONFIG parameter specifies the name of a messaging configuration that identifies, amongst other things, the address of and credentials for the messaging system and queue to which the message is to be sent.

There are different ways to specify what file or files to send. Which way to choose depends entirely on your requirements.

 

MSGFILENAME

MSGFOLDER

MSGFILEEXTENSION

Send a file located in a folder

Unqualified File name

Fully qualified folder name

N/A

Send a file located in a folder

Fully qualified file name

Blank

N/A

Send all files in a folder

Blank

Fully qualified folder name

Use default *.*

Send all files in a folder with extension gif

Blank

Fully qualified folder name

Gif

 

 

Note: the MSGFOLDER and MSGFILENAME parameters in this activity override the Send folder and Send file name in the messaging configuration. If they rarely change you can specify them at the configuration level and leave the MSGFOLDER and MSGFILENAME parameters blank.

INPUT Parameters:

MSGCONFIG : Required

This parameter must contain the name of a messaging configuration. This configuration can be created and maintained using the Messaging Configurations option in the LANSA Composer client software. Amongst other things, the messaging configuration specifies the address, queue name and security credentials to be used with the message broker system. If this parameter is not provided or is not found or is Inactive, this Activity will return an error and processing will be abandoned.

MSGTYPE : Optional

Set the MSGTYPE to *BINARY to send the file contents as a binary bytes. Set the MSGTYPE to *TEXT to send the file contents as a text message.The default value is *BINARY.

ENCODING: Optional

Used when the MSGTYPE is set to *TEXT, the value of this parameter is used to convert the file content into a Unicode string that will be sent as the text message. The default value is UTF-8.

MSGFOLDER: Optional

Use in conjunction with the MSGFILENAME or MSGFILEEXTENSION parameters. It must contain the fully qualified path to the folder containing the file or files to send.

Use the appropriate format depending on the operating system. For example:

Windows  <drive>:\mydir\

IBM i     /mydir/subdir/

MSGFILENAME: Optional

Use in conjunction with the MSGFOLDER parameter or the Send folder specified in the messaging configuration.

When specifying the folder, MSGFILENAME must contain the name of a file found in that folder.

When the folder is not specified, MSGFILENAME must contain a fully qualified file name.

Use the appropriate format depending on the operating system. For example:

Windows  <drive>:\mydir\file1.txt

IBM i     /mydir/subdir/filex.xml

MSGFILEEXTENSION: Optional

This parameter can specify a file extension filter used to select files to be sent from the folder specified in the MSGFOLDER parameter or in the messaging configuration. The filtering is done without regard to the case of the filter value or file extension. For example, you might specify a value of 'XML' for this parameter to select all files with an XML file extension. This parameter is ignored if a file name is specified in the MSGFILENAME parameter.

PTYFILENAME: Optional

This parameter may specify the name of a file containing message properties that are to be merged with any specified in the messaging configuration and sent with the message(s).

If the Message Properties Send file path is specified in the messaging configuration, this parameter (if used) must specify the name of a file found in that folder.

If the Message Properties Send file path is NOT specified in the messaging configuration, this parameter (if used) must have the fully qualified file name.

Refer to 2.3.9 Messaging Configuration for information on the expected format of the message properties comma-separated file.

OUTPUT Parameters:

MESSAGEID:

The message IDs of the sent message(s) returned by the message broker system.

If the parameter values used result in more than one file/message being sent, then this outbound parameter contains a list of the message ids for each message sent.