|
Navigation: IM Sequencer > Custom plugin development > Custom step plugin |
![]() ![]()
|
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 Traxion.IM.Scheduler.Plugins;
using Traxion.IM.Library.Logging;
namespace Traxion.IM.Scheduler.Steps.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;
}
public string Output
{
get { return String.Format("Example setting is set to '{0}'", ExampleSetting); }
}
public string ErrorOutput
{
get { return string.Empty; }
}
public string Description
{
get { return string.Empty; }
}
[CustomPluginAttribute(Name = "Example setting", Description = "This is an example setting", Required = true, DefaultValue = "example", Secure = false)]
public string ExampleSetting { 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.
Page url: http://www.traxionsolutions.com/imsequencer/help/index.html?customstepdevelopment.htm