When we unpublish some components in CMI, it reaches the event system and then from event system, we want to forward these to an external service which will unpublish these components using core service client by making a web service call in event system. So we want to find a way to stop these events to be forwarded to publish queue from event system.
-
When you state "we want to forward these" what exactly do you want forward - are you logging the transaction externally or something else?– Dylan .. Mark SaundersCommented Aug 1 at 11:13
-
When you state "an external service which will unpublish these components" you're indicating that you are triggering an iterative loop here? If you are 'doing something with the external service' as part of the unpublish event then the system should complete the unpublish event without the 'external service' you mention. Maybe the addition of the business logic or some simple sequence diagram to indicate your expectation may help us help you.– Dylan .. Mark SaundersCommented Aug 1 at 11:15
1 Answer
Let's see if I get this right.
When a user unpublishes something you want to:
- Stop that unpublishing action
- Trigger a new unpublishing action under a different service/process/whatever
I think you may be causing yourself trouble with this, if you need to account for additional actions when unpublishing (I assume this is why you want to make this change), then why not do those additional actions as part of the event that is triggered when the user unpublishes?
Another thing to keep in mind is that if you change your system to behave as you suggest, it will be impossible to determine who unpublished what, as it would all be logged under the identity of your "core service client".
Last but not least, when you unpublish via a Core Service Client, you'll also trigger the event system, possibly resulting in a loop.
If you can expand on exactly why this may be a good solution for your use case, I'll adapt my answer accordingly.
-
Nuno Linhares, Here the issue is when users unpublish components from a specific publication, it's causing downtime for the deployer because of large volume. So we want to handle these events in web service which bundles the components and then do the unpublishing. this webservice call will be performed in the event system when the unpublish event reaches the event system So once the web service call has been invoked, we want to stop this event from getting stacked in the publish queue Commented Aug 2 at 13:21
-
Thanks for the context. Tricky one, as I guess you will still have deployer issues, just later. I’ll think about it a bit, but if your users are not working 24/5, maybe you can change the unpublish instruction to execute at night.– Nuno Linhares ♦Commented Aug 3 at 14:42