Embedded Actions in Object XML - Web Services - Foundation 23.2 - Foundation 23.2 - Ready - Content Composer - external

Content Composer Web Services

Platform
Content Composer
Product
Web Services
Release
Foundation 23.2
License

If specific object properties are set with the command Set_Structure, then bundle and document actions can also be executed.

Note: For dynamically inserted documents and text blocks, the automatically assigned reference string on insert corresponds to a negative number.

Attribute Description

Attribute Description

Action

includeDoc: Insert a new document into the bundle. (Business User document)

includeBlock: Dynamic text block insertion into a bundle document

move: Move existing object (business user documents and text blocks).

delete: Delete inserted object (business user documents and text blocks).

loadexternaldocument: Load / remove external document

target_reference

Object reference index in the tree determining the insert position.

If this value is not specified, the object is inserted at the end.

position

after: Object is inserted after the target_reference.

before: Object is inserted before the target_reference.

name

Name of the object to be inserted, or for loadexternaldocument the unique name of the file that has already been uploaded or an empty string to remove the external document again.

reference

For the actions Move/Delete, the reference of the object to be moved/deleted. For the action loadexternaldocument, the reference of the object for which the external document is to be loaded/removed.

doc_reference

Reference of the document in which the text block is to be dynamically inserted.

Notes

  • Ensure that the specified file for the action loadexternaldocument with the attribute name has already been uploaded to the server via the method Doc_SetFile_Mime.
  • Tthe Client must specify a unique name for the file to prevent an existing file with the same name from being overwritten.
  • If an external file should be removed again, the action loadexternaldocument must be executed using an empty string as value for the attribute name.

Example of Using Actions

Insert a document

<mws type="OBJECT">
   <process>
      <object action="includedoc" name="TestDocument" target_reference="" position="after"/>
   </process>
</mws>

Move a document

<mws type="OBJECT">
   <process>
      <object action="move" reference="-3" target_reference="-1" position="before"/>
   </process>
</mws>

Delete a document

<mws type="OBJECT">
   <process>
      <object action="delete" reference="-1"/>
   </process>
</mws>

Insert text block (no target object)

<mws type="OBJECT">
   <process>
      <object action="includeblock" name="DynBst1" doc_reference="-1" target_reference="-1" position="unknown" />
   </process>
</mws>

Insert text block (before target object)

<mws type="OBJECT">
   <process>
      <object action="includeblock" name="DynBlock1" doc_reference="-1" target_reference="-1" position="unknown" />
   </process>
</mws>

Move a text block

<mws type="OBJECT">
   <process>
      <object action="move" reference="-1:-2" target_reference="-1:-1" position="after"/>
   </process>
</mws>

Delete a text block

<mws type="OBJECT">
   <process>
      <object action="delete" reference="-1:-2"/>
   </process>
</mws>

Set external document for a text block

The specified file must have already been uploaded to the server by the Client (method: Doc_SetFile_Mime).

<mws type="OBJECT">
  <process>
     <object action="loadexternaldocument" name="MyExternalBlockDocument.docx" reference="9BD927E4-39CC-4217-90D1-38C3B15F4CED:35E5A161-D291-4244-84FF-6CB30F14D1A0" />
  </process>
</mws>

Remove external document from a text block

<mws type="OBJECT">
   <process>
      <object action="loadexternaldocument" name="" reference="9BD927E4-39CC-4217-90D1-38C3B15F4CED:35E5A161-D291-4244-84FF-6CB30F14D1A0" />
   </process>
</mws>

Setting an external document for a document

The specified file must have already been uploaded to the server by the Client (method: Doc_SetFile_Mime).

<mws type="OBJECT">
   <process>
      <object action="loadexternaldocument" name=”MyExternalStaticDocument.pdf" reference="C6D5FD76-516C-482E-AAA6-9E51BE8BD2E2" />
   </process>
</mws>

Removing an external document from a document

<mws type="OBJECT">
   <process>
      <object action="loadexternaldocument" name=”" reference="C6D5FD76-516C-482E-AAA6-9E51BE8BD2E2" />
   </process>
</mws>