Olaf Kock Vor 8 Jahren Caveat: Use Startup Actions wisely, mainly for constructive work, never for destructive work, because they will run again on next startup. In case you need something running truly once and never again, it's safer to implement an Upgrade Action. Liferay will take care of it never to run a second time. For Startup Actions you'll have to pay attention yourself. Creating an Expando Field is no problem - you automatically won't create them again. But if you reset your portal to a baseline (potentially deleting existing content), you rather want that to be done once and never again when someone deploys the plugin again. Fun fact: The ancient SevenCogs implementation was first implemented as Startup Action. As it could be quite destructive, it was quickly migrated into an Upgrade Action Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Lauri Hiltunen Olaf Kock Vor 8 Jahren Thank you for your input, Olaf, you're correct! Creating expando fields with the start up action is a good feature because it enables you to easily update and also add new expando fields (or roles for instance) when necessary. With upgrade actions you have to make sure it runs again (or create a new one) if something more is added. Though maybe I'll write something about the upgrade action in the near future as well. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Boris Gligorijević Olaf Kock Vor 7 Jahren Hi Olaf,Do you know a solution for DXP? How does one create start-up hook within OSGI? Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Renáta Kovács Boris Gligorijević Vor 7 Jahren Hooks are deprecated in DXP. https://github.com/liferay/liferay-blade-samples (look for: "Extension point description:" and "application.startup.events") Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Alexander Schmacks Renáta Kovács Vor 5 Jahren Where does it say that these events ( startup action discussed here) are deprecated? Both search terms don't yield helpful insights for me... On the other hand Portal Properties documentation for 7.1 here https://docs.liferay.com/ce/portal/7.1-latest/propertiesdoc/portal.properties.html#Startup%20Events still refers to class SimpleAction (though in wrong, old 'struts' package). And class SimpleAction on Github https://github.com/liferay/liferay-portal/blob/master/portal-kernel/src/com/liferay/portal/kernel/events/SimpleAction.java has no deprecation marker (and sadly no documentation at all, as so many other classes... But that's another topic). Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Olaf Kock Alexander Schmacks Vor 5 Jahren Hm - I didn't get the earlier discussion. But I believe that LifecycleAction is the new kid on the block - with various possible key-properties https://github.com/liferay/liferay-blade-samples/blob/7.1/liferay-workspace/extensions/lifecycle-login-preaction/src/main/java/com/liferay/blade/samples/lifecycle/loginpreaction/LoginPreAction.java Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Lauri Hiltunen Olaf Kock Vor 8 Jahren Thank you for your input, Olaf, you're correct! Creating expando fields with the start up action is a good feature because it enables you to easily update and also add new expando fields (or roles for instance) when necessary. With upgrade actions you have to make sure it runs again (or create a new one) if something more is added. Though maybe I'll write something about the upgrade action in the near future as well. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Boris Gligorijević Olaf Kock Vor 7 Jahren Hi Olaf,Do you know a solution for DXP? How does one create start-up hook within OSGI? Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Renáta Kovács Boris Gligorijević Vor 7 Jahren Hooks are deprecated in DXP. https://github.com/liferay/liferay-blade-samples (look for: "Extension point description:" and "application.startup.events") Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Alexander Schmacks Renáta Kovács Vor 5 Jahren Where does it say that these events ( startup action discussed here) are deprecated? Both search terms don't yield helpful insights for me... On the other hand Portal Properties documentation for 7.1 here https://docs.liferay.com/ce/portal/7.1-latest/propertiesdoc/portal.properties.html#Startup%20Events still refers to class SimpleAction (though in wrong, old 'struts' package). And class SimpleAction on Github https://github.com/liferay/liferay-portal/blob/master/portal-kernel/src/com/liferay/portal/kernel/events/SimpleAction.java has no deprecation marker (and sadly no documentation at all, as so many other classes... But that's another topic). Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Olaf Kock Alexander Schmacks Vor 5 Jahren Hm - I didn't get the earlier discussion. But I believe that LifecycleAction is the new kid on the block - with various possible key-properties https://github.com/liferay/liferay-blade-samples/blob/7.1/liferay-workspace/extensions/lifecycle-login-preaction/src/main/java/com/liferay/blade/samples/lifecycle/loginpreaction/LoginPreAction.java Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Renáta Kovács Boris Gligorijević Vor 7 Jahren Hooks are deprecated in DXP. https://github.com/liferay/liferay-blade-samples (look for: "Extension point description:" and "application.startup.events") Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Alexander Schmacks Renáta Kovács Vor 5 Jahren Where does it say that these events ( startup action discussed here) are deprecated? Both search terms don't yield helpful insights for me... On the other hand Portal Properties documentation for 7.1 here https://docs.liferay.com/ce/portal/7.1-latest/propertiesdoc/portal.properties.html#Startup%20Events still refers to class SimpleAction (though in wrong, old 'struts' package). And class SimpleAction on Github https://github.com/liferay/liferay-portal/blob/master/portal-kernel/src/com/liferay/portal/kernel/events/SimpleAction.java has no deprecation marker (and sadly no documentation at all, as so many other classes... But that's another topic). Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Olaf Kock Alexander Schmacks Vor 5 Jahren Hm - I didn't get the earlier discussion. But I believe that LifecycleAction is the new kid on the block - with various possible key-properties https://github.com/liferay/liferay-blade-samples/blob/7.1/liferay-workspace/extensions/lifecycle-login-preaction/src/main/java/com/liferay/blade/samples/lifecycle/loginpreaction/LoginPreAction.java Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Alexander Schmacks Renáta Kovács Vor 5 Jahren Where does it say that these events ( startup action discussed here) are deprecated? Both search terms don't yield helpful insights for me... On the other hand Portal Properties documentation for 7.1 here https://docs.liferay.com/ce/portal/7.1-latest/propertiesdoc/portal.properties.html#Startup%20Events still refers to class SimpleAction (though in wrong, old 'struts' package). And class SimpleAction on Github https://github.com/liferay/liferay-portal/blob/master/portal-kernel/src/com/liferay/portal/kernel/events/SimpleAction.java has no deprecation marker (and sadly no documentation at all, as so many other classes... But that's another topic). Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Olaf Kock Alexander Schmacks Vor 5 Jahren Hm - I didn't get the earlier discussion. But I believe that LifecycleAction is the new kid on the block - with various possible key-properties https://github.com/liferay/liferay-blade-samples/blob/7.1/liferay-workspace/extensions/lifecycle-login-preaction/src/main/java/com/liferay/blade/samples/lifecycle/loginpreaction/LoginPreAction.java Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Olaf Kock Alexander Schmacks Vor 5 Jahren Hm - I didn't get the earlier discussion. But I believe that LifecycleAction is the new kid on the block - with various possible key-properties https://github.com/liferay/liferay-blade-samples/blob/7.1/liferay-workspace/extensions/lifecycle-login-preaction/src/main/java/com/liferay/blade/samples/lifecycle/loginpreaction/LoginPreAction.java Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen