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

(Untitled)

UKGT7RC7P
UKGT7RC7P Posts: 538 ๐Ÿง‘๐Ÿปโ€๐Ÿš€ - Cadet
ยซ1

Comments

  • UQ958DA4U
    UQ958DA4U Posts: 232 ๐Ÿง‘๐Ÿปโ€๐Ÿš€ - Cadet

    I would love this come to fruition!

  • unfortunately, that would require an entirely different implementation of the state machine ๐Ÿ˜•

  • but for sure an interesting concept

  • Andriy Netseplyayev
    Andriy Netseplyayev Domain Lead Solution Architecture Sprykee Posts: 519 ๐Ÿง‘๐Ÿปโ€๐Ÿš€ - Cadet

    Letโ€™s have a discussion in the comments! I also added my 5 cents. I do like state machine, and I donโ€™t always like step engine implementation, but Iโ€™m afraid state machine wonโ€™t help here, although sounds temting

  • UKGT7RC7P
    UKGT7RC7P Posts: 538 ๐Ÿง‘๐Ÿปโ€๐Ÿš€ - Cadet

    can just be steps that declare dependencies

  • Andriy Netseplyayev
    Andriy Netseplyayev Domain Lead Solution Architecture Sprykee Posts: 519 ๐Ÿง‘๐Ÿปโ€๐Ÿš€ - Cadet

    regarding the implementation - it could be implemented as a separate spryker-shop module, but yes - current state machine is a โ€œzedโ€ module

  • UKGT7RC7P
    UKGT7RC7P Posts: 538 ๐Ÿง‘๐Ÿปโ€๐Ÿš€ - Cadet

    no need to integrate into the existing state machine(s)

  • do you have a use case?

  • UKGT7RC7P
    UKGT7RC7P Posts: 538 ๐Ÿง‘๐Ÿปโ€๐Ÿš€ - Cadet
    edited May 2020

    any checkoutout procedure that branches based on user choices / quote (there are lots in the wild)

  • Andriy Netseplyayev
    Andriy Netseplyayev Domain Lead Solution Architecture Sprykee Posts: 519 ๐Ÿง‘๐Ÿปโ€๐Ÿš€ - Cadet

    state machine in itโ€™s current implementation will bring lots of redundancies into the process, with itโ€™s timeouts, cron jobs, state history and so on.. Probably, you would need another state machine there..

  • UKGT7RC7P
    UKGT7RC7P Posts: 538 ๐Ÿง‘๐Ÿปโ€๐Ÿš€ - Cadet
    edited May 2020

    but not off hand ๐Ÿ˜„ only the relatively trivial example in the idea and vague recollections of writing a VoIP checkout 10 years ago ๐Ÿ˜„

  • the question is: how complex can this really get in real life scenarios

  • the more i think about it, the less.i think it is a good idea ๐Ÿ˜„

  • UKGT7RC7P
    UKGT7RC7P Posts: 538 ๐Ÿง‘๐Ÿปโ€๐Ÿš€ - Cadet

    a step "engine" should be modelled as a graph - you have steps that depend on other steps

  • validation complexity simply explodes when you have many ways that can lead to the current state and you allow to randomly visit prior states

  • sounds like a bug engine ๐Ÿ˜„

  • UQ958DA4U
    UQ958DA4U Posts: 232 ๐Ÿง‘๐Ÿปโ€๐Ÿš€ - Cadet

    "randomly visit prior states" is not required here. Defined paths but just more complex paths.

  • why not start different step engines then?

  • UKGT7RC7P
    UKGT7RC7P Posts: 538 ๐Ÿง‘๐Ÿปโ€๐Ÿš€ - Cadet

    because you could branch at arbitrary points

  • exactly

  • UKGT7RC7P
    UKGT7RC7P Posts: 538 ๐Ÿง‘๐Ÿปโ€๐Ÿš€ - Cadet

    so you can't just choose a correct linear progression to start with

  • anyway

  • Unknown
    edited May 2020

    this would make for a fun whiteboard session and maybe even a hacknight topic

  • U01470E4XTJ
    U01470E4XTJ Posts: 12 ๐Ÿง‘๐Ÿปโ€๐Ÿš€ - Cadet

    I think we would need to discuss an exact checkout flow example cause you can achieve quite a lot by manipulating Step postConditions and just skip steps you do not require

  • Unknown
    edited May 2020

    a little bit of cheating in the step factory can also allow dynamic configuration

  • but would be a bit hacky

  • UKGT7RC7P
    UKGT7RC7P Posts: 538 ๐Ÿง‘๐Ÿปโ€๐Ÿš€ - Cadet
    edited May 2020

    the original point is that you can't skip steps. You have to run through them, so I think at least the possiblity of disabling steps would be a start, anyway - but a graph based system would seem to fit closer to real life (depending on use case) but the linear flow fits into the graph flow anyway.

  • Unknown
    edited May 2020

    how hard can that be? (famous last words ๐Ÿ˜‚)

  • U01470E4XTJ
    U01470E4XTJ Posts: 12 ๐Ÿง‘๐Ÿปโ€๐Ÿš€ - Cadet

    the only thing I am missing is checking for postCondition at Spryker\Yves\StepEngine\Process\StepCollection.php::getNextStep() so you do not need to go to next step if the postCondition is already met and skip to next one

  • UKGT7RC7P
    UKGT7RC7P Posts: 538 ๐Ÿง‘๐Ÿปโ€๐Ÿš€ - Cadet

    it will redirect to that step before checking it though