What are the Slack Archives?
Itโs a history of our time together in the Slack Community! Thereโs a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.
Because this space is not active, you wonโt be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..
Hi all - does someone know how I can check whether a newly defined behavior has been correctly appli
Hi all - does someone know how I can check whether a newly defined behavior has been correctly applied to a table?
(It does not seem to work, so I'd assume not, but it might also be some other problem elsewhere, so I'd like to check the behavior first.)
Comments
-
giovanni.piemontese Technical Lead @ Lรถffelhardt Spryker Solution Partner Posts: 871 ๐ง๐ปโ๐ - Cadet
did u already see the generated orm base class?
0 -
Yep, it does have e.g. an
saveEventBehaviorEntityChange
method, so I guess that should mean that the behavior is there.0 -
However, according to its code, this method should also create an entry in the
spy_event_behavior_change
table - but it doesn't. Even though I stepped it through with debugger and everything seemed OK: it created the entity, supplied all the data and did asave()
on it without errors. But still, thespy_event_behavior_change
table remains empty.0 -
giovanni.piemontese Technical Lead @ Lรถffelhardt Spryker Solution Partner Posts: 871 ๐ง๐ปโ๐ - Cadet
Did u checked if this is active or not
\Spryker\Zed\EventBehavior\EventBehaviorConfig::$isEventDisabled
? I.e. during data-import is disabled and nothing is written inspy_event_behavior_change
Are u testing it in import process or via backoffice save operation?
0 -
\Spryker\Zed\EventBehavior\EventBehaviorConfig::$isEventDisabled
isfalse
.Backoffice save, I believe. I'm just following the https://docs.spryker.com/docs/scos/dev/back-end-development/data-manipulation/data-publishing/handle-data-with-publish-and-synchronization.html#[โฆ]e
tutorial. I'm now at the "Verification
Ensure that the event has been created:" part but I don't see any events for my newly created queue in RabbitMQ.0 -
giovanni.piemontese Technical Lead @ Lรถffelhardt Spryker Solution Partner Posts: 871 ๐ง๐ปโ๐ - Cadet
another thing that u have to keep in mind.... there is a console post hook that consume the data in the table after running a command
\Pyz\Zed\Console\ConsoleDependencyProvider::getConsolePostRunHookPlugins
and also in event dispatcher in zed/backoffice/backend-gateway etc...\Pyz\Zed\EventDispatcher\EventDispatcherDependencyProvider::getEventDispatcherPlugins
\Pyz\Zed\EventDispatcher\EventDispatcherDependencyProvider::getBackendGatewayEventDispatcherPlugins
0 -
giovanni.piemontese Technical Lead @ Lรถffelhardt Spryker Solution Partner Posts: 871 ๐ง๐ปโ๐ - Cadet
i would in your case stop jenkins to ensure that the event is not consumed so quickly that u don't see it in rmq... and if the event is properly generated then u should see it in rmq
0 -
Stopping Jenkins was part of the tutorial and I did that too. (Just checked again, it really is suspended, so that's not the problem.)
0 -
giovanni.piemontese Technical Lead @ Lรถffelhardt Spryker Solution Partner Posts: 871 ๐ง๐ปโ๐ - Cadet
did u try to change some value in IndexController before save call? because the event is generated only if there are some affected rows... otherwise no event is again generated
0 -
No. There are affected rows. Every time I reload the Controller, I get the success message and I can see another new entry in the
spy_hello_world_message
table.0 -
ahhhhhh....
multistore ๐
I'm using the base b2b demoshop for the tutorial, which is multistore by default (AT, DE, US). I'm working with the DE store and didn't even notice that I was checking the AT queues in RabbitMQ. Of course there was nothing there... But then I scrolled down, found the DE queues, and all my messages are there, as they should be. So everything OK. ๐0 -
Still, thank you for your time and help, @UL65CH0MC. I'll take note of your hints, should still come in handy for the future. ๐ ๐
0 -
giovanni.piemontese Technical Lead @ Lรถffelhardt Spryker Solution Partner Posts: 871 ๐ง๐ปโ๐ - Cadet
Ah cool that u find your problem.... then everything is working as expected...
0 -
Yep ๐
0
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 76 Spryker News
- 929 Developer Corner
- 787 Spryker Development
- 89 Spryker Dev Environment
- 362 Spryker Releases
- 3 Oryx frontend framework
- 35 Propel ORM
- 68 Community Projects
- 3 Community Ideation Board
- 30 Hackathon
- 3 PHP Bridge
- 6 Gacela Project
- 26 Job Opportunities
- 3.2K ๐ Slack Archives
- 116 Academy
- 5 Business Users
- 370 Docker
- 551 Slack General
- 2K Help
- 75 Knowledge Sharing
- 6 Random Stuff
- 4 Code Testing
- 32 Product & Business Questions
- 70 Spryker Safari Questions
- 50 Random