Getting Started

Install Required Software

Create a Console Application

Create a console application called "MyProject" in Visual Studio or Xamarin Studio.

Add the InEngine.NET Package

Visual Studio

Run the following command in the Package Manager Console.

PM> Install-Package IntegrationEngine

Xamarin Studio

Navigate to ProjectAdd Packages, then search for "InEngine.NET" in the Add Packages GUI.

Initialize InEngine.NET

InEngine.NET requires a host application. It can be a console or service application. The following code snippet demonstrates how to instantiate and initialize InEngine.NET in a console app called MyProject. It also indicates to the instance of EngineHost that it should look in the the assembly containing class MainClass for integration jobs.

// Program.cs
using System;
using System.Reflection;

namespace MyProject
{
    class MainClass
    {
        public static void Main(string[] args)
        {
            (new EngineHost(typeof(MainClass).Assembly)).Initialize();
        }
    }
}

Add Configuration File

The configuration file should be called "IntegrationEngine.json" and its build action should be to "copy if newer."

Create an Integration Job

// MyIntegrationJob.cs
using IntegrationEngine.Core.IntegrationJob;

namespace MyProject
{
    public class MyIntegrationJob : IIntegrationJob
    {
        public override void Run()
        {
            // Do some work
        }
    }
}

Schedule a Job

Post an HTTP request to the IntegrationServer API's CronTrigger resource with a JobType of "MyProject.MyIntegrationJob" - the full name of the job.

curl --data "JobType=MyProject.MyIntegrationJob&CronExpressionString=0 4 1 ? * MON-FRI *" http://localhost:9001/api/CronTrigger