2.3. iWay Configuration (Generics) Editor

iWay Configurations Editor Overview

Integration often comes with a daunting task of managing configuration. The iWay Configurations Editor was created to promote reusability and reduce efforts in managing countless configuration properties throughout an application. So.. how do we do this? Simply put we wrap a set of commonly used properties into to what iWay calls an iWay Generic. Each created generic can then be referenced by one or more components. Changing a property in a generic means that all components who reference it will inherit that change after compilation occurs. Lets see how this works in action. 


The Test Drive

To get started we are going to need an Application Project. To learn more about Application Projects click here. We are going to assume we have an Application  Project  named "myproject" available. Open the Configurations folder and double click on the default "iway" configuration. This will launch the Configurations Editor as shown below.

Configuration Overview

The list of iWay Generics are grouped based on the iWay Flow Editor palette.

Opening the Connectors folder yields the following:

openconfigconnectors


Creating a Generic

Lets create our first generic. We are going to create a Blockchain generic.

Select Blockchain and right mouse click as shown below:

newblockchaingerneric

Select the "Add Blockchain Generic" menu item.

Since the Blockchain connector supports multiple types of generics a dialog box appears prompting for its type.

newblockchaingenericchoice


Select the Ethereum Configuration and click "OK". A Blockchain Ethereum generic is created as shown below.
 

dddd

Notice that there is a red box next to the newly created generic along with two errors reported in the problems view. If we review the errors we can observe that there are two missing required fields found within the Wallet grouping. Adding values for these fields and saving the configuration will make these errors disappear.


Generic Usage

Generics are used from within the iWay Flow Editor. Lets create a flow which utilizes the Blockchain generic we just created. Create a new flow and drag & drop the Blockchain connector from the palette to the canvas. Select the "Ethereum - call function" action from the Action drop down as shown below.

blockchainflow

You will notice that a "Configuration" selection is required for this action. Pulling the drop down next to the "Configuration" label reveals the generic we previously created. Selecting this generic will satisfy the connectors configuration requirement. 

blockchain select action

If it is preferred to create a new generic, users can click on the "+" button to the right of the drop down. That will launch a dialog as shown below to create a new generic.

newgenericfromflow


Clicking on "Finish" will create the new generic. When we inspect the drop down once again we see that "blockchain.2" has been added to the list of available generics.


2 generics


If we would go back to the configurations editor we can see that "blockchain.2" has been added under the Blockchain Connector.
 

2 blockchain generics