Documentation Center

IPublishPostProcessPlugin - IshSaveFilesToRunLegacyScripts

Saves the files that serve as input to the old legacy publish scripts. This includes: A job specification file, a legacy report (per language), an output format metadata file (per language), and optionally a publication output metadata file (per language).

Plugin Input

Plugin configuration parameters
ParameterRequiredDefault valueAllowed valuesDescription
JobSpecLocationNoEmpty stringValid file path.Path to the file system folder where the job spec XML will be store stored.
If the publish does a compare the following items are excepted in the context.Items collection:
Item KeyRequiredDefault valueItem Value TypeDescription
CurrentVersionWorkingDirectoryYes (if compare) string

The full path to the working directory of the current version.

For example: %ISHPROJECTDATAPATH%\Publish\Data\[GENERATEDFOLDERNAME]\workcur\7\en

CompareVersionWorkingDirectoryYes (if compare) string

The full path to the working directory of the compare version.

For example: %ISHPROJECTDATAPATH%\Publish\Data\[GENERATEDFOLDERNAME]\workcmp\6\en

Plugin Outcome

Changes made to the file system:
  • A job specification XML file is saved in the work directory with the name ishjobticket.xml
  • Optionally, if the JobSpecLocation is not empty, a job specification XML file will be saved to the JobSpecLocation folder.
  • For every published language, a [GUIDOfObjectPublished].report.xml will be saved in the corresponding language folder.
  • For every published language, an output format metadata file outputformat.met will be saved in the corresponding language folder.
  • If the publish was started from a publication output, for every published language, a publication output metadata file [GUIDOfPublication].met will be saved in the corresponding language folder.

Values set in the context as a result: None

Values set in the context.Items collection as a result:
Item KeyTypical ValueItem Value TypeDescription
JobSpecFilePath%ISHPROJECTDATAPATH%\Publish\Data\[GENERATEDFOLDERNAME]\work\ishjobticket.xml stringPath to the file system folder where the job spec XML will be store stored.

plugin name="ISHSAVEFILESTORUNLEGACYSCRIPTS" example


<plugin name='ISHSAVEFILESTORUNLEGACYSCRIPTS' handler='IshSaveFilesToRunLegacyScripts'>
  <description>
     Saves the files required for the legacy publish scripts (including job specification, legacy report files (1 per language), 
     outputformat metadata file (1 per language), a publication output metadata file (1 per language))
  </description>
	 <initialize />
</plugin>

Job specification XML structure

Filename example: ishjobticket.xml.


<job-specification combinelanguages="no" comparewitholderversion="no">
  <parameter name="outputformat">PDF (A4 Manual)</parameter>
  <parameter name="required-resolution">Low</parameter>
  <parameter name="output-fileextension">pdf</parameter>
  <parameter name="export-document-type">ISHPublication</parameter>
  <parameter name="export-document-level">lng</parameter>
  <parameter name="export-document">GUID-789BBB3D-8A09-4916-8857-09A246CB6F59</parameter>
  <parameter name="event-identifier">PUBLISH MECDEVAPP01 20160829114036845 886954601</parameter>
  <parameter name="event-name">PUBLISH</parameter>
  <parameter name="start-date">20160829111436</parameter>
  <parameter name="publisher">admin</parameter>
  <parameter name="email-address"/>
  <parameter name="export-report">GUID-789BBB3D-8A09-4916-8857-09A246CB6F59.report.xml</parameter>
  <parameter name="export-ishlngref">1323529</parameter>
  <parameter name="releasecandidate">yes</parameter>
  <parameter name="export-start-document">GUID-C9CA7357-CBA3-43B3-A4B2-B977AD1B7D1E</parameter>
  <parameter name="export-resources">GUID-8C023953-0F7C-4986-9DE2-568FF183FC25, GUID-9E48AEC2-2AF4-444A-85C2-A96EE537A340</parameter>
  <parameter name="baseline-name">Publication MP330-v3-GUID-789BBB3D-8A09-4916-8857-09A246CB6F59-2016/02/10 10:29:49</parameter>
  <parameter name="export-path">D:\InfoShare\Data\Publish\Data\dhp4dhdfa13\3\en</parameter>
  <parameter name="resourcelanguage">en</parameter>
  <parameter name="language">en</parameter>
</job-specification>

Report XML structure

Filename example: report.xml


<export-report language="de" start-document-id="GUID-948607D2-1F33-43B4-B145-0E19594AA808">
	<object-report ishtype="ISHMasterDoc" ishlogicalref="328908" ishversionref="328910" ishlngref="328911" ishref="GUID-948607D2-1F33-43B4-B145-0E19594AA808" 
     object-title="BookMap The Smurfs" lng="de" fallback-lng="en" status="translation-missing" defined-in-baseline="yes" doc-valid-against-dtd="yes" 
     filename="GUID-948607D2-1F33-43B4-B145-0E19594AA808.xml" version="1" objectstatus="Draft">
		<link-start target-valid="yes" ref="GUID-5293EEA6-6DAF-407E-924A-D9F810B396C9">GUID-5293EEA6-6DAF-407E-924A-D9F810B396C9#GUID-5293EEA6-6DAF-407E-924A-D9F810B396C9</link-start>
		<link-start target-valid="yes" ref="GUID-3560EB2C-207B-4C08-94F1-08B815DFCF85">GUID-3560EB2C-207B-4C08-94F1-08B815DFCF85#GUID-3560EB2C-207B-4C08-94F1-08B815DFCF85</link-start>
		<link-start target-valid="yes" ref="GUID-423EC461-8E8E-45A0-98A2-2E639FD85AD1">GUID-423EC461-8E8E-45A0-98A2-2E639FD85AD1#GUID-423EC461-8E8E-45A0-98A2-2E639FD85AD1</link-start>
		<link-start target-valid="yes" ref="GUID-B1B33A17-3522-498D-B4F4-CFAA7032F9EF">GUID-B1B33A17-3522-498D-B4F4-CFAA7032F9EF#GUID-B1B33A17-3522-498D-B4F4-CFAA7032F9EF</link-start>
		<link-start target-valid="yes" ref="GUID-31AD7404-DB60-484D-9EC7-D039C6A25C44">GUID-31AD7404-DB60-484D-9EC7-D039C6A25C44#GUID-31AD7404-DB60-484D-9EC7-D039C6A25C44</link-start>
		<link-start target-valid="yes" ref="GUID-AD77DCC5-E431-4639-B900-8E7E3981DF9C">GUID-AD77DCC5-E431-4639-B900-8E7E3981DF9C#GUID-AD77DCC5-E431-4639-B900-8E7E3981DF9C</link-start>
		<link-start target-valid="yes" ref="GUID-3F15CB16-492C-415B-A7FC-E6A35D336442">GUID-3F15CB16-492C-415B-A7FC-E6A35D336442#GUID-3F15CB16-492C-415B-A7FC-E6A35D336442</link-start>
		<targets>
			<block id="GUID-948607D2-1F33-43B4-B145-0E19594AA808">
				<element id="GUID-ED6EAB92-84A4-43DB-8F9A-63D16861A045"/>
			</block>
		</targets>
	</object-report>
	<object-report ishtype="ISHModule" ishlogicalref="328897" ishversionref="328899" ishlngref="328902" ishref="GUID-5293EEA6-6DAF-407E-924A-D9F810B396C9" 
     object-title="Introduction The Smurfs" lng="de" fallback-lng="en" status="translation-missing" defined-in-baseline="yes" doc-valid-against-dtd="yes" 
     filename="GUID-5293EEA6-6DAF-407E-924A-D9F810B396C9.xml" version="1" objectstatus="Draft">
		<hyperlink-start target-valid="yes" ref="GUID-3560EB2C-207B-4C08-94F1-08B815DFCF85#GUID-3560EB2C-207B-4C08-94F1-08B815DFCF85/GUID-2052A7C5-B863-4086-AE4E-57A8D501D757">GUID-3560EB2C-207B-4C08-94F1-08B815DFCF85#GUID-3560EB2C-207B-4C08-94F1-08B815DFCF85/GUID-2052A7C5-B863-4086-AE4E-57A8D501D757</hyperlink-start>
		<conref-start target-valid="no" conref="GUID-3560EB2C-207B-4C08-94F1-08B815DFCF85#GUID-BC1C572E-5859-4639-B57D-9404ACB1F896/GUID-5544F5C1-7FF9-4FDD-94D9-E485AE6D4AD1">GUID-3560EB2C-207B-4C08-94F1-08B815DFCF85#GUID-BC1C572E-5859-4639-B57D-9404ACB1F896/GUID-5544F5C1-7FF9-4FDD-94D9-E485AE6D4AD1</conref-start>
		<conref-start target-valid="no" conref="GUID-5293EEA6-6DAF-407E-924A-D9F810B396C9#GUID-5293EEA6-6DAF-407E-924A-D9F810B396C9/GUID-120106EA-E9FA-4B54-93C8-1CD34F9DF840">GUID-5293EEA6-6DAF-407E-924A-D9F810B396C9#GUID-5293EEA6-6DAF-407E-924A-D9F810B396C9/GUID-120106EA-E9FA-4B54-93C8-1CD34F9DF840</conref-start>
		<targets>
			<block id="GUID-5293EEA6-6DAF-407E-924A-D9F810B396C9">
				<element id="GUID-AC71D39C-562D-4511-B7FE-5261A9781313"/>
				<element id="GUID-6115FF63-C957-4514-841D-6FB64734088C"/>
				<element id="GUID-E697D8EC-D71B-4408-ADB8-D752D74BB102"/>
			</block>
		</targets>
	</object-report>
 ...
</export-report>

Plugin flow

IshSaveFilesToRunLegacyScripts does the following:
  • Assembles a job specification XML structure using the information available in the PublishPostProcessContext and the saved PublishPostProcessContext.ContextFile and saves it to the file system.
  • For every language, creates a report XML structure starting from the PublishPostProcessContext.ReportItems and saves it to the corresponding language folder.
  • For every language, copies the Context.OutputFormatFile obtained via the PublishPostProcessContext.ContextFile to an outputformat.met file and saves it to the corresponding language folder.
  • For every language, copies the PublishPostProcessContext.PublicationOutputMetadataFile to a [GUIDOfPublication].met file and saves it to the corresponding language folder.
  • JobSpecFilePath of the context.Items is set.