oroinc / platform

Main OroPlatform package with core functionality.
Other
627 stars 351 forks source link

Workflow autostart issues #987 #988

Closed vytsci closed 4 years ago

vytsci commented 4 years ago

This change fixes issue where start transition is defined but skipped due to missing start_step. Also this should add all is_start transitions into consideration, but for now everywhere start is hardcoded and I have no confidence in fixing multiple transitions autostarts.

vytsci commented 4 years ago

987 This issue is related

anyt commented 4 years ago

👍 Can you share the workflow configuration to reproduce the issue?

anyt commented 4 years ago

As we can't reproduce an issue locally and there was no feedback from the author for a long time, I'm closing the PR.

Feel free to reopen it, in case you would be able to share the workflow configuration that we can use to reproduce the issue.

vytsci commented 4 years ago

Sorry Im late, not currently working on this project anymore as company went down during COVID-19.

workflows:
    claims_application_flow:
        entity:           IfDelayed\Oro\Bundle\ClaimsBundle\Entity\Application
        entity_attribute: application
        start_step:       pending
        force_autostart:  true

workflows:
    claims_application_flow:
        transitions:
            __start__:
                is_start:              true
                is_hidden:             false
                is_unavailable_hidden: true
                step_to:               pending
                transition_definition: __start___definition

And if I remove start_step, as I want my entity to start without workflow initiation, Im unable to do so. We wanted for entity to start without workflow and initiate it via trigger when data is being properly entered, because we have lots of trash data and only small part of claims goes as legit ones, now we are forced to create workflow records for all of our claims.