Use intrinsic symbolic variables in Connect:Direct processes that are called by Managed File Transfer
We can call a user-defined Connect:Direct process from a Managed File Transfer transfer and pass in information from the transfer to the Connect:Direct process by using intrinsic symbolic variables in the process definition.
About this task
This example uses intrinsic symbolic variables to pass information from a Managed File Transfer transfer in to a user-defined Connect:Direct process. For more information about intrinsic symbolic variables used by Managed File Transfer, see Substitution variables for use with user-defined Connect:Direct processes.In this example, the file is transferred from a Managed File Transfer Agent to a Connect:Direct bridge node. The first part of the transfer is performed by Managed File Transfer. The second part of the transfer is performed by a user-defined Connect:Direct process.
Procedure
- Create a Connect:Direct process that uses intrinsic symbolic variables.
%FTEPNAME PROCESS SNODE=%FTESNODE PNODEID=(%FTEPUSER,%FTEPPASS) SNODEID=(%FTESUSER,%FTESPASS) COPY001 COPY FROM ( FILE=%FTEFFILE DISP=%FTEFDISP ) TO ( FILE=%FTETFILE DISP=%FTETDISP ) PEND- Save this process to a text file at the following location: MQ_DATA_PATH/mqft/config/coordination_queue_manager/agents/cd_bridge_agent/Example.cdp
- Edit the ConnectDirectProcessDefinition.xml file to include a rule that calls the Connect:Direct process that you created in Step 1.
<?xml version="1.0" encoding="UTF-8"?> <tns:cdprocess xmlns:tns="http://wmqfte.ibm.com/ConnectDirectProcessDefinitions" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://wmqfte.ibm.com/ ConnectDirectProcessDefinitions ConnectDirectProcessDefinitions.xsd"> <tns:processSet> <tns:condition> <tns:match variable="%FTESNODE" value="TOBERMORY" pattern="wildcard" /> </tns:condition> <tns:process> <tns:transfer process="Example.cdp" /> </tns:process> </tns:processSet> </tns:cdprocess>In this example, if a transfer request is submitted to the Connect:Direct bridge agent that has TOBERMORY as its source or destination Connect:Direct node, the Example.cdp Connect:Direct process is called.
- Submit a file transfer request that satisfies the conditions that you defined in the ConnectDirectProcessDefinition.xml file in Step 3. For example,
fteCreateTransfer -sa ORINOCO -da CD_BRIDGE -sm QM_WIMBLEDON -dm QM_COMMON -de overwrite -df TOBERMORY:/home/bulgaria/destination.txt -sd leave c:\bungo\source.txtIn this example, the destination Connect:Direct node is TOBERMORY. This node is the secondary node in the transfer and the value of %FTESNODE is set to TOBERMORY. This command matches the condition that is set in the ConnectDirectProcessDefinition.xml file.
- Managed File Transfer transfers the source file to a temporary location on the same system as the Connect:Direct bridge agent.
- The Connect:Direct bridge agent sets the values of the intrinsic symbolic variables from the information in the transfer request and configuration information. The intrinsic symbolic variables are set to the following values:
- %FTEPNAME=process_name - This value is an 8 character process name generated by the Connect:Direct bridge agent.
- %FTESNODE=TOBERMORY - This value is set from the -df parameter of the fteCreateTransfer command.
- %FTEPUSER,=primary_node_user - This information is taken from the ConnectDirectCredentials.xml file.
- %FTEPPASS=primary_node_user_password - This information is taken from the ConnectDirectCredentials.xml file.
- %FTESUSER,=secondary_node_user - This information is taken from the ConnectDirectCredentials.xml file.
- %FTESPASS=secondary_node_user_password - This information is taken from the ConnectDirectCredentials.xml file.
- %FTEFFILE =temporary_location - This value is the temporary location of the file on the same system as the Connect:Direct bridge agent.
- %FTEFDISP=leave - This value is set from the -sd parameter of the fteCreateTransfer command.
- %FTETFILE=/home/bulgaria/destination.txt - This value is set from the -df parameter of the fteCreateTransfer command.
- %FTETDISP=overwrite - This value is set from the -de parameter of the fteCreateTransfer command.
- The Connect:Direct process is started on the Connect:Direct bridge node. Connect:Direct transfers the file from the temporary location on the Connect:Direct bridge system to the destination /home/bulgaria/destination.txt on the system where the Connect:Direct node TOBERMORY is running.
Parent topic: Submitting a user-defined Connect:Direct process from a file transfer request
Related concepts
Related information