Import copy flow paths from XML file

Build 1501 on 14/Nov/2017  This topic last edited on: 21/Oct/2015, at 18:47

You can create copy flow paths in an XML file, for multiple groups, and then import them in the database in a single step.

This topic contains a sample XML file (courtesy Marco Rebasti) that you can edit and then import using cmd4 or srv4 import command, therefore

c:\tera\gn4\main\bin\cmd4.exe import <filepath> -userName xxxx -password yyyy

where xxxx is the name of a GN4 user who can logon to system with sufficient permissions to perform this operation and yyyy is the password.

Note: the above connects to the default connection: should you want to specify the connection or server name, see cmd4 examples.

Edit the attached file and change name of group and steps with folder paths.

    <item type="sendOn">

        <fromFolderRef objectType="folder">

          <keyVal>/JRC/2-Edit</keyVal>

        </fromFolderRef>

        <toFolderRef objectType="folder">

          <keyVal>/JRC/3-Copy Edit</keyVal>

        </toFolderRef>

      </item>

All is case sensitive.

The example is for the group with name “Editors” (<group name="Editors">) and it contains only the folders copy flow, but you can add ones for tasks, too.

You can add sections for other groups in the same file and import all at once.

Example

<?xml version="1.0" encoding="utf-8"?>

<objects>

 <group name="Editors">

   <copyFlow>

     <item type="start">

       <toFolderRef objectType="folder">

         <keyVal>/JRC/2-Edit</keyVal>

       </toFolderRef>

     </item>

     <item type="sendOn">

       <fromFolderRef objectType="folder">

         <keyVal>/JRC/2-Edit</keyVal>

       </fromFolderRef>

       <toFolderRef objectType="folder">

         <keyVal>/JRC/3-Copy Edit</keyVal>

       </toFolderRef>

     </item>

     <item type="sendBack">

       <fromFolderRef objectType="folder">

         <keyVal>/JRC/3-Copy Edit</keyVal>

       </fromFolderRef>

       <toFolderRef objectType="folder">

         <keyVal>/JRC/2-Edit</keyVal>

       </toFolderRef>

     </item>

     <item type="sendOn">

       <fromFolderRef objectType="folder">

         <keyVal>/JRC/1-Assignments</keyVal>

       </fromFolderRef>

       <toFolderRef objectType="folder">

         <keyVal>/JRC/2-Edit</keyVal>

       </toFolderRef>

     </item>

     <item type="sendBack">

       <fromFolderRef objectType="folder">

         <keyVal>/JRC/2-Edit</keyVal>

       </fromFolderRef>

       <toFolderRef objectType="folder">

         <keyVal>/JRC/1-Assignments</keyVal>

       </toFolderRef>

     </item>

   </copyFlow>

   <taskCopyFlow />

 </group>

</objects>