19 Content Merge Services
This chapter covers the following topics:
19.1 About Content Merge Services
Note:
Content Merge service is only applicable for WebCenter Content on OCI Marketplace release.
Information about what is a WebCenter Content service and how services can be used is provided in Using Services. Information about basic services structure, attributes, actions, and a service example is provided in Customizing Services. You should be familiar with this information before customizing current services or creating new services.
The ContentMerge component provides asynchronous PDF merge capability using Oracle Outside In Technology (OIT). It exposes services for submitting a merge request and retrieving merge job status.
The locations for specific Content Merge services are listed within each individual service.
19.2 Configuration Variables
The following configuration variables can be set by consumers, typically in config.cfg, to control ContentMerge behavior.
-
ContentMergeOutputBaseDir: Base directory used for writing output produced during content merge processing. If not configured, ContentMerge uses the JVM temporary directory. In clustered environments, the configured directory must be a shared directory location accessible to all cluster nodes participating in ContentMerge processing.
-
ContentMergeOitFontPath: Comma-separated list of font directories passed to Oracle Outside In Technology (OIT). Blank entries are ignored. When not configured, OIT falls back to OS-default fonts if available.
-
ContentMergeMergeWorkerThreads: Number of worker threads used for merge processing. Default value: 5.
-
ContentMergeCheckinWorkerThreads: Number of worker threads used for check-in processing. Default value: 5.
-
ContentMergePollIntervalMillis: Polling interval, in milliseconds, used by background processing. Default value: 10000.
-
ContentMergeMaxDocsPerJob: Maximum number of source documents permitted in a single merge request. Default value: 50.
Note:
ContentMergeMergeWorkerThreads and ContentMergeCheckinWorkerThreads are fixed configuration values. They are not auto-scaled from available CPU cores and directly cap concurrent merge and check-in worker executions.
Note:
Make sure ContentMergeOutputBaseDir and ContentMergeOitFontPath are set appropriately for your environment so that Content Merge can function properly. In particular, ensure the output directory is writable and, in clustered deployments, shared across participating nodes, and ensure the configured OIT font directories are valid on the host where merge processing runs.
Note:
Example ContentMergeOitFontPath values include ContentMergeOitFontPath=/usr/share/fonts,/usr/local/share/fonts on Unix and ContentMergeOitFontPath=C:\Windows\Fonts,D:\AppFonts on Windows.
19.3 MERGE_DOCS
Service that creates an asynchronous PDF merge job for one or more source content items.
Location: IdcHomeDir/components/ContentMerge/resources/contentmerge_service.htm
Additional Required Service Parameters
-
dIds: Comma-separated list of source content item dID values to merge.
-
dSecurityGroup: Security group for the merged output content item.
-
dDocTitle: Title for the merged output content item.
Optional Service Parameters
-
ranges: Comma-separated page range expressions corresponding to the input documents. If not provided, the service uses ALL.
-
dDocAccount: Account for the merged output content item when accounts are enabled.
-
xUserACL, xAliasACL, xRoleACL: Entity security metadata for the merged output content item when entity security is enabled.
-
mergeRequestJson: JSON request payload containing dIds, ranges, and a metadata object. When this parameter is provided, it is used as the input source for the merge request.
-
Additional standard metadata fields, including custom x* fields, may be supplied for the merged output content item.
Note:
The service validates that the requesting user has read access to each source content item and sufficient privilege to check in the merged result using the target security metadata.
Note:
The merge request is processed asynchronously by background workers. A successful service call queues the job and returns a job identifier; it does not wait for the final merged document to be checked in.
Output
-
jobId: Unique identifier for the queued merge job.
-
StatusCode: 0 for success, -1 for failure.
-
StatusMessage: Service status text. On success, the initial job status is typically QUEUED.
-
errorMsg: Detailed error text when the request fails validation or processing.
Example
IdcService=MERGE_DOCS &dIds=123,456 &ranges=1-3,5-10 &dSecurityGroup=Public &dDocTitle=merged
JSON Input Example
IdcService=MERGE_DOCS
&mergeRequestJson={"dIds":["123","456"],"ranges":["1-3","5-10"],"metadata":{"dSecurityGroup":"Public","dDocTitle":"merged","xProjectCode":"PRJ001"}}
19.4 GET_DOCS_MERGE_STATUS
Service that returns the current status of a previously created ContentMerge job.
Location: IdcHomeDir/components/ContentMerge/resources/contentmerge_service.htm
Additional Required Service Parameters
-
jobId: Unique identifier of the merge job returned by MERGE_DOCS.
Output
-
jobId: Merge job identifier supplied in the request.
-
StatusCode: 0 for success, -1 for failure.
-
StatusMessage: Current job status. Typical values include QUEUED, MERGED, COMPLETED, and failure states.
-
dDocName: Name of the merged content item when check-in has completed successfully.
-
errorMsg: Detailed error text when the job fails or the request is invalid.
Example
IdcService=GET_DOCS_MERGE_STATUS &jobId=<jobId>