Connect Reader and Sender Configuration

IFS Connect allows you to develop your own Connect Readers and Senders, but before you install your newly developed connector you have to supply the necessary configuration.

Contents

Quick Guide

Short summary over the steps described below about how to create INS file with Meta definitions:

  1. Download the template file.
  2. Define instance type for your reader sender (call to Ins in first PL/SQL block).
  3. Define your reader or sender parameters (call to Ins in second PL/SQL block).

Overview

Configuration of Connect Readers and Senders can be managed using the the Setup IFS Connect feature in Solution Manager. Furthermore Connect Senders can make use of additional configuration defined on particular Routing Address. The entire configuration managed by Setup IFS Connect is loaded during the system startup and cached in the memory. Of course, the cache is replaced on any configuration changes.

Meta definitions

To be possible to create a node (an instance) in Setup IFS Connect corresponding to your custom Reader or Sender with all the necessary configuration parameters you have to create and execute an insert script with your Reader's or Sender's Meta definitions. First when Meta definitions are in place it will be possible to create a new instance of your Reader or Sender, either manually or by importing an existing configuration file.

Put the insert script to your components database directory, i.e. <component>/source/<component>/database naming it preferably ConnectConfigCustomDef.ins. You can collect definitions of your all custom Readers and Senders in the same script.

Load the template script from here and adapt it to your needs according to the description below:

--
-- Component: <component name>
--
-- File:      ConnectConfigCustomDef.ins
--
-- Purpose:   Install custom parameters in IFS Connect Config DEF tables
--
SET SERVEROUTPUT ON FORMAT WRAPPED
SET DEFINE OFF

DECLARE
   ctx_ Ins_Util_API.Ins_Context;

   PROCEDURE Init IS
   BEGIN
      Ins_Util_API.Set_Debug(FALSE, ctx_);
      Ins_Util_API.Modify_Existing_Rows(ctx_);
      Ins_Util_API.Set_Lu_Package('CONFIG_INSTANCE_TYPE_DEF_API', ctx_);
      Ins_Util_API.Set_Table('CONFIG_INSTANCE_TYPE_DEF', ctx_);
      Ins_Util_API.Add_Column('AREA_NAME'     , 'VARCHAR2' , ctx_);
      Ins_Util_API.Add_Column('GROUP_NAME'    , 'VARCHAR2' , ctx_);
      Ins_Util_API.Add_Column('INSTANCE_TYPE' , 'VARCHAR2' , ctx_);
      Ins_Util_API.Set_Primary_Key(Ins_Util_API.Pos_List(1, 2, 3), ctx_);
   END Init;

   PROCEDURE Ins (
      recreate$      IN BOOLEAN DEFAULT FALSE,
      area_name_     IN VARCHAR2,
      group_name_    IN VARCHAR2,
      instance_type_ IN VARCHAR2)
   IS
      values_ Ins_Util_API.Value_List;
   BEGIN
      values_(1) := area_name_;
      values_(2) := group_name_;
      values_(3) := instance_type_;
      Ins_Util_API.Ins_Row(values_, recreate$, ctx_);
   END Ins;

BEGIN
   Init;

   -- Definition of custom readers and senders
   Ins( area_name_ => 'Integration', group_name_ => 'ConnectorReaders', instance_type_ => 'Custom-<reader name>' );
   Ins( area_name_ => 'Integration', group_name_ => 'ConnectorSenders', instance_type_ => 'Custom-<sender name>' );

   Ins_Util_API.Summary(ctx_);
   Ins_Util_API.Close(ctx_);
EXCEPTION
   WHEN OTHERS THEN
      Ins_Util_API.Close(ctx_);
      RAISE;
END;
/


DECLARE
   ctx_ Ins_Util_API.Ins_Context;

   PROCEDURE Init IS
   BEGIN
      Ins_Util_API.Set_Debug(FALSE, ctx_);
      Ins_Util_API.Modify_Existing_Rows(ctx_);
      Ins_Util_API.Set_Lu_Package('CONFIG_PARAMETER_DEF_API', ctx_);
      Ins_Util_API.Set_Table('CONFIG_PARAMETER_DEF', ctx_);
      Ins_Util_API.Add_Column('AREA_NAME'       , 'VARCHAR2' , ctx_);
      Ins_Util_API.Add_Column('GROUP_NAME'      , 'VARCHAR2' , ctx_);
      Ins_Util_API.Add_Column('INSTANCE_TYPE'   , 'VARCHAR2' , ctx_);
      Ins_Util_API.Add_Column('PARAMETER_NAME'  , 'VARCHAR2' , ctx_);
      Ins_Util_API.Add_Column('DEFAULT_VALUE'   , 'VARCHAR2' , ctx_);
      Ins_Util_API.Add_Column('HELP_TEXT'       , 'VARCHAR2' , ctx_);
      Ins_Util_API.Add_Column('ORDINAL'         , 'NUMBER'   , ctx_);
      Ins_Util_API.Add_Column('PARAMETER_TYPE'  , 'VARCHAR2' , ctx_);
      Ins_Util_API.Add_Column('VALUE_LIST'      , 'VARCHAR2' , ctx_);
      Ins_Util_API.Add_Column('WRITE_PROTECTED' , 'NUMBER'   , ctx_);
      Ins_Util_API.Set_Primary_Key(Ins_Util_API.Pos_List(1, 2, 3, 4), ctx_);
   END Init;

   PROCEDURE Ins (
      recreate$        IN BOOLEAN DEFAULT FALSE,
      area_name_       IN VARCHAR2,
      group_name_      IN VARCHAR2,
      instance_type_   IN VARCHAR2,
      parameter_name_  IN VARCHAR2,
      default_value_   IN VARCHAR2,
      help_text_       IN VARCHAR2,
      ordinal_         IN VARCHAR2,
      parameter_type_  IN VARCHAR2,
      value_list_      IN VARCHAR2,
      write_protected_ IN VARCHAR2)
   IS
      values_ Ins_Util_API.Value_List;
   BEGIN
      values_(1) := area_name_;
      values_(2) := group_name_;
      values_(3) := instance_type_;
      values_(4) := parameter_name_;
      values_(5) := default_value_;
      values_(6) := help_text_;
      values_(7) := ordinal_;
      values_(8) := parameter_type_;
      values_(9) := value_list_;
      values_(10) := write_protected_;
      Ins_Util_API.Ins_Row(values_, recreate$, ctx_);
   END Ins;

BEGIN
   Init;

   -- Custom reader parameters
   Ins( area_name_ => 'Integration', group_name_ => 'ConnectorReaders', instance_type_ => 'Custom-<reader name>', parameter_name_ => 'FACTORY_CLASS'   , default_value_ => '<fully qualified class name>', help_text_ => 'Fully qualified class name', ordinal_ => '101' , parameter_type_ => 'TypeText', value_list_ => '', write_protected_ => '1' );
   Ins( area_name_ => 'Integration', group_name_ => 'ConnectorReaders', instance_type_ => 'Custom-<reader name>', parameter_name_ => '<PARAMETER_NAME>', default_value_ => ''                            , help_text_ => '<parameter's help text>'   , ordinal_ => '102' , parameter_type_ => 'TypeText', value_list_ => '', write_protected_ => ''  );

   -- Custom sender parameters
   Ins( area_name_ => 'Integration', group_name_ => 'ConnectorSenders', instance_type_ => 'Custom-<sender name>', parameter_name_ => 'FACTORY_CLASS'   , default_value_ => '<fully qualified class name>', help_text_ => 'Fully qualified class name', ordinal_ => '101' , parameter_type_ => 'TypeText', value_list_ => '', write_protected_ => '1' );
   Ins( area_name_ => 'Integration', group_name_ => 'ConnectorSenders', instance_type_ => 'Custom-<sender name>', parameter_name_ => '<PARAMETER_NAME>', default_value_ => ''                            , help_text_ => '<parameter's help text>'   , ordinal_ => '102' , parameter_type_ => 'TypeText', value_list_ => '', write_protected_ => ''  );

   Ins_Util_API.Summary(ctx_);
   Ins_Util_API.Close(ctx_);
EXCEPTION
   WHEN OTHERS THEN
      Ins_Util_API.Close(ctx_);
      RAISE;
END;
/

COMMIT
/

SET DEFINE &

The insert script defines two PL/SQL blocks that make use of PL/SQL package Ins_Util_API. The first block contains instance type definitions, while the other one definition of parameters for each instance type defined in the first block. Each call to the Ins method in the first block creates a Reader or Sender Instance Type definition. Each call to the Ins method in the second block creates a single configuration parameter.

Note: Do NOT make any other changes to the template file than described below. Add/modify only calls to the Ins method in respective PL/SQL block.

Note: Insert script with Meta definitions is executed in synchronous mode, which means you don't need to create any other scripts, like *.cdb, when you want to remove or modify definitions. Just make necessary modifications to this file.

The template file above defines, as an example, one Reader and one Sender with two parameters each. You can have arbitrary number of senders and readers in the same file. Just adapt the sections marked in blue to your needs according to the below:

 

Instance Type definition

For each Reader you have to have a definition (call to the Ins method) in the first PL/SQL block on form:

   Ins( area_name_ => 'Integration', group_name_ => 'ConnectorReaders', instance_type_ => '<your reader name>' );

where <your reader name> is the name of your Connect Reader always starting with "Custom-" and without any spaces, e.g. "Custom-ListFile".

Similarly each Sender is defined at the same place according to the following:

   Ins( area_name_ => 'Integration', group_name_ => 'ConnectorSenders', instance_type_ => '<your sender name>' );

where <your sender name> is the name of your Connect Sender always starting with "Custom-" and without any spaces, e.g. "Custom-File".

Note: Do not mix Reader/Sender name defined according to above with the instance name. The name we're referring to is shown as Instance Type in Setup IFS Connect:

 

Parameter definitions

Each Reader or Sender can have a number of parameters in Setup IFS Connect. Those are defined in the second PL/SQL block. Definition of a single parameter looks as follow:

   Ins( area_name_       => 'Integration' ,
        group_name_      => '<group name>' ,
        instance_type_   => '<your sender or reader name>' ,
        parameter_name_  => '<PARAMETER NAME>' ,
        default_value_   => '<default value>' ,
        help_text_       => '<help text>' ,
        ordinal_         => '<ordinal>' ,
        parameter_type_  => '<parameter type>' ,
        value_list_      => '<value list for enumeration>' ,
        write_protected_ => '<write protected>' );


where:

 

Your Custom Reader or Sender has to define at least one parameter of type TypeText with name FACTORY_CLASS. The parameter has to be read-only, i.e. with write_protected_ => '1'. It should be the first parameter of your Reader/Sender definition, i.e. with ordinal_ => '101'. Define fully qualified class name of your factory class as parameters default value, e.g. default_value_ => 'ifs.fndint.connectsender.MyConnectSenderFactory'.

Note also that all Readers and Senders share a number of common parameters. Those are handled by the framework and don't need to be defined explicitly for custom Readers or Senders. You can read more about those parameters in General Connector Parameters.