Is it possible to create a workflow that runs a curl command when a page gets published/un-published?

Avatar

Avatar

CharanjitS

Avatar

CharanjitS

CharanjitS

28-01-2021

Is it possible to create a workflow that gets executed when a page gets published/unpublished to run a curl command like: curl <published_page_url>

workflow workflow activity

Accepted Solutions (0)

Answers (1)

Answers (1)

Avatar

Avatar

SureshDhulipudi

MVP

Avatar

SureshDhulipudi

MVP

SureshDhulipudi
MVP

28-01-2021

yes, it is possible,

you can write a service or you can include steps as follow

 

 String[] command = { "curl", "-X", "GET", "<<URI or something here>>" };
 ProcessBuilder process = new ProcessBuilder(command);
Process executeProcess;
executeProcess = process.start();