Run groovy script on server startup (Updater editor)

36 views
Skip to first unread message

Rahul

unread,
Jan 27, 2018, 12:37:56 PM1/27/18
to Hippo Community
Hi All,

How do i run groovy script when i restart server. I am using updater editor.

Thanks
Rahul

Rahul

unread,
Jan 27, 2018, 2:57:25 PM1/27/18
to Hippo Community
Hi,

I am able to run the script from CMS perspective. I am adding trying to add new field to the document using script. I am able to see changes in console but the same is not getting reflected in CMS. PFA screenshot of the same.

How can i get this reflected in CMS?

Thanks
Rahul
ss1.png
ss2.png

Eleftherios Karamoulas

unread,
Jan 29, 2018, 3:04:42 AM1/29/18
to hippo-c...@googlegroups.com
Hello Rahul 

Check the section Automatically Executing Updater Script on Startup https://www.onehippo.org/library/concepts/update/using-the-updater-editor.html

In order to have a field visible in the cms the field should be added to the document type under hippo:namespaces/yournamespace/yourdocumenttpye/ and then you have hipposysedit:doetype and editor:templates check that your desired field is being added under both above mentioned nodes

Kind regards

--
Hippo Community Group: The place for all discussions and announcements about Hippo CMS (and HST, repository etc. etc.)
 
To post to this group, send email to hippo-community@googlegroups.com
RSS: https://groups.google.com/group/hippo-community/feed/rss_v2_0_msgs.xml?num=50
---
You received this message because you are subscribed to the Google Groups "Hippo Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hippo-community+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/hippo-community.
For more options, visit https://groups.google.com/d/optout.



--
Eleftherios Karamoulas
Software engineer

email-sig-logo.png

_________________________________________________________________________________

Rahul

unread,
Jan 30, 2018, 1:52:53 AM1/30/18
to Hippo Community
Hi Eleftherios,


Can you please share any example how do i execute script during stat up? I am unable to get the below line:

"It's possible to automatically execute scripts on startup by using the repository-data-application module to add the scripts as content definitions to /hippo:configuration/hippo:update/hippo:queue."

Thanks
Rahul



On Monday, January 29, 2018 at 1:34:42 PM UTC+5:30, Lef Karamoulas wrote:
Hello Rahul 

Check the section Automatically Executing Updater Script on Startup https://www.onehippo.org/library/concepts/update/using-the-updater-editor.html

In order to have a field visible in the cms the field should be added to the document type under hippo:namespaces/yournamespace/yourdocumenttpye/ and then you have hipposysedit:doetype and editor:templates check that your desired field is being added under both above mentioned nodes

Kind regards
On Sat, Jan 27, 2018 at 8:57 PM, Rahul <cp....@gmail.com> wrote:
Hi,

I am able to run the script from CMS perspective. I am adding trying to add new field to the document using script. I am able to see changes in console but the same is not getting reflected in CMS. PFA screenshot of the same.

How can i get this reflected in CMS?

Thanks
Rahul


On Saturday, January 27, 2018 at 11:07:56 PM UTC+5:30, Rahul wrote:
Hi All,

How do i run groovy script when i restart server. I am using updater editor.

Thanks
Rahul

--
Hippo Community Group: The place for all discussions and announcements about Hippo CMS (and HST, repository etc. etc.)
 
To post to this group, send email to hippo-c...@googlegroups.com

RSS: https://groups.google.com/group/hippo-community/feed/rss_v2_0_msgs.xml?num=50
---
You received this message because you are subscribed to the Google Groups "Hippo Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hippo-communi...@googlegroups.com.

Eleftherios Karamoulas

unread,
Jan 30, 2018, 4:57:45 AM1/30/18
to hippo-c...@googlegroups.com
What the sentence describes is that you have to bootstrap your script in the hippo:update/hippo:queue.

The first screen shot is the initialise item that you need in your hippoecm-extension.xml under bootstrap/configuration. If you want to trigger the script every time you deploy for example you can increase the version an the script will be bootstrapped to the queue.
The second screen shot is teststartup.xml the node startup is the definition of your script.

and thats for v11 and earlier.

For v12 it should be something equivalent as yaml is being used but i dont have an example.

To post to this group, send email to hippo-community@googlegroups.com

RSS: https://groups.google.com/group/hippo-community/feed/rss_v2_0_msgs.xml?num=50
---
You received this message because you are subscribed to the Google Groups "Hippo Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hippo-community+unsubscribe@googlegroups.com.
Screen Shot 2018-01-30 at 10.54.22.png
Screen Shot 2018-01-30 at 10.54.38.png
Reply all
Reply to author
Forward
0 new messages