Select version
v7.18 v7.16 v7.13 v7.12 v7.11 v7.9 v7.8 v7.7 v7.6 v7.5 v7.3 v7.1 v7.0 v6.8 v6.7 v6.6 v6 v5 v4 v3 v2

Initialize Pipeline

The initialize pipeline is run once every time application starts up, which means you can use it to hook in code that you want to execute right after the application are started and before a user visits the Ucommerce-backoffice.

In the sample app project we have an example where the initialize pipeline is use to run a custom pipeline, which creates and maintains a product definition.

You hook into the pipeline by creating a custom pipeline task and register it in the Ucommerce configuration.

Here is an example on how to implement a custom pipeline task for the initialize pipeline.

    	public class CustomPipelineTask : IPipelineTask<InitializeArgs>
    		public PipelineExecutionResult Execute(InitializeArgs subject)
    			throw new NotImplementedException();

Here is an example on how to use partial components to add a custom pipeline task to the initialize pipeline.

    		<!-- Adds the custom pipeline task to the Initialize pipeline -->
    		<partial-component id="Initialize">
    						<item insert="last">${MyCustomPipelineTask}</item>
    		<!-- Configuration of your custom pipeline task -->
    		<component id="MyCustomPipelineTask"
    				service="UCommerce.Pipelines.IPipelineTask`1[[UCommerce.Pipelines.Initialization.InitializeArgs, UCommerce.Pipelines]], UCommerce"
    				type="MyNamespace.MyClassName, MyAssembly" />
Ucommerce Aps - Vestergade 58N, 4th. floor - 8000 Aarhus C - Denmark
Phone +45 61 799 997 - Email [email protected] Ucommerce logo