Platform Framework
R24 AMR | Min(s) read

Syntax

This section shows the CALLJEE function syntax and the arguments that are passed during its execution.

RET.VAL = CALLJEE (jmsDestination, Message)

The table below lists the error codes:

Code Description

0

Action completed successfully

1

Communication error, this connection is no longer valid

2

Transaction error, the transaction is no longer valid

101

Connect error, host not valid

102

Connect error, port not valid

You need to use CALLJEE only in app server mode and it takes two arguments – jmsDestination and Message. Ensure that you use CALLJEE statement within a global transaction. TAFJ returns 0 on successful processing and 1 on failure.

jmsDestination

If jmsDestination is null or specified as T24MONITOR, then TAFJ will consider the destination as java:comp/env/jms/tecEventsTopic. jmsDestination can have one, two or three variables separated by @VM.

  • Variable_1 – It is a destination queue and can be a physical or logical name. Logical name requires resource definition at EJB level. It cannot be null unless jmsDestination itself is a null value.
  • Variable_2 – It is a connection factory and an optional variable. It has to be specified when the destination queue is not local and can be a physical or logical name. Logical name requires resource definition at EJB level. You can also use XA connection factory.
  • Variable_3 – It is a reply queue and an optional variable. It can be a physical or logical name. Logical name requires resource definition at EJB level.

Message

A Message length should be greater than zero and cannot be null. There are two types of messages:

  • Complex message: When the message is a Dynarray with more than 10 fields (separated by @FM), messages are extracted from position 11 and above, as the first 10 attributes of the message are header properties.
  • Simple message: If the message is not a Dynarray, a single message is sent without any modification.

Complex messages are processed in three modes:

  • SYNC mode – Messages are sent from Destination queue and responses are received in Reply queue. Reply queue must be defined.
  • ASYNC mode – Messages are sent from Destination queue and no responses are received.
  • RECEIVE mode – No messages are sent; only responses are received in Destination queue.
    Messages from Background runner and execute servlet do not have correlation ID and are not persistent.

Some of the valid CALLJEE statements are,

Simple message:

ACTIVATION = "PRICE"                //JMS Destination

ADDINFO = "PART.NUMBER=MC3815-3"    //Message

ERR.CODE = CALLJEE(ACTIVATION, ADDINFO)

Complex message:

DESTINATION= "queue/t24OFSQueue@VMConnectionFactory"

DESTINATION1 = "queue/t24OFSQueue"

DESTINATION2 = " @VMConnectionFactory@ queue/t24OFSQueue"

MESSAGE= ”TEXTMESSAGE@FM@FM@FM@FM@FMqueue/t24OFSQueueGuarded@VM20000@FM@FM@FM@FM@FMENQUIRY.SELECT,,INPUTT/123456,%CURRENCY@VMtestCALLJEE_GUARDED_1@FMENQUIRY.SELECT,,INPUTT/654321,%CURRENCY@VMtestCALLJEE_GUARDED_2”

INVALID_MESSAGE = null

Valid CALLJEE statements:

  • CALLJEE(null, Message)            //Publish message as TEC event
  • CALLJEE(“T24MONITOR”, Message)    //Publish message as TEC event
  • CALLJEE(DESTINATION, Message)
  • CALLJEE(DESTINATION1, Message)

Invalid CALLJEE statements:

  • CALLJEE(null, INVALID_MESSAGE)            
  • CALLJEE(DESTINATION, INVALID_MESSAGE)
  • CALLJEE(DESTINATION1, INVALID_MESSAGE)
  • CALLJEE(DESTINATION2, MESSAGE)    //Destination queue is left as null

In this topic

Copyright © 2020- Temenos Headquarters SA

Published on :
Monday, May 27, 2024 5:03:21 PM IST