Workflow events (Enterprise Edition only)¶
Workflow events are dispatched in the PIM on some workflow actions, mainly in product draft steps (sent for approval, rejected, deleted, approved…) and publication feature. They are basically useful if you want to add your business logic before or after those specific actions.
Publish Workflow Event Actions¶
- When a product is published:
pimee_workflow.published_product.pre_publish
The product object is published
pimee_workflow.published_product.post_publish
(only on flush!)
- When a product is unpublished:
pimee_workflow.published_product.pre_unpublish
The product object is unpublished
pimee_workflow.published_product.post_unpublish
(only on flush!)
pimee_workflow.published_product.pre_publish
¶
This event is dispatched before a product is published.
Event Class: Akeneo\Pim\WorkOrganization\Workflow\Bundle\Event\PublishedProductEvent
pimee_workflow.published_product.post_publish
¶
This event is dispatched after a product has been published.
Event Class: Akeneo\Pim\WorkOrganization\Workflow\Bundle\Event\PublishedProductEvent
Built-in PIM subscribers registered to this event
Listener Class Name |
Priority |
---|---|
|
0 |
pimee_workflow.published_product.pre_unpublish
¶
This event is dispatched before a product is unpublished.
Event Class: Akeneo\Pim\WorkOrganization\Workflow\Bundle\Event\PublishedProductEvent
pimee_workflow.published_product.post_unpublish
¶
This event is dispatched after a product has been unpublished.
Event Class: Akeneo\Pim\WorkOrganization\Workflow\Bundle\Event\PublishedProductEvent
Draft/Proposal Workflow Event Actions¶
- When a product draft is sent for approval:
pimee_workflow.product_draft.pre_ready
The product draft status is updated to be reviewed
pimee_workflow.product_draft.post_ready
- When a product draft change is approved (partial approval):
pimee_workflow.product_draft.pre_partial_approve
The product is fetched from the product draft
pimee_workflow.product_draft.pre_apply
The product object is updated with product draft values (but not saved yet)
pimee_workflow.product_draft.post_apply
The product is saved with the new values, and the draft is updated/removed
pimee_workflow.product_draft.post_partial_approve
- When a product draft change is rejected (partial reject):
pimee_workflow.product_draft.pre_partial_refuse
The product draft change is updated and is set to “in progress”
pimee_workflow.product_draft.post_partial_refuse
- When a product draft is approved:
pimee_workflow.product_draft.pre_approve
The product is fetched from the product draft
pimee_workflow.product_draft.pre_apply
The product object is updated with product draft values (but not saved yet)
pimee_workflow.product_draft.post_apply
The product is saved with the new values, and the draft is updated/removed
pimee_workflow.product_draft.post_approve
- When a product draft is rejected:
pimee_workflow.product_draft.pre_refuse
The product draft status is updated
pimee_workflow.product_draft.post_refuse
- When a product draft is deleted:
pimee_workflow.product_draft.pre_remove
Product draft is removed from the DB
pimee_workflow.product_draft.post_remove
pimee_workflow.product_draft.pre_ready
¶
This event is dispatched before a product draft status is set to “ready”.
Event Class: GenericEvent
pimee_workflow.product_draft.post_ready
¶
This event is dispatched after a product draft’s status has been set to “ready” and saved to DB. The product draft now becomes a proposal, ready to be reviewed.
Event Class: GenericEvent
Built-in PIM subscribers registered to this event
Listener Class Name |
Priority |
---|---|
|
0 |
pimee_workflow.product_draft.pre_approve
¶
This event is dispatched before a product draft is approved.
Event Class: GenericEvent
pimee_workflow.product_draft.post_approve
¶
This event is dispatched after a product draft has been approved. The product is updated and saved with the new values, and the product draft is removed or updated.
Event Class: GenericEvent
Built-in PIM subscribers registered to this event
Listener Class Name |
Priority |
---|---|
|
0 |
pimee_workflow.product_draft.pre_partial_approve
¶
This event is dispatched before a product draft is partially approved. A partial approve is about a specific single change of the product draft.
Event Class: GenericEvent
pimee_workflow.product_draft.post_partial_approve
¶
This event is dispatched before a product draft is partially approved. The product is updated and saved with the new values, and the product draft is removed or updated. A partial approve is about a specific single change of the product draft.
Event Class: GenericEvent
Built-in PIM subscribers registered to this event
Listener Class Name |
Priority |
---|---|
|
0 |
pimee_workflow.product_draft.pre_apply
¶
This event is dispatched before a product object is updated from draft values.
Event Class: GenericEvent
pimee_workflow.product_draft.post_apply
¶
This event is dispatched after a product object has been updated from draft values. Note that the product is not saved yet, only the product object is updated.
Event Class: GenericEvent
pimee_workflow.product_draft.pre_refuse
¶
This event is dispatched before a product draft is refused.
Event Class: GenericEvent
pimee_workflow.product_draft.post_refuse
¶
This event is dispatched after a product draft has been refused. The product draft is updated in the DB.
Event Class: GenericEvent
Built-in PIM subscribers registered to this event
Listener Class Name |
Priority |
---|---|
|
0 |
pimee_workflow.product_draft.pre_partial_refuse
¶
This event is dispatched before a product draft is partially refused. A partial refuse is about a specific single change of the product draft.
Event Class: GenericEvent
pimee_workflow.product_draft.post_partial_refuse
¶
This event is dispatched before a product draft is partially refused. The product draft is removed or updated. A partial refuse is about a specific single change of the product draft.
Event Class: GenericEvent
Built-in PIM subscribers registered to this event
Listener Class Name |
Priority |
---|---|
|
0 |
pimee_workflow.product_draft.pre_remove
¶
This event is dispatched before a product draft is removed.
Event Class: GenericEvent
pimee_workflow.product_draft.post_remove
¶
This event is dispatched after a product draft has been removed.
Event Class: GenericEvent
Built-in PIM subscribers registered to this event
Listener Class Name |
Priority |
---|---|
|
0 |
Found a typo or a hole in the documentation and feel like contributing?
Join us on Github!