IEventHandler - ISHPlugins.cIshShell
Technical reference about the cIshShell procedure and configuration
Overview
Provides the functionality to start an external process from within the Batch operations.
Algorithm / Process Flow
- Execute the supplied command value in a new Shell command (in background).
Configuration Options / Parameters
The background process to trigger the cIshShell is configured within the background task configuration which is accessible from the Content Manager web client using
<handler eventType="SYNCHRONIZETOLIVECONTENT">
<scheduler executeSynchronously="false" />
<authorization type="authenticationContext" />
<execution timeout="01:00:00" recoveryGracePeriod="00:10:00" isolationLevel="None" useSingleThreadApartment="true" />
<activator>
<comIEventHandler projectName="IshPluginsIso" className="cIshShell">
<configuration>
<parameters>
<parameter name="location" type="value">%ISHPROJECTDATAPATH%\SynchronizeToLiveContent</parameter>
<!-- 'Relative' path to powershell.exe because it is not located in the sysnative (e.g. %windir%\system32) folder, but a subfolder.
This allows powershell to run in 64-bit mode, which is required for Windows Server 2012. -->
<parameter name="command" type="value">WindowsPowershell\v1.0\powershell.exe -executionpolicy unrestricted -noninteractive -noprofile -sta -command "%ISHPROJECTAPPPATH%\Utilities\SynchronizeToLiveContent\SynchronizeToLiveContent.ps1"</parameter>
<parameter name="passauthenticationcontext" type="value">yes</parameter>
<parameter name="passeventprogressid" type="value">yes</parameter>
<parameter name="cleanup" type="value">yes</parameter>
<parameter name="eventmonitorprogressstatus" type="value">lastresult</parameter>
<parameter name="allowresendevent" type="value">yes</parameter>
</parameters>
</configuration>
</comIEventHandler>
</activator>
<errorHandler maximumRetries="10">
<actions>
<add errorNumber="*" action="Retry" delay="00:01:00" />
</actions>
</errorHandler>
</handler>
- location
-
File system path where the event data xml file can be found.
- command
- The command to be started as external process.
- command32
- The command to be started as external 32-bit process.
- passauthenticationcontext
- Boolean value to pass the Authentication Context of the logged in user to the external process. This parameter is optional, if not passed the Authentication Context is not passed on to the external process.
- passeventprogressid
- Boolean value to pass the unique Event Progress Id for the running process. This parameter is optional, if not passed the Event Progress Id is not passed on to the external process.
- cleanup
- Boolean value that indicates whether to remove the temporary eventdata file from the filesystem. This parameter is optional, if not passed the temporary eventdata file will be removed from the filesystem.
- eventmonitorprogressstatus
- Either "calculate" or "lastresult" can be used. When "calculate" is used, the event overview will take into account all event details (when one is "Failed", the event overview will report "Failed"). When "lastresult" is used the event overview will directly be set to last result, so either "Success" or "Failed". This parameter is optional, if not passed the event overview will use "calculate".
- allowresendevent
- Boolean value that indicates whether a "failed" event should be put on the queue again. If "yes", the event is retried indefinitely. If "no" or not passed, the event is only retried a limited number of times.
Known issues
If both command and command32 parameters are provided, first the command parameter will be used to verify whether it can be started, before the command32 parameter value is used.
Usage / Examples
Typical usage of this functionality includes
- PUBLISHINGPOSTPROCESSING
- ZIPFILES
- SYNCHRONIZETOLIVECONTENT
Revision information
Since SDL Trisoft 2011 (Infoshare 9.0.0) the command32 parameter value is available, in order to allow 32-bit application to run as 32-bit and not start its 64-bit variant.
Since SDL LiveContent Architect 2012 (InfoShare 10.0.0), passeventprogressid, cleanup, eventmonitorprogressstatus and allowresendevent parameters are available.
Since SDL LiveContent Architect 2014 (LiveContent 11.0.0), the configuration is moved from InfoShareConfig.xml to the background task configuration.