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
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
Comments
-
just copy it into
config\Zed\oms
- I think it will override the vendor one?0 -
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
0 -
Extending is not supported. You can copy paste in your own state machine and replace needed parts.
0 -
maybe we changed our config:
$config[OmsConstants::PROCESS_LOCATION] = [ OmsConfig::DEFAULT_PROCESS_LOCATION, ];
0 -
so it doesn't load from the vendor?
0 -
(we've done the same, replaced
DummyPayment01.xml
)0 -
no it loads from config\Zed\oms
0 -
ah i see π ignore me then
0 -
but why extending is not supported?? amazing
0 -
you can create subprocesses to allow reuse
0 -
I suppose itβs a rhetorical question π
0 -
And yes you can manage everything using subprocesses
0 -
DummyPayment is only example
0 -
All projects use their own business processes
0 -
So they build their own state machines
0 -
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.0 -
and again copypasting...
0 -
That is your own state machine? (i.e. it's project code)
0 -
You are free to modify it?
0 -
yes. but all developers trying to avoid code duplication. but not spryker. this is separate topic
0 -
you can use subprocesses to avoid duplication
0 -
(think of them like traits)
0 -
@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.0 -
thanks
0 -
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
0 -
..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.
0 -
yes. i did like this. also had to remove the path to vendor dummy payment from config.
0 -
now it is ok
0 -
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.
0 -
..and itβs present in B2C:
https://github.com/spryker-shop/b2c-demo-shop/tree/master/config/Zed/oms0
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