Book Image

Liferay 6.x Portal Enterprise Intranets Cookbook

Book Image

Liferay 6.x Portal Enterprise Intranets Cookbook

Overview of this book

Table of Contents (19 chapters)
Liferay 6.x Portal Enterprise Intranets Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Kaleo timers


This last recipe concerns timers. This functionality allows users to define specific actions, which should be performed after a certain period of time. Let's modify our previous recipe a little with the condition example and add a timer definition. Our assumption is that the task called Main Thread Review shouldn't wait more than one hour for assignment to any user. After one hour, this task should be assigned to a user with the [email protected] e-mail.

How to do it…

First of all, open the previous definition and find the Main Thread Review task. Between the assignments tag and the transitions tag, enter the following code:

<?xml version="1.0" encoding="UTF-8"?>
<task-timers>
  <task-timer>
    <name>default-assignment</name>
    <delay>
      <duration>1</duration>
      <scale>hour</scale>
    </delay>
    <blocking>true</blocking>
    <timer-actions>
      <timer-notification>
        ...