1

I am looking for selective workflow in Liferay. The usecase is I need message board posts to go to admin for approval only if it consists swear words in it.

For detecting swear words, I plan to use service wrapper hook or model listener. But I see that in Liferay's addMessage method, the workflow related code always executes.

Is there any possibility to override this behavior without using ext?

Sandeep Nair
  • 3,630
  • 3
  • 26
  • 38

1 Answers1

3

You should create a workflow where the first step checks for swear words and if it doesn't find any just skip the approval part. There's no conditional workflow in Liferay, but your workflow can easily contain scripted and conditional logic. The service layer is also available to be called from a workflow script

Olaf Kock
  • 46,930
  • 8
  • 59
  • 90