Hello,I am new advanced workflows and I cannot figure out how to rename a piece of content or a the parent space of a piece of content from within a workflow. I've tried this inside of my workflow
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<script>
<expression>
var Id = document.properties["ygrd:DocumentId"];
space.name = Id + " - " + space.name;
space.save();
</expression>
</script>
</action>
and get this error:
06:29:07,288 ERROR [graph.def.GraphElement] action threw exception: Failed to execute supplied script: Failed to execute supplied script: ReferenceError: "document" is not defined. (AlfrescoScript#1)
org.alfresco.service.cmr.repository.ScriptException: Failed to execute supplied script: Failed to execute supplied script: ReferenceError: "document" is not defined. (AlfrescoScript#1)
Any help or insight would be appreciated. Thank you.