Fórum

How to override WorkflowConstants in liferay 7?

thumbnail
Abhishek Jain, modificado 7 Anos atrás.

How to override WorkflowConstants in liferay 7?

Regular Member Postagens: 226 Data de Entrada: 20/08/16 Postagens Recentes
I just want to ask how to override WorkflowConstants class in liferay dxp. Does anyone know about it?
thumbnail
David H Nebinger, modificado 7 Anos atrás.

RE: How to override WorkflowConstants in liferay 7?

Liferay Legend Postagens: 14919 Data de Entrada: 02/09/06 Postagens Recentes
You can't and shouldn't.

Constants are known values that the various pieces of portal code will depend upon. If you change them you risk breaking your portal.
thumbnail
Abhishek Jain, modificado 7 Anos atrás.

RE: How to override WorkflowConstants in liferay 7?

Regular Member Postagens: 226 Data de Entrada: 20/08/16 Postagens Recentes
Thanks David for your reply.. I am not changing the already existing constants but I want to add a new one. Can I do the same? If yes, how?
thumbnail
David H Nebinger, modificado 7 Anos atrás.

RE: How to override WorkflowConstants in liferay 7?

Liferay Legend Postagens: 14919 Data de Entrada: 02/09/06 Postagens Recentes
No, and no reason to.

The constants are convenience to ensure that the same value is used multiple places in the code. That makes it a build-time tool, not a run time tool.

I often use my own constants classes to affect the same result.

Go ahead and use your own, but there's no reason to think of modifying Liferay's.
thumbnail
Jack Bakker, modificado 6 Anos atrás.

RE: How to override WorkflowConstants in liferay 7?

Liferay Master Postagens: 978 Data de Entrada: 03/01/10 Postagens Recentes
David H Nebinger:
No, and no reason to.

The constants are convenience to ensure that the same value is used multiple places in the code. That makes it a build-time tool, not a run time tool.

I often use my own constants classes to affect the same result.

Go ahead and use your own, but there's no reason to think of modifying Liferay's.


Thus I gather it might be unreasonable to introduce STATUS_LOOKBEFOREYOULEAPOFFAITH