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 use conditional statement in liferay
Hi,
I want my file to be auto approved if it hit the workflow. I am using below condition for it but not getting any solution. Please help me with same.
List<AssetCategory> assetCategories = assetEntry.getCategories();
returnValue = "BPR Review";
for (AssetCategory assetCategory : assetCategories) {
String categoryName = assetCategory.getName()
if (categoryName.equals("SEC FILINGS")) {
returnValue = "Approved";
return true;
}
}
First, categories show title in the control panel, even though they do also have a name (which you're checking).
Are you sure that the category you want to match to actually has the name SEC FILINGS?
Also, could it be a case match issue or something?
Powered by Liferay™