Product status is not changing via headless APIs
Written By
Pooja Bhambani
How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!
While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.
Legacy Article
You are viewing an article from our legacy "FastTrack"
publication program, made available for informational purposes. Articles
in this program were published without a requirement for independent
editing or verification and are provided"as is" without
guarantee.
Before using any information from this article, independently verify its
suitability for your situation and project.
Issue
- If the product is created via headless API with workflow-enabled. The status of the product is in a 'draft' state rather than a 'pending' state.
-
Steps to reproduce:
1. Assign a default workflow to Commerce Product.
2. Create a product using headless API (POST /v1.0/products)
3. Execute the request.
4. Check the status of the Product in UI. It's in a Draft state.
5. Notice workflow is also not triggered i.e. not assigned to the intended user ( Check-in notifications)
Expected Behavior: The Product must be Pending and notification is also sent out to the intended user.
Actual Behavior: The Product is in a draft state and notification is also not sent out to the intended user.
Environment
- Liferay DXP 7.3
- Commerce 3.0
Resolution
- The observed behavior is the intended behavior of the product. The workflow will not trigger until the publication is submitted.
- The workflow will only trigger when a user manually submits it. By navigating to the created product and clicking on 'Submit for Publication'.
Did this article resolve your issue ?