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..

hey, I have couple questions about state machine assuming, I have multiple stores configured, if I r

U01G4K5E0J2
U01G4K5E0J2 Posts: 194 ๐Ÿง‘๐Ÿปโ€๐Ÿš€ - Cadet

hey, I have couple questions about state machine
assuming, I have multiple stores configured, if I run

APPLICATION_STORE=EN oms:check-condition

will conditions be verified only for EN store, or for all stores?
could this command check conditions for other stores?
what will happen if I run

APPLICATION_STORE=EN oms:check-condition --store-name=DE

Comments

  • giovanni.piemontese
    giovanni.piemontese Spryker Solution Partner Posts: 871 ๐Ÿง‘๐Ÿปโ€๐Ÿš€ - Cadet

    For an old/legacy Spryker Shop I had 7 Stores and a lot of StateMachines and OMS State Machines. I had a lot of this problems... cronjob settings that trigger only a store specific state machine or oms and not mix the execution of this (each store can also have a different db for example)..

    And I solved just to call the stateMachine always with StoreName as Suffix... Separate the Cronjobs for each Stores etc... (naturally when ur code have to trigger the statemachine have to trigger the right state machine)..

    I attach some screenshots from my old project (JetApp - Privat Charter with FlightBooking).. maybe so u can have a better idea...

    p.s..: Every Job naturally was triggered with correct APPLICATION_STORE.

    For Example (as said legacy Spryker):

    [ -f /var/www/jetapp/html/deploy/vars ] && . /var/www/jetapp/html/deploy/vars
    export APPLICATION_ENV=production
    export APPLICATION_STORE=CH
    cd $destination_release_dir
    . ./config/Zed/cronjobs/cron.conf
    $PHP_BIN bin/console state-machine:check-condition -s BrokerCH
    

    I don't know if with the current Shop Version is this still possible (i have currently only DE Store).. But I think that this solution about me is clean and is perfect for better split business logic / jobs etcc... for each StateMachine - Store combination.

  • U01G4K5E0J2
    U01G4K5E0J2 Posts: 194 ๐Ÿง‘๐Ÿปโ€๐Ÿš€ - Cadet

    thanks

  • giovanni.piemontese
    giovanni.piemontese Spryker Solution Partner Posts: 871 ๐Ÿง‘๐Ÿปโ€๐Ÿš€ - Cadet

    p.s.: Of course your db table related to state machine and sales order table related to oms state machine MUST be store fk as field, otherwise u don't know more which state machine is currently assigned to your data in db..

  • giovanni.piemontese
    giovanni.piemontese Spryker Solution Partner Posts: 871 ๐Ÿง‘๐Ÿปโ€๐Ÿš€ - Cadet

    @UKHR9UN00 do u remember it? ๐Ÿ™‚