Gateway 6.17.3 User Guide Save PDF Selected topic Selected topic and subtopics All content Axway Gateway: Managing Events Working with Decision Rules (command line) peladm create_decisionrule peladm update_decisionrule peladm delete_decisionrule peldsp display_decisionrule peldsp select_decisionrule Creating a Decision Rule: peladm create_decisionrule Syntax peladm create_decisionrule [see parameters below] Description Use this command to create a new Decision Rule. Specify at least one condition for the Decision Rule. You can specify conditions in two ways: Use the parameter cond_arg (-ca) to list a set of conditions separated by the semi-colon character. Use the parameter -import_cond (-ic) to specify a file to import, that contains a list of conditions. Each line in the file contains an argument name, an operator and a value. Parameters name (-n) (Mandatory) Enter a unique name for the Decision Rule. type_of_decisionrules (-type) Enter one of the following Decision Rule types: XFER_CHANGE_STATE (default) TEMPORAL FILE_STORING XMS comments (-cts) Enter a free text description of the Decision Rule you are creating. execution_type (-et) The type of process to be triggered by a Decision Rule. Enter one of the following values: MODEL = the execution is defined by a Model. Specify the Model in the model (-ml) parameter below. AMTRIX = redirect the Transfer to AMTrix for processing PERL Refer to the readme in the following folder:On UNIX <Gateway installation directory>/run_time/scripts/perl/ On Windows <Gateway installation directory>\run_time\scripts\perl\ COMMAND = the execution type is a command line or script specified in the command_line parameter. Refer to Executing scripts as command lines from Decision Rules. TO_XMS NONE (default) LOG_CLEANING MAILBOX_CLEANING STAT_CLEANING XIB = redirect the Transfer to Integrator for processing. The payload file for a Transfer which was routed to Integrator is not deleted by the purge operation. For more information, refer to Purging for transfers routed from Gateway to Integrator. DEFAULT = route the transfer using a Model inside an Application. This option is only available via online commands. The option exists for reasons of compatibility with earlier product versions. link_transfers (-lt) Use this parameter if you enter the value MODEL for the execution_type parameter. Enter one of the following values: Y (default) = Yes - create a logical link between the incoming and the outgoing Transfers N = No - no link between the incoming and the outgoing Transfers model (-ml) If you entered the value MODEL or TO_XMS for the execution_type parameter, enter a Model name. purge_model (-pm) If you entered the value MAILBOX_CLEANING for the execution_type parameter, enter the name of an existing Purge Model to define the purge operation on the Mailbox. perl_script (-ps) If you entered the value PERL for the execution_type parameter, enter the Perl script name and access path. command_line (-cl) If you entered the value COMMAND for the execution_type parameter, enter the execution command line. The command line can include symbolic variables. Alternatively, you can enter the path and file name of a script to execute. Refer to Executing scripts as command lines from Decision Rules. cond_arg (-ca) Enter one or more conditional arguments in the format condition1;condition2 For example: cond "destination = FTPC; direction = I, protocol<>PHSE,FTP; appli = &(file_name)" prop_list_name (-pln) Only for JMS or Axway Messaging Enter a Property List name. xms_connector_out_name (-xcn) Use this parameter if you are creating an XMS-type Decision Rule. Enter an Axway Messaging connector name. import_cond (-ic) Enter the name of the file that contains the execution conditions. Usage rules Execution type parameters: If you set execution_type to: COMMAND, then enter a value for the command_line parameter. You can enter a command or the path and file name of a script. Refer to Executing scripts as command lines from Decision Rules. MODEL, then enter a value for the model parameter. PERL, then enter a value for the perl_script parameter. Example 1 The following example creates a Decision Rule to handle incoming files from the FTP client FTPC. peladm create_decisionrule -name TABFTP -type XFER_CHANGE_STATE -execution_type Model -ml MODELFTP -cond_arg "destination = FTPC; direction = I" -protocol<>PHSE,FTP; appli = &(file_name)" Gateway checks the following conditions: Destination = FTPC Direction = Input Protocol = either PeSIT HS E or FTP Application = file name of the current Transfer If all conditions correspond to the current Transfer parameters, Gateway submits a new Transfer Request and applies the Model MODELFTP. This Model contains the parameters required to route the Transfer. Example 2 The following example creates a Decision Rule for routing to a PeSIT client: peladm create_decisionrule -name TABPHSE -type XFER_CHANGE_STATE -execution_type DEFAULT -cond_arg "destination = *PHSE; rec_len>=1200; originator #FTPC" Gateway checks the following conditions: Destination = *PHSE (a destination Site whose name ends with PHSE) Record length = greater than or equal to 1200 Originator = any originator Site that is not FTPC If all the conditions correspond to the current Transfer parameters, Gateway submits a new Transfer Request by using the execution type DEFAULT. Updating Decision Rules: peladm update_decisionrule Syntax peladm update_decisionrule [see parameters below] Description Use this command to modify an existing Decision Rule. You can: Add a new condition to a Decision Rule Modify an existing condition Delete an existing condition Modify the name of the condition import file Modify the rule type Link or un-link Transfers incoming and outgoing Transfers Modify the routing behavior for this Rule Modify the Model referenced in this Rule Modify the Perl script referenced in this Rule Modify the command line referenced in this Rule Parameters name (-n) (Mandatory) Enter a unique name for the Decision Rule. type_of_decisionrules (-type) Enter one of the following Decision Rule types: XFER_CHANGE_STATE (default) TEMPORAL FILE_STORING XMS comments (-cts) Edit the free text description of the Decision Rule. execution_type (-et) The type of process to be triggered by a Decision Rule. Enter one of the following values: MODEL = the execution is defined by a Model. Specify the Model in the model (-ml) parameter below. AMTRIX = redirect the Transfer to AMTrix for processing PERL COMMAND = the execution type is a command line or script specified in the command_line parameter. Refer to Executing scripts as command lines from Decision Rules. TO_XMS NONE (default) LOG_CLEANING MAILBOX_CLEANING STAT_CLEANING XIB = redirect the Transfer to Integrator for processing. The payload file for a Transfer which was routed to Integrator is not deleted by the purge operation. For more information, refer to Purging for transfers routed from Gateway to Integrator. DEFAULT = route the transfer using a Model inside an Application. This option is only available via online commands. The option exists for reasons of compatibility with earlier product versions. link_transfers (-lt) Use this parameter if you enter the value MODEL for the execution_type parameter. Enter one of the following values: Y (default) = Yes - create a logical link between the incoming and the outgoing Transfers N = No - no link between the incoming and the outgoing Transfers model (-ml) If you entered the value MODEL or TO_XMS for the execution_type parameter, enter a Model name. purge_model (-pm) If you entered the value MAILBOX_CLEANING for the execution_type parameter, enter the name of an existing Purge Model to define the purge operation on the Mailbox. perl_script (-ps) If you entered the value PERL for the execution_type parameter, enter the Perl script name and access path. command_line (-cl) If you entered the value COMMAND for the execution_type parameter, enter the execution command line. prop_list_name (-pln) Only for JMS or Axway Messaging Enter a Property List name. xms_connector_out_name (-xcn) Use this parameter if you are creating an XMS-type Decision Rule. Enter an Axway Messaging connector name. add_cond (-a) Add one or more conditions. update_cond (-u) Update on or more existing conditions. delete_cond (-d) Specify a condition to delete. import_cond (-ic) Specify a file the file to import that contains the execution conditions. Usage rules Execution type parameters: If you set execution_type to: COMMAND, then enter a value for the command_line parameter. MODEL, then enter a value for the model parameter. PERL, then enter a value for the perl_script parameter. Syntax Examples Adding a condition: peladm update_decisionrule {-name <Decision rule name>} [-add_cond ['"'argument_name operator value'"';';']*] Modifying a condition: peladm update_decisionrule {-name <Decision rule name>} [-update_cond ['"'argument_name operator value'"'';']*] Deleting a condition: peladm update_decisionrule {-name <Decision rule name>} [-update_cond ['"'argument_name operator value'"'';']*] Modifying routing behavior: peladm update_decisionrule {-name <Decision rule name>} [-execution_type { MODEL | AMTRIX | PERL | COMMAND | TO_XMS | DEFAULT | NONE | LOG_CLEANING | MAILBOX_CLEANING | STAT_CLEANING | XIB }] Modifying the Model: peladm update_decisionrule {-name <Decision rule name>} [-model model name] Modifying the Perl script: peladm update_decisionrule {-name <Decision rule name>} [-perl_script script access path] Modifying the online command: peladm update_decisionrule {-name <Decision rule name>} [-command_line online command] Example The following example updates the Decision Rule MyRule and sets the processing type to use the Model MyModel: peladm update_decisionrule -name MyRule -execution_type Model -model MyModel Deleting a Decision Rule: peladm delete_decisionrule Syntax peladm delete_decisionrule [-name] [-type_of_decisionrules] Description Use this command to delete an existing Decision Rule. Repeat the command for each Decision Rule you want to delete. Parameters -name (-n) Enter the name of the Decision Rule you want to delete. -type_of_decisionrules (-type) Enter the type of Decision Rule you want to delete. Enter one of the following values: XFER_CHANGE_STATE TEMPORAL FILE_STORING XMS Notes If the peladm delete_decisionrule command produces an error with a message like this: The decision rule that wants to be deleted (peladm delete_decisionrule -n MY_DECISION_RULE -type MY_TYPE) is linked to a Rule Table (MY_RULETABLE), therefore it cannot be deleted. In this case, the solution is to first unlink the decision rule from the MY_RULETABLE table: peladm update_ruletable -n MY_RULETABLE -type MY_TYPE -d MY_DECISION_RULE Example Enter the command: peladm delete_decisionrule -n MyDecisionRule Gateway deletes the Decision Rule with the name MyDecisionRule. Displaying Decision Rule properties: peldsp display_decisionrule Syntax peldsp display_decisionrule [-name] [-type_of_decisionrules] Description Use this command to display the properties of a specified Decision Rule. Parameters -name (-n): Enter the name of the Decision Rule whose properties you want to display -type_of_decision_rules (-t): Enter the type of Decision Rule whose properties you want to display. Enter one of the following values: XFER_CHANGE_STATE TEMPORAL FILE_STORING XMS Example Enter the command: peldsp display_decisionrule -n MyDecisionRule Gateway returns the properties of the Decision Rule with the name MyDecisionRule: rd_name MyDecisionRule rd_type 'XFER_CHANGE_STATE' rd_comments "" rd_execution_type = MODEL rd_link_transfers = Y rd_perl_script = rd_cond_1 = protocol<> FTP, PHSE Displaying all Decision Rule names: peldsp select_decisionrule Syntax peldsp select_decisionrule Description Use this command to display the names of all Decision Rules. Parameters Enter the command with no parameters to display the names of all Decision Rules. To list Decision Rules according to a given parameter, enter the command followed by the parameter, for example -name or -type TEMPORAL. Example Enter the command: peldsp select_decisionrule Gateway returns the names of all Decision Rules existing on the server. Related topics Decision Rules and Rule Tables: Parameters List Command syntax for Scheduling Event Models (date syntax) Links to documentation set for Axway Gateway 6.17.3: Installation -- User -- Unix Configuration -- Upgrade -- Interoperability -- Security, requires login -- Release Notes Related Links
Axway Gateway: Managing Events Working with Decision Rules (command line) peladm create_decisionrule peladm update_decisionrule peladm delete_decisionrule peldsp display_decisionrule peldsp select_decisionrule Creating a Decision Rule: peladm create_decisionrule Syntax peladm create_decisionrule [see parameters below] Description Use this command to create a new Decision Rule. Specify at least one condition for the Decision Rule. You can specify conditions in two ways: Use the parameter cond_arg (-ca) to list a set of conditions separated by the semi-colon character. Use the parameter -import_cond (-ic) to specify a file to import, that contains a list of conditions. Each line in the file contains an argument name, an operator and a value. Parameters name (-n) (Mandatory) Enter a unique name for the Decision Rule. type_of_decisionrules (-type) Enter one of the following Decision Rule types: XFER_CHANGE_STATE (default) TEMPORAL FILE_STORING XMS comments (-cts) Enter a free text description of the Decision Rule you are creating. execution_type (-et) The type of process to be triggered by a Decision Rule. Enter one of the following values: MODEL = the execution is defined by a Model. Specify the Model in the model (-ml) parameter below. AMTRIX = redirect the Transfer to AMTrix for processing PERL Refer to the readme in the following folder:On UNIX <Gateway installation directory>/run_time/scripts/perl/ On Windows <Gateway installation directory>\run_time\scripts\perl\ COMMAND = the execution type is a command line or script specified in the command_line parameter. Refer to Executing scripts as command lines from Decision Rules. TO_XMS NONE (default) LOG_CLEANING MAILBOX_CLEANING STAT_CLEANING XIB = redirect the Transfer to Integrator for processing. The payload file for a Transfer which was routed to Integrator is not deleted by the purge operation. For more information, refer to Purging for transfers routed from Gateway to Integrator. DEFAULT = route the transfer using a Model inside an Application. This option is only available via online commands. The option exists for reasons of compatibility with earlier product versions. link_transfers (-lt) Use this parameter if you enter the value MODEL for the execution_type parameter. Enter one of the following values: Y (default) = Yes - create a logical link between the incoming and the outgoing Transfers N = No - no link between the incoming and the outgoing Transfers model (-ml) If you entered the value MODEL or TO_XMS for the execution_type parameter, enter a Model name. purge_model (-pm) If you entered the value MAILBOX_CLEANING for the execution_type parameter, enter the name of an existing Purge Model to define the purge operation on the Mailbox. perl_script (-ps) If you entered the value PERL for the execution_type parameter, enter the Perl script name and access path. command_line (-cl) If you entered the value COMMAND for the execution_type parameter, enter the execution command line. The command line can include symbolic variables. Alternatively, you can enter the path and file name of a script to execute. Refer to Executing scripts as command lines from Decision Rules. cond_arg (-ca) Enter one or more conditional arguments in the format condition1;condition2 For example: cond "destination = FTPC; direction = I, protocol<>PHSE,FTP; appli = &(file_name)" prop_list_name (-pln) Only for JMS or Axway Messaging Enter a Property List name. xms_connector_out_name (-xcn) Use this parameter if you are creating an XMS-type Decision Rule. Enter an Axway Messaging connector name. import_cond (-ic) Enter the name of the file that contains the execution conditions. Usage rules Execution type parameters: If you set execution_type to: COMMAND, then enter a value for the command_line parameter. You can enter a command or the path and file name of a script. Refer to Executing scripts as command lines from Decision Rules. MODEL, then enter a value for the model parameter. PERL, then enter a value for the perl_script parameter. Example 1 The following example creates a Decision Rule to handle incoming files from the FTP client FTPC. peladm create_decisionrule -name TABFTP -type XFER_CHANGE_STATE -execution_type Model -ml MODELFTP -cond_arg "destination = FTPC; direction = I" -protocol<>PHSE,FTP; appli = &(file_name)" Gateway checks the following conditions: Destination = FTPC Direction = Input Protocol = either PeSIT HS E or FTP Application = file name of the current Transfer If all conditions correspond to the current Transfer parameters, Gateway submits a new Transfer Request and applies the Model MODELFTP. This Model contains the parameters required to route the Transfer. Example 2 The following example creates a Decision Rule for routing to a PeSIT client: peladm create_decisionrule -name TABPHSE -type XFER_CHANGE_STATE -execution_type DEFAULT -cond_arg "destination = *PHSE; rec_len>=1200; originator #FTPC" Gateway checks the following conditions: Destination = *PHSE (a destination Site whose name ends with PHSE) Record length = greater than or equal to 1200 Originator = any originator Site that is not FTPC If all the conditions correspond to the current Transfer parameters, Gateway submits a new Transfer Request by using the execution type DEFAULT. Updating Decision Rules: peladm update_decisionrule Syntax peladm update_decisionrule [see parameters below] Description Use this command to modify an existing Decision Rule. You can: Add a new condition to a Decision Rule Modify an existing condition Delete an existing condition Modify the name of the condition import file Modify the rule type Link or un-link Transfers incoming and outgoing Transfers Modify the routing behavior for this Rule Modify the Model referenced in this Rule Modify the Perl script referenced in this Rule Modify the command line referenced in this Rule Parameters name (-n) (Mandatory) Enter a unique name for the Decision Rule. type_of_decisionrules (-type) Enter one of the following Decision Rule types: XFER_CHANGE_STATE (default) TEMPORAL FILE_STORING XMS comments (-cts) Edit the free text description of the Decision Rule. execution_type (-et) The type of process to be triggered by a Decision Rule. Enter one of the following values: MODEL = the execution is defined by a Model. Specify the Model in the model (-ml) parameter below. AMTRIX = redirect the Transfer to AMTrix for processing PERL COMMAND = the execution type is a command line or script specified in the command_line parameter. Refer to Executing scripts as command lines from Decision Rules. TO_XMS NONE (default) LOG_CLEANING MAILBOX_CLEANING STAT_CLEANING XIB = redirect the Transfer to Integrator for processing. The payload file for a Transfer which was routed to Integrator is not deleted by the purge operation. For more information, refer to Purging for transfers routed from Gateway to Integrator. DEFAULT = route the transfer using a Model inside an Application. This option is only available via online commands. The option exists for reasons of compatibility with earlier product versions. link_transfers (-lt) Use this parameter if you enter the value MODEL for the execution_type parameter. Enter one of the following values: Y (default) = Yes - create a logical link between the incoming and the outgoing Transfers N = No - no link between the incoming and the outgoing Transfers model (-ml) If you entered the value MODEL or TO_XMS for the execution_type parameter, enter a Model name. purge_model (-pm) If you entered the value MAILBOX_CLEANING for the execution_type parameter, enter the name of an existing Purge Model to define the purge operation on the Mailbox. perl_script (-ps) If you entered the value PERL for the execution_type parameter, enter the Perl script name and access path. command_line (-cl) If you entered the value COMMAND for the execution_type parameter, enter the execution command line. prop_list_name (-pln) Only for JMS or Axway Messaging Enter a Property List name. xms_connector_out_name (-xcn) Use this parameter if you are creating an XMS-type Decision Rule. Enter an Axway Messaging connector name. add_cond (-a) Add one or more conditions. update_cond (-u) Update on or more existing conditions. delete_cond (-d) Specify a condition to delete. import_cond (-ic) Specify a file the file to import that contains the execution conditions. Usage rules Execution type parameters: If you set execution_type to: COMMAND, then enter a value for the command_line parameter. MODEL, then enter a value for the model parameter. PERL, then enter a value for the perl_script parameter. Syntax Examples Adding a condition: peladm update_decisionrule {-name <Decision rule name>} [-add_cond ['"'argument_name operator value'"';';']*] Modifying a condition: peladm update_decisionrule {-name <Decision rule name>} [-update_cond ['"'argument_name operator value'"'';']*] Deleting a condition: peladm update_decisionrule {-name <Decision rule name>} [-update_cond ['"'argument_name operator value'"'';']*] Modifying routing behavior: peladm update_decisionrule {-name <Decision rule name>} [-execution_type { MODEL | AMTRIX | PERL | COMMAND | TO_XMS | DEFAULT | NONE | LOG_CLEANING | MAILBOX_CLEANING | STAT_CLEANING | XIB }] Modifying the Model: peladm update_decisionrule {-name <Decision rule name>} [-model model name] Modifying the Perl script: peladm update_decisionrule {-name <Decision rule name>} [-perl_script script access path] Modifying the online command: peladm update_decisionrule {-name <Decision rule name>} [-command_line online command] Example The following example updates the Decision Rule MyRule and sets the processing type to use the Model MyModel: peladm update_decisionrule -name MyRule -execution_type Model -model MyModel Deleting a Decision Rule: peladm delete_decisionrule Syntax peladm delete_decisionrule [-name] [-type_of_decisionrules] Description Use this command to delete an existing Decision Rule. Repeat the command for each Decision Rule you want to delete. Parameters -name (-n) Enter the name of the Decision Rule you want to delete. -type_of_decisionrules (-type) Enter the type of Decision Rule you want to delete. Enter one of the following values: XFER_CHANGE_STATE TEMPORAL FILE_STORING XMS Notes If the peladm delete_decisionrule command produces an error with a message like this: The decision rule that wants to be deleted (peladm delete_decisionrule -n MY_DECISION_RULE -type MY_TYPE) is linked to a Rule Table (MY_RULETABLE), therefore it cannot be deleted. In this case, the solution is to first unlink the decision rule from the MY_RULETABLE table: peladm update_ruletable -n MY_RULETABLE -type MY_TYPE -d MY_DECISION_RULE Example Enter the command: peladm delete_decisionrule -n MyDecisionRule Gateway deletes the Decision Rule with the name MyDecisionRule. Displaying Decision Rule properties: peldsp display_decisionrule Syntax peldsp display_decisionrule [-name] [-type_of_decisionrules] Description Use this command to display the properties of a specified Decision Rule. Parameters -name (-n): Enter the name of the Decision Rule whose properties you want to display -type_of_decision_rules (-t): Enter the type of Decision Rule whose properties you want to display. Enter one of the following values: XFER_CHANGE_STATE TEMPORAL FILE_STORING XMS Example Enter the command: peldsp display_decisionrule -n MyDecisionRule Gateway returns the properties of the Decision Rule with the name MyDecisionRule: rd_name MyDecisionRule rd_type 'XFER_CHANGE_STATE' rd_comments "" rd_execution_type = MODEL rd_link_transfers = Y rd_perl_script = rd_cond_1 = protocol<> FTP, PHSE Displaying all Decision Rule names: peldsp select_decisionrule Syntax peldsp select_decisionrule Description Use this command to display the names of all Decision Rules. Parameters Enter the command with no parameters to display the names of all Decision Rules. To list Decision Rules according to a given parameter, enter the command followed by the parameter, for example -name or -type TEMPORAL. Example Enter the command: peldsp select_decisionrule Gateway returns the names of all Decision Rules existing on the server. Related topics Decision Rules and Rule Tables: Parameters List Command syntax for Scheduling Event Models (date syntax) Links to documentation set for Axway Gateway 6.17.3: Installation -- User -- Unix Configuration -- Upgrade -- Interoperability -- Security, requires login -- Release Notes