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.
2 Answers
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. Commented Oct 24, 2018 at 6:20
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. Commented Oct 22, 2018 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. Commented Oct 23, 2018 at 18:19
Customer.Sample.Solution
solution and added a reference in theSitecore.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.