Skip to end of banner
Go to start of banner

Comala Workflows - Archive page

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

This script will add a new label to all of the child pages of the selected parent page.

struct state {
    string name;
    string initial;
    string colour;
    string hideStates;
    string taskable;
    string changeDueDate;
    string final;
}

struct comalaState {
    string expand;
    string workflowName;
    state state;
    string [] messages;
}

if(space != "AS") {
    //Create request
    HttpRequest request;
    HttpHeader authHeader = httpBasicAuthHeader("jmuse", "M@tt_0518");
    request.headers += authHeader;
     
    //Post data and get response
    comalaState cs = httpGet("http://localhost:8090/rest/cw/1/content/" + id + "/status", request);
    
    
    if(cs.state.name == "Archive") {
    
        addComment(id, "Moving page to archive space");
        number archiveHome = getPage("AS", "Archive Space Home");
        movePage(id, archiveHome);
    }
}

See Other Recipes

See More Documentation

  • No labels