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.
var workflowPackage = workflow.createPackage(); workflowPackage.addNode(node); // 'node' is the ScriptNode of the object (a document in this case).
<config> <actions> <action-group id="space_browse_menu"> <action idref="start_workflow" /> </action-group> </actions> </config>
// create a workflow package for the attached items and add them NodeRef workflowPackage = this.getWorkflowService().createPackage(null);
// create a workflow package for the attached items and add them // hmedia: if the first package item is a folder, take this folder as the workflow package NodeRef nodeRef = new NodeRef(this.packageItemsToAdd.get(0)); QName type = getUnprotectedNodeService().getType(nodeRef); NodeRef workflowPackage; if (!getDictionaryService().isSubClass(type, ContentModel.TYPE_FOLDER)) workflowPackage= this.getWorkflowService().createPackage(null); else { workflowPackage= nodeRef; this.packageItemsToAdd.remove(0); }
if (this.getDictionaryService().isSubClass(type, ContentModel.TYPE_CONTENT) || this.getDictionaryService().isSubClass(type, ApplicationModel.TYPE_FILELINK)) { this.packageItemsToAdd.add(itemToWorkflow.toString()); }
// hmedia: added folder as content type if (this.getDictionaryService().isSubClass(type, ContentModel.TYPE_CONTENT) || this.getDictionaryService().isSubClass(type, ApplicationModel.TYPE_FILELINK) || this.getDictionaryService().isSubClass(type, ContentModel.TYPE_FOLDER)) { this.packageItemsToAdd.add(itemToWorkflow.toString()); }
BUILD FAILED C:\Desktop\Alfresco-3.3g\root\projects.xml:566: The following error occurred while executing this line: C:\Desktop\Alfresco-3.3g\root\macros.xml:59: Compile failed; see the compiler error output for details.
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.RangeCheck(ArrayList.java:547) at java.util.ArrayList.get(ArrayList.java:322) at org.alfresco.web.bean.workflow.StartWorkflowWizard.finishImpl(StartWorkflowWizard.java:198) at org.alfresco.web.bean.dialog.BaseDialogBean$1.execute(BaseDialogBean.java:118) at org.alfresco.web.bean.dialog.BaseDialogBean$1.execute(BaseDialogBean.java:114) at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:325) at org.alfresco.web.bean.dialog.BaseDialogBean.finish(BaseDialogBean.java:124) at org.alfresco.web.bean.wizard.WizardManager.finish(WizardManager.java:593)
The node's content is missing: node: workspace://SpacesStore/7c622eec-fa96-4c48-8547-9c0a6267fb77 reader: null Please contact your system administrator.
Please correct the errors below then click Finish. A system error happened during the operation: 10260023 This node is already being used as a workflow package! NodeRef: workspace://SpacesStore/7ea14a9c-f1d1-465d-82ef-7a98ff3f3feb