public abstract class SapSenderImpl extends SapSenderBase implements ISapSender
sender
that calls a SAP RFC-function.
N.B. If no requestFieldIndex or requestFieldName is specified, input is converted from xml;
If no replyFieldIndex or replyFieldName is specified, output is converted to xml.functionName
is empty, inputfieldname The value of the parameter is set to the (simple) input field, structurename/inputfieldname The value of the parameter is set to the named field of the named structureparamList
log
Constructor and Description |
---|
SapSenderImpl() |
Modifier and Type | Method and Description |
---|---|
void |
configure()
configure() is called once at startup of the framework in the configure method of the owner of this sender. |
com.sap.conn.jco.JCoFunction |
getFunction(SapSystemImpl sapSystem,
ParameterValueList pvl) |
SenderResult |
sendMessage(Message message,
PipeLineSession session)
Send a message to some destination (as configured in the Sender object).
|
void |
setFunctionName(String string)
Name of the RFC-function to be called in the SAP system
|
void |
setFunctionNameParam(String string)
Name of the parameter used to obtain the functionName from if the attribute
functionName is empty |
void |
setSynchronous(boolean b)
If
false , the sender operates in RR mode: the a reply is expected from SAP, and the sender does not participate in a transaction. |
addParameter, close, getDestination, getParameterList, getSystem, getTid, open, setLuwHandleSessionKey, setSapSystemNameParam
calculateStaticFieldIndices, closeFacade, findFieldIndex, functionCall2message, functionResult2message, getCorrelationIdFromField, getFunctionName, getFunctionTemplate, getFunctionTemplate, getLogPrefix, getPhysicalDestinationName, getSapSystem, getSapSystem, message2FunctionCall, message2FunctionResult, openFacade, setCorrelationIdFieldIndex, setCorrelationIdFieldName, setName, setParameters, setReplyFieldIndex, setReplyFieldName, setRequestFieldIndex, setRequestFieldName, setSapSystemName
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getRequestFieldName, setLuwHandleSessionKey, setSapSystemNameParam
consumesSessionVariable
close, isSynchronous, open, sendMessageOrThrow
getName, setName
getApplicationContext, getName
getConfigurationClassLoader
setApplicationContext
addParameter, getParameterList
setCorrelationIdFieldIndex, setCorrelationIdFieldName, setReplyFieldIndex, setReplyFieldName, setRequestFieldIndex, setRequestFieldName, setSapSystemName
getDomain, getPhysicalDestinationName
public void configure() throws ConfigurationException
ISender
configure()
is called once at startup of the framework in the configure method of the owner of this sender.
Purpose of this method is to check whether the static configuration of the sender is correct.
As much as possible class-instantiating should take place in the configure()
or open()
method, to improve performance.configure
in interface IConfigurable
configure
in interface ISender
configure
in class SapSenderBase
ConfigurationException
public com.sap.conn.jco.JCoFunction getFunction(SapSystemImpl sapSystem, ParameterValueList pvl) throws SapException
SapException
public SenderResult sendMessage(Message message, PipeLineSession session) throws SenderException, TimeoutException
ISender
configure()
method is called.
The following table shows the difference between synchronous and a-synchronous senders:
synchronous | a-synchronous | |
---|---|---|
ISender.isSynchronous() returns | true | false |
return value of sendMessage() is | the reply-message | the messageId of the message sent |
the correlationID specified with sendMessage() | may be ignored | is sent with the message |
a {link TimeOutException} | may be thrown if a timeout occurs waiting for a reply | should not be expected |
Multiple objects may try to call this method at the same time, from different threads.
Implementations of this method should therefore be thread-safe, or synchronized
.
sendMessage
in interface ISender
SenderException
TimeoutException
public void setSynchronous(boolean b)
SapSenderBase
false
, the sender operates in RR mode: the a reply is expected from SAP, and the sender does not participate in a transaction. When false
, the sender operates in FF mode: no reply is expected from SAP, and the sender joins the transaction, that must be present. The SAP transaction is committed right after the XA transaction is completed.setSynchronous
in interface ISapSender
setSynchronous
in class SapSenderBase
public void setFunctionName(String string)
setFunctionName
in interface ISapSender
public void setFunctionNameParam(String string)
functionName
is emptysetFunctionNameParam
in interface ISapSender
Copyright © 2023 Frank!Framework. All rights reserved.