In workflow.yml I define initial_place.
framework:
workflows:
case_workflow:
type: 'workflow' # or 'state_machine'
audit_trail:
enabled: true
marking_store:
type: 'multiple_state' # or 'single_state'
arguments:
- 'currentPlace'
supports:
- App\Entity\Cases\CoreCase
initial_place: initial
places:
- initial
- review
- rejected
- published
transitions:
to_review:
from: initial
to: review
publish:
from: review
to: published
reject:
from: review
to: rejected
In the entity I have defined the property
/**
* @ORM\Column(type="string", length=50)
*/
private $currentPlace;
In the controller I create the entity and persist it
$dieselCase = new DieselCase();
$dieselCase->setUser($account);
$dieselCase->setCustomer($account);
$em->persist($dieselCase);
$em->flush();
But currentPlace is not set to initial. Is it a bug in the workflow bundle? How can I solve this problem?