Skip to content

Commit 51dad72

Browse files
committed
[Workflow] Set the marking then announce enabled transition
It allows to auto-apply some transition from a listener. The feature was asked here: https://twitter.com/gaetanbuellet/status/796387741420441600 And It has been implemented in userland here: https://github.com/lyrixx/SFLive-Paris2016-Workflow/tree/auto-apply
1 parent ae73f70 commit 51dad72

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Symfony/Component/Workflow/Workflow.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,10 @@ public function apply($subject, $transitionName)
126126

127127
$this->enter($subject, $transition, $marking);
128128

129-
$this->announce($subject, $transition, $marking);
130-
131129
$this->markingStore->setMarking($subject, $marking);
132130

131+
$this->announce($subject, $transition, $marking);
132+
133133
return $marking;
134134
}
135135

0 commit comments

Comments
 (0)