Example usage for com.liferay.portal.kernel.util Constants SIGNAL

List of usage examples for com.liferay.portal.kernel.util Constants SIGNAL

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.util Constants SIGNAL.

Prototype

String SIGNAL

To view the source code for com.liferay.portal.kernel.util Constants SIGNAL.

Click Source Link

Usage

From source file:com.liferay.portlet.workflowinstances.action.EditWorkflowInstanceAction.java

License:Open Source License

@Override
public void processAction(ActionMapping mapping, ActionForm form, PortletConfig portletConfig,
        ActionRequest actionRequest, ActionResponse actionResponse) throws Exception {

    String cmd = ParamUtil.getString(actionRequest, Constants.CMD);

    try {//  w w w.  java  2s . c  o  m
        if (cmd.equals(Constants.DELETE)) {
            deleteInstance(actionRequest);
        } else if (cmd.equals(Constants.SIGNAL)) {
            signalInstance(actionRequest);
        }

        sendRedirect(actionRequest, actionResponse);
    } catch (Exception e) {
        if (e instanceof PrincipalException || e instanceof WorkflowException) {

            SessionErrors.add(actionRequest, e.getClass().getName());

            setForward(actionRequest, "portlet.workflow_instances.error");
        } else {
            throw e;
        }
    }
}