2

I have replaced default ReleaseOrderBlock with CustomBlock inside IPendingOrdersMinionPipeline. I have tried debugging by stopping CommerceAuthoring_Sc9 in IIS and running Commerce engine on port 5000 using IISExpress in Visual studio.But debugger is not hitting to Custom block inside plugin. However i am able to debug other plugins.

  • did you bootstrap your commerce engine after you made changes ? – Vlad Iobagiu Oct 22 '18 at 7:54
  • can you add here your configsitecore file where you replace ReleaseOrderBlock? – Vlad Iobagiu Oct 22 '18 at 7:58
  • @VladIobagiu : Yes. I have bootstraped commerce engine. Below is the code block where replacing Minion block: services.Sitecore().Pipelines( pipeLineConfig => pipeLineConfig.ConfigurePipeline<IPendingOrdersMinionPipeline>( config => config.Replace<ReleaseOrderBlock, SendOrderToOmsMinionBlock>() )); – akash Oct 22 '18 at 11:01
  • Could it be that the pipeline is aborting before it gets to your block? – Sandy Oct 23 '18 at 5:47
  • Did you create your plugin inside the Customer.Sample.Solution solution and added a reference in the Sitecore.Commerce.Engine project to your new plugin project. After I did that, I was able to debug my plugin, when I hit F5 and ran the engine in IIS Express. – n-develop Oct 24 '18 at 4:48
1

CommerceMinions_Sc9 is responsible for run and call all OrdersMinions like ReleasedOrdersMinion, WaitingForAvailabilityOrdersMinion and etc.

If you want to check your changes in CommerceAuthoring role, you need to change Environment variable MinionsHost in Postman to {{Protocol}}://{{HostName}}:5000 and execute Run PendingOrders Minion request from Postman manually

  • After running Run PendingOrders Minion from postman Habitat environment, am able to debug the plugin. Thanks. – akash Oct 24 '18 at 6:20
0

Check these three things :

1) You have added your block to the pipeline correctly using the ConfigureSitecore class (I sometimes think its correct but miss something small)

2) Make sure you are referencing your new plugin assembly from the Sitecore.Commerce.Engine project

3) Look at the latest NodeConfigurationXXXXX.log and ensure that your block is registered in the correct pipeline. You could also use the {{ServiceHost}}/{{OpsApi}}/GetPipelines() call in postman.

You can also ensure the minions are actually running by executing the correct postman call e.g. {{MinionsHost}}/{{OpsApi}}/RunMinion()

  • Block is configured correctly. Block name is verifed in Node logs. I had added logs info which can also be seen SCF logs. IPending minion is picking up orders in pending state after like 5 min interval. But i am curious to debugging this minion block in visual studio to understand it better. – akash Oct 22 '18 at 16:53
  • Have you tried running the engine in the console rather than IISExpress? You can do this by using "engine" option to start the engine. – I. Webster Oct 23 '18 at 18:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.