Skip to content

title: Quick start: your first interface description: "Build an interface that reads a delimited file, maps its fields and writes each record to a database through a stored procedure. You'll test it locally and deploy it to the server."


Quick start: your first interface

Build an interface that reads a delimited file, maps its fields and writes each record to a database through a stored procedure. You'll test it locally and deploy it to the server.

You will need

  • The i-Con Client installed and connected to IConDb
  • A sample CSV file and a SQL Server stored procedure that inserts one record
  • Access to an i-Con Server to deploy to

Build the interface

  1. Create the interface
    Select File → New (or New Project on the start screen). In the New Project dialog, enter an Interface Name, for example Inbound_Payment_Processor, and choose a Location. Use a dedicated folder for each project, because i-Con stores all the project's files there.
  2. Add the components
    From the Toolbox, drag these onto the canvas: a source: FileIn (File I/O group) a conversion: TextMapping a destination: SqlProcedure (Data group)
  3. Configure each component
    Select a component and fill in its properties in the Properties window. Set EndPoint to Source on the file reader, and set its incoming path, file filter and FieldSeparator. Set the field mapping for TextMapping, and the connection string and procedure name for SqlProcedure. Refer to fields with macros such as {Data(1)} (see Macro expressions).
  4. Put settings in the Common Store
    Select the project in the Solution tab, open CommonStore and add values such as paths and connection details as key=value lines. Use them in components as {key}, so you can change them in one place when you move to the server.
  5. Link the components
    Turn on Linking Mode (toolbar button, or Project → Link Components). Drag from FileIn to TextMapping, then from TextMapping to SqlProcedure. New links are Pass Through by default. Turn Linking Mode off when you're done.
  6. Handle errors
    Add an alerting component, such as an email (SMTP) component, and draw a link to it from each component that can fail. Select each of those links and set LinkType to Error.
  7. Set the starting component
    Select the project in the Solution tab and set InitialComponent to the file reader. The server can't start the interface without it.
  8. Test locally
    Select the file reader on the canvas, then press F5 (or Debug → Run). The run starts from the selected component, which must be a Source. Watch the Output window's Logging, Errors, Counters and store tabs, and check that the records arrive in the database. A component that fails turns red on the canvas.
  9. Deploy to the server
    Select Build → Upload to Server, enter the server name and select Upload. The upload becomes a new version of the interface.
  10. Start it
    In the Interface Manager, select the interface and select Start. Check that its heartbeat increases.

Next steps