does event trigger automatically ?
In ApprovalWorkflowListeners onGuard should be called, i could validate and block the txn but no luck.
or we have to define in config like (symphony)
'review-pending-l1' =>[ 'guard'=> "has_role('customer')", 'from' => 'submitted', 'to' => 'pending_for_review_l1', ],
second, how can i implement guard in my workflow based on user role.
ex. if user has customer role he will see only submit only, and if user has managed role he will see approve, review, reject etc
In App\Providers\EventServiceProvider file, you have to add your listener class into $subscribe :
protected $subscribe = [
'App\Listeners\ApprovalWorkflowListeners',
];
i follow the read me instruction, #53 still not able to connect how will it listen the events. here is my listner,
here my workflow config
does event trigger automatically ? In ApprovalWorkflowListeners onGuard should be called, i could validate and block the txn but no luck.
or we have to define in config like (symphony)
'review-pending-l1' =>[ 'guard'=> "has_role('customer')", 'from' => 'submitted', 'to' => 'pending_for_review_l1', ],
second, how can i implement guard in my workflow based on user role. ex. if user has customer role he will see only submit only, and if user has managed role he will see approve, review, reject etc