Aspose connector

The Aspose connector is used to generate docx and pdf files using an Aspose template and metadata map. The generated document is saved to the Alfresco Content Services repository folder that corresponds to the process instance ID that called the connector in the following format:

<application-name> Site / Document Library / <process-instance-id> / <service-task-id> / <generated-document>

Important: The Aspose connector requires a licensed version of Alfresco Content Services (ACS) deployed to interact with.

The Aspose connector is graphically represented by the Aspose logo next to a document under the OOTB Connectors menu whilst modeling a process.

The implementation value of the Aspose connector in a service task would be similar to the following:

<bpmn2:serviceTask id="ServiceTask_1jas8cr" implementation="asposeConnector.GENERATE" />

Template configuration

The Aspose connector uses a process variable of type JSON to insert values into a pre-configured template. The input parameter that contains the information is called metadata.

An example of the metadata input parameter is the following:

{
"iceCream": {
    "flavor":"Mint"
    },
"timeOfYear": {
    "season":"Summer"
    }
}

The Aspose template itself uses the following format to import values from the metadata JSON into a document:

Current season: <<[timeOfYear.get("season")]>>
Flavor of the month: <<[iceCream.get("flavor")]>>

Input parameters

The following are the parameters that can be passed to the Aspose connector as input parameters using the GENERATE action:

ParameterDescriptionTypeRequired?
nodeIdThe node ID of the template to use from Alfresco Content ServicesString*
uriThe URI of the template to useString*
filesA file uploaded in a process and set as a process variable or uploaded as part of a form or another connector to use as the templateFile*
metadataThe metadata to use in the template. If no value for metadata is passed then the inbound variable map will be used in the templateJSONNo
outputFormatFormat to save the output document in. Values are DOCX or PDFStringYes
outputFileNameThe name of the generated fileStringNo
targetFileAn existing file to overwrite with the generated documentFileNo
parentFolderThe node ID of the folder to store the generated document in. If this value is set, the generated document will be output here and not to the default process instance folder for the process instanceStringNo

* One of these parameters is required.

Output parameter

The following is the parameter that is returned to the process by the Aspose connector as an output parameter using the GENERATE action:

ParameterDescriptionType
docgen.resultThe generated documentFile
docgen.errorA list of errors if any are caught by the connectorString

Configuration parameters

Values for configuration parameters that are specific to a connector instance can be set in the modeling application or during application deployment.

The following are the configuration parameters that need to be set for the Aspose connector:

ParameterDescriptionRequired?
ALFRESCO_CONTENT_REPO_BASE_URLThe base URL of the Content Services deployment

`

© 2023 Alfresco Software, Inc. All Rights Reserved.