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

Is there any way to extend the default state machine? `DummyPayment01.xml` i mean. I need to add onl

Posts: 123 πŸ§‘πŸ»β€πŸš€ - Cadet

Is there any way to extend the default state machine? DummyPayment01.xml i mean. I need to add only few commands to events. I don't need the new OMS

Welcome!

It looks like you're new here. Sign in or register to get started.
Β«1

Comments

  • Posts: 538 πŸ§‘πŸ»β€πŸš€ - Cadet

    just copy it into config\Zed\oms - I think it will override the vendor one?

  • Posts: 123 πŸ§‘πŸ»β€πŸš€ - Cadet

    i did it already πŸ™‚ and have exception
    "DummyPayment01.xml" found in more then one location. Could not determine which one to choose. Please check your process definition location

  • Extending is not supported. You can copy paste in your own state machine and replace needed parts.

  • Posts: 538 πŸ§‘πŸ»β€πŸš€ - Cadet

    maybe we changed our config:

    $config[OmsConstants::PROCESS_LOCATION] = [
        OmsConfig::DEFAULT_PROCESS_LOCATION,
    ];
    
  • Posts: 538 πŸ§‘πŸ»β€πŸš€ - Cadet

    so it doesn't load from the vendor?

  • Posts: 538 πŸ§‘πŸ»β€πŸš€ - Cadet

    (we've done the same, replaced DummyPayment01.xml)

  • no it loads from config\Zed\oms

  • Posts: 538 πŸ§‘πŸ»β€πŸš€ - Cadet

    ah i see πŸ™ˆ ignore me then

  • Posts: 123 πŸ§‘πŸ»β€πŸš€ - Cadet

    but why extending is not supported?? amazing

  • Posts: 538 πŸ§‘πŸ»β€πŸš€ - Cadet

    you can create subprocesses to allow reuse

  • I suppose it’s a rhetorical question πŸ™‚

  • And yes you can manage everything using subprocesses

  • DummyPayment is only example

  • All projects use their own business processes

  • So they build their own state machines

  • Posts: 123 πŸ§‘πŸ»β€πŸš€ - Cadet

    But i don't need my own state machine. At least at this point. I need to change only some commands.
    Guys this is pain as for me. And time wasting. Completelly unextendable system.

  • Posts: 123 πŸ§‘πŸ»β€πŸš€ - Cadet

    and again copypasting...

  • Posts: 538 πŸ§‘πŸ»β€πŸš€ - Cadet
    edited June 2020

    That is your own state machine? (i.e. it's project code)

  • Posts: 538 πŸ§‘πŸ»β€πŸš€ - Cadet

    You are free to modify it?

  • Posts: 123 πŸ§‘πŸ»β€πŸš€ - Cadet

    yes. but all developers trying to avoid code duplication. but not spryker. this is separate topic

  • Posts: 538 πŸ§‘πŸ»β€πŸš€ - Cadet

    you can use subprocesses to avoid duplication

  • Posts: 538 πŸ§‘πŸ»β€πŸš€ - Cadet

    (think of them like traits)

  • Posts: 70 πŸ§‘πŸ»β€πŸš€ - Cadet

    @U0145CP9Q6Q Please have look at the State Machine Cookbook https://documentation.spryker.com/docs/state-machine-cookbook
    This is a pretty good resource for the state machine.

  • Posts: 123 πŸ§‘πŸ»β€πŸš€ - Cadet

    thanks

  • Domain Lead Solution Architecture Sprykee Posts: 519 πŸ§‘πŸ»β€πŸš€ - Cadet

    wait.. config/Zed/oms/DummyPayment01.xml *is* already your project state-machine. So just change it. Introduce commands you need right there, there is nothing to extend

  • Domain Lead Solution Architecture Sprykee Posts: 519 πŸ§‘πŸ»β€πŸš€ - Cadet

    ..and DummyPayment was meant to be there just for the start of your development, just as you want it. And later on, you will introduce the right one, that will be used on production.

  • Posts: 123 πŸ§‘πŸ»β€πŸš€ - Cadet

    yes. i did like this. also had to remove the path to vendor dummy payment from config.

  • Posts: 123 πŸ§‘πŸ»β€πŸš€ - Cadet

    now it is ok

  • SRE @ Spryker Sprykee Posts: 1,654 ✨ - Novice
    edited June 2020

    wait.. config/Zed/oms/DummyPayment01.xml is already your project state-machine

    That is missing in https://github.com/spryker-shop/b2b-demo-shop/tree/master/config/Zed/oms but present in https://github.com/spryker-shop/suite/tree/master/config/Zed/oms.

    We have some incosistencies between our demoshops I would say and we need to fix it.

  • Domain Lead Solution Architecture Sprykee Posts: 519 πŸ§‘πŸ»β€πŸš€ - Cadet

Welcome!

It looks like you're new here. Sign in or register to get started.