Workflow User Notifications triggered in State node throw NoSuchTaskInstanceTokenException
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
- When using notifications as part of the workflow, when triggered in a State node, the notifications are generated but when they are selected, the following exception appears in the logs
2023-05-09 20:47:25.666 ERROR [http-nio-8080-exec-9][WorkflowTaskUserNotificationHandler:295] null
com.liferay.portal.kernel.workflow.WorkflowException: com.liferay.portal.workflow.kaleo.exception.NoSuchTaskInstanceTokenException: No KaleoTaskInstanceToken exists with the primary key 0
Resolution
- This issue occurred because the logic erroneously assumed that there will be a workflow Task associated with it, which is not always true for every case, as there can be Workflow Notifications that do not have Tasks associated with them.
- This is a known issue and the fix for this issue can be found in LPS-184878 and has been fixed as of Update 78 for Liferay DXP 7.4
Did this article resolve your issue ?