javascriptjavafunctionpolarion

Polarion SDK: Set document name in workflow context


I am trying to set the document ID from ScriptFunction. I tried:

workflowContext.getTarget().setId("Demo");

But it is not working


Solution

  • You cannot set an Id of a IWorkflowObject. you may want use the IModule.move(java.lang.String newModuleFolder, java.lang.String newModuleName) function.

    see sdk doc here: https://almdemo.polarion.com/polarion/sdk/doc/javadoc/com/polarion/alm/tracker/model/IModule.html#move(java.lang.String,java.lang.String)

    Due to the nature of the SVN storage it may not work but breaks with a broken transaction.

    I cannot test it at the moment.