Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


These support forums are now closed for new topics and comments.
Please head on over to http://eureka.ucommerce.net/ for support.

  • Roman 3 posts 33 karma points
    Mar 31, 2014 @ 14:35
    Roman
    0

    Can't change order status in ucommerce, using windows service

    I'm trying to change order status from new to completed inside windows service (separatly from web).

    I'm doing like this:

    var newOrderStatus = OrderStatus.Get((int)OrderStatusCode.CompletedOrder);
    var orderService = ObjectFactory.Instance.Resolve<IOrderService>();
    ...
    orderService.ChangeOrderStatus(order, newOrderStatus);

    and getting exception:

    Exception: Castle.MicroKernel.ComponentNotFoundException: No component for key ToCompletedOrder was found
    at Castle.MicroKernel.DefaultKernel.Resolve(String key, Type service)
    at Castle.Windsor.WindsorContainer.Resolve[T](String key)
    at UCommerce.Transactions.OrderService.ChangeOrderStatus(PurchaseOrder purchaseOrder, OrderStatus newOrderStatus, String userName)

    While development of windows service, I followed this document:http://docs.ucommerce.net/ucommerce/v5/system-integration/enable-api-outside-web-context.html

    I'm using uCommerce of version 3.5

    Would be pleased for any help.

  • Jesper Nielsen 141 posts 498 karma points
    Mar 31, 2014 @ 14:56
    Jesper Nielsen
    0

    Hi Roman,

    One thing to check is what you have in your "ToCompletedOrder.config" file in the "Pipelines" configuration folder?

    Your components.config file should have an entry for the "ToCompletedOrder.config" file. Default it should point to

    <include uri="../pipelines/ToCompletedOrder.config" />

    Kind regards,

    Jesper

  • Roman 3 posts 33 karma points
    Mar 31, 2014 @ 15:02
    Roman
    0

    Hi Jesper,

    This is my ToCompletedOrder.config:

    <configuration>

    <components>

    <!-- Pipeline Instance -->

    <component id="ToCompletedOrder"

      service="UCommerce.Pipelines.IPipeline`1[[UCommerce.EntitiesV2.PurchaseOrder, UCommerce]], UCommerce"

      type="UCommerce.Pipelines.OrderProcessing.OrderProcessingPipeline, UCommerce.Pipelines">

    <parameters>

    <tasks>

    <array>

    <!-- 

    Payment processing vendors ussually require additional subscription fees for you to be able to access their API.

    Please consult your agreement to see if API access is supported for your particular plan.

    -->

    <value>${ToCompletedOrder.AcquirePaymentTask}</value>

    </array>

    </tasks>

    </parameters>

    </component>

     

    <!-- Pipeline Tasks-->

    <component id="ToCompletedOrder.AcquirePaymentTask"

      service="UCommerce.Pipelines.IPipelineTask`1[[UCommerce.EntitiesV2.PurchaseOrder, UCommerce]], UCommerce"

      type="UCommerce.Pipelines.OrderProcessing.AcquirePaymentTask, UCommerce.Pipelines" />

    </components>

    </configuration>

     

    And Components.config also has:

    <include uri="../pipelines/ToCompletedOrder.config" />

  • Morten Skjoldager 440 posts 1499 karma points
    Apr 07, 2014 @ 13:15
    Morten Skjoldager
    0

    That windows service of yours. 

    Somewhere in the application root, do you have multiple instances of components.config ? Sometimes that's the issue. 

    Nevertheless, that exception is thrown because the component isn't registered when the service starts. 

Please Sign in or register to post replies

Write your reply to:

Draft