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)
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:
and getting exception:
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.
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
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" />
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.
is working on a reply...