Can you schedule automated publication builds?

Is there a way to automatically generate output for a publication based on a schedule, for example nightly or weekly?  Furthermore, can the output from that build be automatically copied to a specified location?  

Parents
  • Hi Rhonda

    The APIs are all in place if you really need some custom flow as referenced by Charel.

    As a building block... What the business automation module ISHRemote (which uses the API) offers are functions to trigger a Publish (Publish-ISHPublicationOutput), check the publishing progress (Get-ISHPublicationOutput) and download the binary artefacts (Get-ISHPublicationOutputData) which in turn allows you to copy it.

    For the scheduling you can use any software (like Windows Scheduler) that triggers a PowerShell script.

    Besides that the ISHRemote code is publicly available as example code, see for example github.com/.../PublishIshPublicationOutput.cs
    A getting started with the PowerShell module is on github.com/.../ISHRemote
  • Hi Dave, I have created ticket[00341215 ] regarding this. I am trying to write PS script to use API and automate publishing for specific OutputFormat[Context Sensitive Help] . We are using ADFS authentication. When i run script getting below error. PS

    C:\PSScripts> .\sche-publication-output.ps1
    New-IshSession : The communication object, System.ServiceModel.Channels.ServiceChannel, cannot be used for communication because it is in the Faulted state.
    At C:\PSScripts\sche-publication-output.ps1:6 char:15
    + ... shSession = New-IshSession -IshUserName $username -IshPassword $passw ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (:) [New-IshSession], CommunicationObjectFaultedException
    + FullyQualifiedErrorId : NewIshSession,Trisoft.ISHRemote.Cmdlets.Session.NewIshSession

    Publish-IshPublicationOutput : Cannot validate argument on parameter 'IshSession'. The argument is null or empty. Provide an argument that is not null or empty, and then try
    the command again.
    At C:\PSScripts\sche-publication-output.ps1:7 char:56
    + $ishobjects = Publish-IshPublicationOutput -IshSession $ishSession `
    + ~~~~~~~~~~~
    + CategoryInfo : InvalidData: (:) [Publish-IshPublicationOutput], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationError,Trisoft.ISHRemote.Cmdlets.PublicationOutput.PublishIshPublicationOutput


    PS Script:
    $username = 'Admin'
    $password = 'admin-password'
    $url = 'stage-kc.com/.../'
    Import-Module ISHRemote

    $ishSession = New-IshSession -IshUserName $username -IshPassword $password -WsBaseUrl $url
    $ishobjects = Publish-IshPublicationOutput -IshSession $ishSession `
    -LogicalId "GUID-DE68A5A1-847E-480F-AF74-682A70F598BC" `
    -Version "1" `
    -OutputFormat "Context Sensitive Help" `
    -LanguageCombination "en-US"


    Please let me know am i missing anything here.
Reply
  • Hi Dave, I have created ticket[00341215 ] regarding this. I am trying to write PS script to use API and automate publishing for specific OutputFormat[Context Sensitive Help] . We are using ADFS authentication. When i run script getting below error. PS

    C:\PSScripts> .\sche-publication-output.ps1
    New-IshSession : The communication object, System.ServiceModel.Channels.ServiceChannel, cannot be used for communication because it is in the Faulted state.
    At C:\PSScripts\sche-publication-output.ps1:6 char:15
    + ... shSession = New-IshSession -IshUserName $username -IshPassword $passw ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (:) [New-IshSession], CommunicationObjectFaultedException
    + FullyQualifiedErrorId : NewIshSession,Trisoft.ISHRemote.Cmdlets.Session.NewIshSession

    Publish-IshPublicationOutput : Cannot validate argument on parameter 'IshSession'. The argument is null or empty. Provide an argument that is not null or empty, and then try
    the command again.
    At C:\PSScripts\sche-publication-output.ps1:7 char:56
    + $ishobjects = Publish-IshPublicationOutput -IshSession $ishSession `
    + ~~~~~~~~~~~
    + CategoryInfo : InvalidData: (:) [Publish-IshPublicationOutput], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationError,Trisoft.ISHRemote.Cmdlets.PublicationOutput.PublishIshPublicationOutput


    PS Script:
    $username = 'Admin'
    $password = 'admin-password'
    $url = 'stage-kc.com/.../'
    Import-Module ISHRemote

    $ishSession = New-IshSession -IshUserName $username -IshPassword $password -WsBaseUrl $url
    $ishobjects = Publish-IshPublicationOutput -IshSession $ishSession `
    -LogicalId "GUID-DE68A5A1-847E-480F-AF74-682A70F598BC" `
    -Version "1" `
    -OutputFormat "Context Sensitive Help" `
    -LanguageCombination "en-US"


    Please let me know am i missing anything here.
Children
  • Dear Sravan,

    Looking at the information and the script snippet you provided I think you can solve your issue by removing the -IshUserName and -IshPassword from the New-IshSession command.

    Some background reasoning why I propose this:

    - You state in your question that you are using ADFS authentication. This means that you will log on with the credentials you used to logon to your operating system. So you should not provide any username/password.

    - Using the Get-Help New-IshSession command in a powershell script window shows that the command can be invoked using only the -WsBaseUrl argument. This is referenced as the ActiveDirectoryAuthGroup arguments.

    You can see this in the screenshot below

    Screenshot of Trados Studio PowerShell script window showing the Get-Help New-IshSession command output with ActiveDirectoryAuthGroup arguments highlighted.

    I hope this helps resolving your issue

    Kind Regards,

    Raf

    emoji


    Generated Image Alt-Text
    [edited by: Trados AI at 6:30 AM (GMT 0) on 5 Mar 2024]