Navigation:  IM Sequencer > Custom plugin development >

Custom step plugin

Previous pageReturn to chapter overviewNext page

This section describes how you need to develop a "step plugin"

 

To create a step plugin you will need to reference the file Traxion.IM.Scheduler.dll and implement the following interface:Traxion.IM.Scheduler.Plugins.ICustomStepPlugin. This interface has a few methods and properties that need to be implemented.
 

(Method) Start - This method is called when the Step needs to start it returns a "integer" this integer is the result code. 0 is ok, anything else is not ok
(Method) Stop - This method is called when the task is stopped manually or gracefully because a time limit has passed or the service is going to stop
(Property) Output - This property contains information that needs to be shared within for example the reports, this information can be used to indicate if the step ran ok
(Property) ErrorOutput - This property contains error information that needs to be shared within for example the reports, this information can be used to indicate if the step experienced errors
(Property) Description - This property is used to dynamically display the description for this step. This is shown within the user interface

 

Below is a example step plugin implementation:

 

using System;

using System.ComponentModel;

using System.ComponentModel.Design;

using System.Drawing.Design;

using Traxion.IM.Library.Logging;

using Traxion.IM.Scheduler.Plugins.Rules;

 

namespace Traxion.IM.Scheduler.Plugins.Custom

{

[CustomPluginClassAttribute(Name = "Custom step", Description = "Example custom step, always return '0'")]

public class CustomStepsExample : ICustomStepPlugin

{

  // Create a logger for use in this class

  private static readonly ApplicationLog log = ApplicationLogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);

 

  public int Start()

  {

    log.TraceFormat("Start this step and return 0");

    return 0;

  }

 

  public bool Stop()

  {

    return true;

  }

 

  [Browsable(false)]

  public string Output

  {

    get { return String.Format("Example setting is set to '{0}'", ExampleSetting); }

  }

 

  [Browsable(false)]

  public string ErrorOutput

  {

    get { return string.Empty; }

  }

 

  [Browsable(false)]

  public string Description

  {

    get { return string.Empty; }

  }

 

  [Category("General"), DisplayName("Example setting"), Description("This is the example description"), DefaultValue("localhost")]

  [RequiredRule]

  public string ExampleSetting { get; set; }

 

  [Category("General"), DisplayName("Text"), PropertyOrder(1), Description("Multiline test")]

  [Editor(typeof(MultilineStringEditor), typeof(UITypeEditor))]

  public string ScriptText { get; set; }

}

}

 
 

As you can see this step has a reference to the logging implementation.
 
When this step is started it always returns 0, indicating that there are no errors. The Output property will return the value for the ExampleSetting.

 

Below you can see the interface IM Sequencer generates for this plugin based on the attributes defined above each property

 


Page url: http://www.traxionsolutions.com/imsequencer/help/index.html?customstepdevelopment.htm