This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Apply syncproject patches with SynchronizationEditor.CLI.exe

Is it possible to apply patches for sync project with SynchronizationEditor.CLI.exe?

We have 7.1.3

  • There is no option in 7.1.3.

    Starting with 8.0 you have the option to patch sync projects using the parameter --PatchShell.

    Synchronization Editor Command Line Interface V8.0.2017.1104

    Usage:

      SynchronizationEditor.CLI.exe <Command> {<Options>} {<Parameter>}
      SynchronizationEditor.CLI.exe (--CreateShell) {-(V|?|H)} [/Workspace=<Definition.xml>] {/SetParam <Name=Wert>}

    Examples:

      SynchronizationEditor.CLI.exe --CreateShell -S /Workspace ActiveDirectory.sews
      SynchronizationEditor.CLI.exe --CreateShell -S /Workspace ActiveDirectory.sews /SetParam Password=<password>

    Commands: (case sensitive)

      --CreateShell  Creates a new synchronization project (shell) based on the definition provided by parameter /Workspace.
      --CS           Short for --CreateShell.
      --PatchShell   Applies patches on a synchronization project (shell).
      --PS           Short for --PatchShell.

    Options:

      -?|H   Displays this help.
      -Q     Quite mode. Do not ask for confirmation of irreversible actions.
      -V     Verbose mode.
      -S     Save results to database.

    Parameters: (case sensitive)

      /Workspace  Full qualified or relative path to the sews-file which contains the definition of the workspace to use.
      /SetParam  Defines the value of a workspace defined parameter. An existing value will be overwritten. Format: Name=Value

    Done.

    To apply a number of patches, your workspace files needs to contain a ShellPatchEditor. The following XML snippet demonstrates this.

        <Editors>
            <Editor Name="ShellPatchEditor" Type="VI.Projector.Editor.AppModel.Editors.ShellPatchEditor, VI.Projector.Editor">
                <Data Name="PatchesToApply" Display="Patches to apply" Type="System.String, mscorlib">$Patches$</Data>
            </Editor>
        </Editors>

    A sample command-line would look like

    SynchronizationEditor.CLI.exe --PatchShell /Workspace D:\ShellPatchVariable.sews

    A sample workspace file that would ask you for the patches to apply looks like

    <?xml version="1.0" encoding="utf-8"?>
    <SynchronizationEditorWorkspace Version="1.0">
        <Parameters>
            <Parameter Name="DBHost" Display="OneIM database server" IsQueryParameter="True"></Parameter>
            <Parameter Name="DBCatalog" Display="OneIM database name" IsQueryParameter="True">OneIM</Parameter>
            <Parameter Name="DBUser" Display="OneIM database user" IsQueryParameter="True"></Parameter>
            <Parameter Name="DBPassword" Display="OneIM database password" IsQueryParameter="True" IsSecret="True"/>
            <Parameter Name="Shell" Display="UID of the synchronization project" IsQueryParameter="True"/>
            <Parameter Name="Patches" Display="Comma separated list of patches to apply" IsQueryParameter="True"/>
        </Parameters>
        <Global>
            <Data Name="WorkDatabase.ConnectionString" Display="Connection string" Type="System.String, mscorlib">data source=$DBHost$;initial catalog=$DBCatalog$;user id=$DBUser$;pooling=False;asynchronous processing=True;Password=$DBPassword$</Data>
            <Data Name="WorkDatabase.AuthenticationString" Display="Authentication string" Type="System.String, mscorlib">Module=DialogUserAccountBased</Data>
            <Data Name="WorkDatabase.DatabaseFactory" Display="Database factory" Type="System.String, mscorlib">VI.DB.ViSqlFactory, VI.DB</Data>
            <Data Name="LoadedShell.Uid" Display="Loaded shell" Type="System.String, mscorlib">$Shell$</Data>
        </Global>
        <Editors>
            <Editor Name="ShellPatchEditor" Type="VI.Projector.Editor.AppModel.Editors.ShellPatchEditor, VI.Projector.Editor">
                <Data Name="PatchesToApply" Display="Patches to apply" Type="System.String, mscorlib">$Patches$</Data>
            </Editor>
        </Editors>
    </SynchronizationEditorWorkspace>