Business Process Life-Cycle

  • Review the BusinessProcess Life-Cycle - make the following changes:
public GetOrderStatistics()
{
    Debug.WriteLine("Constructor");
    From = Order_Details;
}
public void Run()
{
    Debug.WriteLine("Before the Execute");
    Execute();
    Debug.WriteLine("After the Execute");
} 
  • Add code for all the controller life cycle events (just copy)
protected override void OnLoad()
{
    Debug.WriteLine("\tOnLoad");
}
protected override void OnStart()
{
    Debug.WriteLine("\t\tOnStart");
}
protected override void OnEnterRow()
{
    Debug.WriteLine("\t\t\tOnEnterRow");
}
protected override void OnLeaveRow()
{
    Debug.WriteLine("\t\t\tOnLeaveRow");
}
protected override void OnSavingRow()
{
    Debug.WriteLine("\t\t\tOnSavingRow");
}
protected override void OnEnd()
{
    Debug.WriteLine("\t\tOnEnd");
}
protected override void OnUnLoad()
{
    Debug.WriteLine("\tOnUnLoad");
} 
  • Run the code and review the output in Visual Studio "Output" window
  • Change the OnEnterRow method to reflect the values of the OrderID and the ProductID
protected override void OnEnterRow()
{
    Debug.WriteLine("\t\t\tOnEnterRow Order:" + Order_Details.OrderID + " Product:" + Order_Details.ProductID);
} 
  • Run the code and review the output in Visual Studio "Output" window

Help us improve, Edit this page on GitHub
or email us at info@fireflymigration.com