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
| Parameter | Required | Default value | Allowed values | Description |
|---|---|---|---|---|
| JobSpecLocation | No | Empty string | Valid file path. | Path to the file system folder where the job spec XML will be store stored. |
compare the following items are excepted in the context.Items collection:
| Item Key | Required | Default value | Item Value Type | Description |
|---|---|---|---|---|
| CurrentVersionWorkingDirectory | Yes (if compare) | string | The full path to the working directory of the current version. For example: %ISHPROJECTDATAPATH%\Publish\Data\[GENERATEDFOLDERNAME]\workcur\7\en | |
| CompareVersionWorkingDirectory | Yes (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
- 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
context.Items collection as a result:
| Item Key | Typical Value | Item Value Type | Description |
|---|---|---|---|
| JobSpecFilePath | %ISHPROJECTDATAPATH%\Publish\Data\[GENERATEDFOLDERNAME]\work\ishjobticket.xml | string | Path 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
PublishPostProcessContextand the savedPublishPostProcessContext.ContextFileand saves it to the file system. - For every language, creates a report XML structure starting from the
PublishPostProcessContext.ReportItemsand saves it to the corresponding language folder. - For every language, copies the
Context.OutputFormatFileobtained via thePublishPostProcessContext.ContextFileto anoutputformat.metfile and saves it to the corresponding language folder. - For every language, copies the
PublishPostProcessContext.PublicationOutputMetadataFileto a [GUIDOfPublication].met file and saves it to the corresponding language folder. JobSpecFilePathof thecontext.Itemsis set.