Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: How to enable workflow for a specific language in journal article
Hi guys
we need to enable workflow when a specific translate will be added to article or when an user will be changed the translate for a specific language.
How could we do this In liferay?
How to detect this change in workflow definition?
Thank you
we need to enable workflow when a specific translate will be added to article or when an user will be changed the translate for a specific language.
How could we do this In liferay?
How to detect this change in workflow definition?
Thank you
Nader Jafari:
we need to enable workflow when a specific translate will be added to article or when an user will be changed the translate for a specific language.
As you can have workflow only for all or no article in a site, you'd have to create a custom workflow that is aware of the language of an article and uses an automatic (scripted) assignment of the next workflow steps depending on the edited language.
Thank you Olaf
my question is that does liferay have an API to detect that the content of an article changed on a specific language?
it is so hard to detect this changes in script because the localized fields have XML content in database and for this detection we need to pars content of these fileds (Title,Description,Content).
My requirement is that we need several article approvers for each language ,not single approver for all artilces.
my question is that does liferay have an API to detect that the content of an article changed on a specific language?
it is so hard to detect this changes in script because the localized fields have XML content in database and for this detection we need to pars content of these fileds (Title,Description,Content).
My requirement is that we need several article approvers for each language ,not single approver for all artilces.
I'm not aware of a specific API. You probably will have to fetch the previous version's content, diff for yourself, and determine what's changed.
An alternative would be to add metadata during editing, e.g. while saving calculate some hints for the workflow system and rely on that data to go through the workflow. That would keep the messy part out of the workflow definition.
I'd recommend to utilize custom APIs in general for this purpose: Instead of messing with a lot of script code in the workflow definition, limit the script code to call your custom APIs - you'll have a lot better story there in debugging and deployment, IMHO. At least compare the options of script vs custom API.
An alternative would be to add metadata during editing, e.g. while saving calculate some hints for the workflow system and rely on that data to go through the workflow. That would keep the messy part out of the workflow definition.
I'd recommend to utilize custom APIs in general for this purpose: Instead of messing with a lot of script code in the workflow definition, limit the script code to call your custom APIs - you'll have a lot better story there in debugging and deployment, IMHO. At least compare the options of script vs custom API.
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™