Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Workflow] Allow transition when many places in transition froms#22017

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
sebdec wants to merge2 commits intosymfony:masterfromsebdec:workflow-froms
Closed

[Workflow] Allow transition when many places in transition froms#22017

sebdec wants to merge2 commits intosymfony:masterfromsebdec:workflow-froms

Conversation

@sebdec
Copy link
Contributor

QA
Branch?master
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed ticketsno
LicenseMIT
Doc PR

It is about the workflow component
Actually a permission with multiple places in froms can not be applied
This PR solve that

$this->assertCount(1,$transitions);
$this->assertSame('t5',$transitions[0]->getName());
$this->assertCount(2,$transitions);
$this->assertSame('t2',$transitions[0]->getName());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Hi@sebdec this change is not valid. To apply t2, the subject must be in all froms, in this case "b" and "c", but only "c" is marked.

Copy link
ContributorAuthor

@sebdecsebdecMar 16, 2017
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I was thinking it was a bug
Is there a solution to apply t2 if the subject is at least in one from ("b" or "c")?

@lyrixx
Copy link
Member

Hello.

Thanks for trying to solve a bug but there are no bug here.

This is indeed the right behaviour. You are currently using the workflow net implementation and it works like that. It means that a transition becomes enabled if and only if:

  1. A token is present in all previous places (ie: your subject is in all place)
  2. All guard listener do not block the transition

It looks like you want to use astate_machine. If you are using the workflow in the full stack framework, you can enable the state machine like that:https://github.com/lyrixx/SFLive-Paris2016-Workflow/blob/master/app/config/workflow.yml#L37

@lyrixxlyrixx closed thisMar 16, 2017
@lyrixxlyrixx mentioned this pull requestMar 16, 2017
lyrixx added a commit that referenced this pull requestMar 16, 2017
This PR was merged into the 3.2 branch.Discussion----------[Workflow] Added more tests| Q             | A| ------------- | ---| Branch?       | 3.2| Bug fix?      | no| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets |#22017| License       | MIT| Doc PR        | ----It's not the first time that people try to fix the workflow because they don't understand how it works. Basically, it's because the default configuration is using the "workflow" and not the "state_machine" type. It was a mistake but it's too late because it will be BC break. May be we could solve that by triggering a deprecation if the type is not explicit. But nobody will see it because it will be triggered during the compilation. It could also be fixed with more documentation.Anyway, I want to add more tests to cover that with a little comment in the test suite. Right now, only one tests failed. With this PR more tests are failing.Commits-------e47cfe9 [Workflow] Added more tests
@sebdec
Copy link
ContributorAuthor

ok thank you lyrixx for your answer and the tests added

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

1 more reviewer

@HeahDudeHeahDudeHeahDude left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@sebdec@lyrixx@HeahDude@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp