Hello EveryOne ,
I am able to lock and unlock a page using script through workflow . script is below.
I need to lock a folder so that all sub folders get locked recursively. how to do this ??? Please support.Thank you!
Lock script
text = " locked!";
try{
storeElement = context.getStoreElement();
if(storeElement instanceof PageRef)
{
context.logInfo("PageRef gelockt:: " + storeElement.isLocked() + " WriteLock: " + storeElement.getWriteLock());
page = storeElement.getPage();
if(!page.getWriteLock()){
context.logInfo("writelock gelockt");
page.setColor(java.awt.Color.YELLOW);
page.setWriteLock(true);
page.setLock(true);
page.save();
}
}
} catch(Exception e){
}
context.logInfo("dotransition" +context.getTransitionParameters());
if ( context instanceof de.espirit.firstspirit.access.store.templatestore.WorkflowScriptContext){
context.doTransition("object_locked");
}
Worklfow :