As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
Hi zaizi,I actually checked the wiki and got it to work. But now I'm wondering if there is any example for Java-backed webscripts (running them as Scheduled Actions)?Thanks
public class MyActionExecuter extends ActionExecuterAbstractBase { public static final String NAME = "my-sample-executer"; protected void executeImpl(final Action pAction, final NodeRef pActionedUponNodeRef) { … } }
<bean id="my-sample-executer" class="MyActionExecuter" parent="action-executer" />
public class MyWebScript extends AbstractCnpWebScript { protected Map<String, Object> executeImpl(final WebScriptRequest pRequest, final Status pStatus, final Cache pCache) { final NodeRef vNodeRef = null; // get the node ref instead final Action vAction = getActionService().createAction(MyActionExecuter.NAME); vAction.setTitle("Starting sample action"); getActionService().executeAction(vAction, pTargetNodeRef); return null; } }
<bean id="webscript.sample.get.myWebscript" class="MyWebScript" />