Content connector

The content connector is used to execute actions against the Content Services repository. The actions available involve creating, selecting, updating and managing content throughout a process. The content can be uploaded as part of the process, retrieved from the repository or stored in the repository.

All content connector actions are displayed on the process diagram with the Alfresco logo.

Create a content connector task

Content connectors are stored separately in the palette from other connectors. To create a content connector:

  1. Sign into the Modeling Application and open a project and process.

  2. Click the Alfresco logo in the tool palette and select the content action.

  3. The option to use an existing instance of the connector or create a new one will display.

    • Create a new instance if it is the first time using the content connector within the project and give it a name.

    • Select an existing instance if the content connector has already been used within the project.

  4. Drag the action onto the diagram canvas and fill in the properties.

Note: The content connector does not have any configuration parameters as it connects directly to the Content Services repository. This means that only a single instance of the connector is required per project.

Properties

The content connector is implemented as a service task. All the properties available to a service task are those required by the content connector. The three most important ones to understand for the content connector are:

PropertyDescription
ImplementationRequired. Displays the name of the connector the task is using. This will be the name chosen when creating a connector instance.
ActionRequired. Selects which action the content connector task should execute, for example SELECT_FILE.
Mapping typeRequired. Sets how data should be passed between the connector and the process by mapping the input and output parameters. For example, setting the details of the file to select and which process variable will store it.

Parameter precedence

When using actions to manage content within a process it is important to understand the precedence of their parameters.

Files and folders can all be selected in multiple ways for each action. The following order dictates which parameter will be used if multiple parameters are passed to the content connector:

nodeId / fileId / folderId file / folder path / filePath / folderPath searchQuery

If an action can take a file or a folder as an input and both are filled in, the file will take precedence over the folder.

Create actions

Create actions are used to create a new file or folder to store in the repository, reuse in another task within the process, or both.

The create actions are:

Create file

The CREATE_FILE action is used to create a new file.

The input parameters to create a file are:

ParameterTypeDescription
fileNameStringRequired. A name for the file to be created.
targetFolderFolderRequires one. A variable of type folder to create the new file in.
targetFolderIdStringRequires one. The nodeId of the folder to create the new file in. For example 775a8f2d-8123-49a7-ae1f-f3f49d4eae20.
targetFolderPathStringRequires one. The location path or relative path of the folder to create the new file in. For example, a location path: /app:company_home/app:user_homes/cm:hruser and a relative path: /User Homes/hruser.
autorenameBooleanOptional. If set to true, the new file will have an integer added to its name if a file already exists with the same fileName.
targetFileTypeContent-TypeOptional. The type to set the new file as, for example fin:invoice.
targetFileMetadataContent-MetadataOptional. Metadata to store with the new file. This is a JSON object of key value pairs. See below for an example.
underscoreMetadataBooleanOptional. If set to true, the input targetFileMetadata can have its namespace prefixes written with _ instead of :, for example cm_title instead of cm:title. The output response will also have its prefixes replaced. This allows the JSON to be used in an expression, for example ${metadata.cm_title}, whereas ${metadata.cm:title} is not valid.

Note: underscoreMetadata can be set to true and the targetFileMetadata input can still use : with the connector successfully executing the action. If underscoreMetadata is set to false and targetFileMetadata uses _ then the connector will fail to execute the action.

An example of the targetFileMetadata that can be sent with the file is:

{
"ahr:contract-type": "Full Time",
"ahr:full-name": "John Doe",
"ahr:role": "Developer"
}

The output parameters from creating a file are:

ParameterTypeDescription
responseJSONOptional. The response from the call creating the folder.
fileFileOptional. The created file available to be mapped to a variable.

Create folder

The CREATE_FOLDER action is used to create a new folder.

The input parameters to create a folder are:

ParameterTypeDescription
folderNameStringRequired. A name for the folder to be created.
targetFolderFolderRequires one. A variable of type folder to create the new folder in.
targetFolderIdStringRequires one. The nodeId of the folder to create the new folder in. For example 775a8f2d-8123-49a7-ae1f-f3f49d4eae20.
targetFolderPathStringRequires one. The location path or relative path of the folder to create the new folder in. For example, a location path: /app:company_home/app:user_homes/cm:hruser and a relative path: /User Homes/hruser.
autorenameBooleanOptional. If set to true, the new folder will have an integer added to its name if a folder already exists with the same folderName.
targetFolderTypeContent-TypeOptional. The type to set the new folder as.
targetFolderMetadataContent-MetadataOptional. Metadata to store with the new folder. This is a JSON object of key value pairs. See below for an example.
underscoreMetadataBooleanOptional. If set to true, the input targetFolderMetadata can have its namespace prefixes written with _ instead of :, for example cm_title instead of cm:title. The output response will also have its prefixes replaced. This allows the JSON to be used in an expression, for example ${metadata.cm_title}, whereas ${metadata.cm:title} is not valid.

Note: underscoreMetadata can be set to true and the targetFolderMetadata input can still use : with the connector successfully executing the action. If underscoreMetadata is set to false and targetFolderMetadata uses _ then the connector will fail to execute the action.

An example of the targetFolderMetadata that can be sent with the folder is:

{
"ahr:contract-type": "Full Time",
"ahr:full-name": "John Doe",
"ahr:role": "Developer"
}

The output parameters from creating a folder are:

ParameterTypeDescription
responseJSONOptional. The response from the call creating the folder.
folderFolderOptional. The created folder available to be mapped to a variable.

Select actions

Select actions are used to select a file, a files content, a folder or the metadata for a node and store it in a process variable to use in another task within the process.

The selection actions are:

Select file

The SELECT_FILE action is used to select a file and store it in a variable.

The input parameters to select a folder are:

ParameterTypeDescription
fileFileRequires one. A variable of type file to select.
nodeIdStringRequires one. The nodeId of the file to select. For example 775a8f2d-8123-49a7-ae1f-f3f49d4eae20.
pathStringRequires one. The location path or relative path of the file to select. For example, a location path: /app:company_home/app:user_homes/cm:hruser and a relative path: /User Homes/hruser.
searchQueryStringRequires one. A search query to find the file to select. This is in Alfresco Full Text Search (AFTS) format, for example: cm:title:test.
searchMaxItemsIntegerOptional. The maximum number of items returned by the searchQuery. The default value is 100.
searchSkipCountIntegerOptional. The number of items in the result to skip before returning the results. The default value is 0.

The output parameters from selecting a file are:

ParameterTypeDescription
responseJSONOptional. The response from the call selecting the file.
fileFileOptional. The selected file available to be mapped to a variable.

Read file content

The READ_FILE_CONTENT action is used to parse files into JSON or TEXT format and store them in a variable.

The input parameters to read file content are:

ParameterTypeDescription
fileFileRequires one. A variable of type file to parse.
nodeIdStringRequires one. The nodeId of the file to parse. For example 775a8f2d-8123-49a7-ae1f-f3f49d4eae20.
pathStringRequires one. The location path or relative path of the file to parse. For example, a location path: /app:company_home/app:user_homes/cm:hruser and a relative path: /User Homes/hruser.
contentTypeStringOptional. The type to parse the file as. The values are either JSON or TXT. The default value is TXT.

The output parameters from reading a file are:

ParameterTypeDescription
jsonContentJSONOptional. The file in JSON format.
txtContentStringOptional. The file in TXT format.

Note: To reference JSON key values from a process variable of type JSON, use the syntax ${process-variable.key}.

Select folder

The SELECT_FOLDER action is used to select a folder and store it in a variable.

The input parameters to select a folder are:

ParameterTypeDescription
folderFolderRequires one. A variable of type folder to select.
nodeIdStringRequires one. The nodeId of the folder to select. For example 775a8f2d-8123-49a7-ae1f-f3f49d4eae20.
pathStringRequires one. The location path or relative path of the folder to select. For example, a location path: /app:company_home/app:user_homes/cm:hruser and a relative path: /User Homes/hruser.
searchQueryStringRequires one. A search query to find the folder to select. This is in Alfresco Full Text Search (AFTS) format, for example: cm:title:test.
searchMaxItemsIntegerOptional. The maximum number of items returned by the searchQuery. The default value is 100.
searchSkipCountIntegerOptional. The number of items in the result to skip before returning the results. The default value is 0.

The output parameters from selecting a folder are:

ParameterTypeDescription
responseJSONOptional. The response from the call selecting the folder.
folderFolderOptional. The selected folder available to be mapped to a variable.

Select metadata

The SELECT_METADATA action is used to select the metadata for a file or folder and store it in a variable.

The input parameters to select the metadata of a file or folder are:

ParameterTypeDescription
fileFileRequires one. A variable of type file to select the metadata for.
folderFolderRequires one. A variable of type folder to select the metadata for.
nodeIdStringRequires one. The ID of the node to select the metadata for. For example 775a8f2d-8123-49a7-ae1f-f3f49d4eae20.
pathStringRequires one. The location path or relative path of the node to select the metadata for. For example, a location path: /app:company_home/app:user_homes/cm:hruser and a relative path: /User Homes/hruser.
underscoreMetadataBooleanOptional. If set to true, the output metadata will have its namespace prefixes written with _ instead of :, for example cm_title instead of cm:title. This allows the JSON to be used in an expression, for example ${metadata.cm_title}, whereas ${metadata.cm:title} is not valid.

The output parameters from selecting the metadata of a file or folder are:

ParameterTypeDescription
responseJSONOptional. The response from the call selecting the metadata of the file or folder.
metadataContent-MetadataRequired. The metadata of the selected file or folder. This is a JSON object of key value pairs that can be mapped to a process variable of type JSON. See below for an example.

Copy and move actions

Cope and move actions are used copy and move files and folders within the repository.

The copy and move actions are:

Copy file

The COPY_FILE action is used to copy a file and place the copy in a new location.

The input parameters to copy a file are:

ParameterTypeDescription
sourceFileFileRequires one source. A variable of type file to select the file to copy.
sourceIdStringRequires one source. The nodeId of the file to copy. For example 775a8f2d-8123-49a7-ae1f-f3f49d4eae20.
sourcePathStringRequires one source. The location path or relative path of the file to copy. For example, a location path: /app:company_home/app:user_homes/cm:hruser and a relative path: /User Homes/hruser.
targetFolderFolderRequires one target. A variable of type folder to move the copied file into.
targetFolderIdStringRequires one target. The nodeId of the folder to move the copied file into. For example 775a8f2d-8123-49a7-ae1f-f3f49d4eae20.
targetFolderPathStringRequires one target. The location path or relative path of the folder to move the copied file into. For example, a location path: /app:company_home/app:user_homes/cm:hruser and a relative path: /User Homes/hruser.

The output parameters from copying a file are:

ParameterTypeDescription
responseJSONOptional. The response from the call copying the file.
fileFileOptional. The copied file available to be mapped to a variable.

Move file

The MOVE_FILE action is used to move a file from one location to another.

The input parameters to move a file are:

ParameterTypeDescription
sourceFileFileRequires one source. A variable of type file to select the file to move.
sourceIdStringRequires one source. The nodeId of the file to move. For example 775a8f2d-8123-49a7-ae1f-f3f49d4eae20.
sourcePathStringRequires one source. The location path or relative path of the file to move. For example, a location path: /app:company_home/app:user_homes/cm:hruser and a relative path: /User Homes/hruser.
targetFolderFolderRequires one target. A variable of type folder to move the file into.
targetFolderIdStringRequires one target. The nodeId of the folder to move the file into. For example 775a8f2d-8123-49a7-ae1f-f3f49d4eae20.
targetFolderPathStringRequires one target. The location path or relative path of the folder to move the file into. For example, a location path: /app:company_home/app:user_homes/cm:hruser and a relative path: /User Homes/hruser.

The output parameters from moving a file are:

ParameterTypeDescription
responseJSONOptional. The response from the call moving the file.
fileFileOptional. The moved file available to be mapped to a variable.

Copy folder

The COPY_FOLDER action is used to copy a folder and place the copy in a new location.

The input parameters to copy a folder are:

ParameterTypeDescription
sourceFolderFolderRequires one source. A variable of type folder to select the folder to copy.
sourceIdStringRequires one source. The nodeId of the folder to copy. For example 775a8f2d-8123-49a7-ae1f-f3f49d4eae20.
sourcePathStringRequires one source. The location path or relative path of the folder to copy. For example, a location path: /app:company_home/app:user_homes/cm:hruser and a relative path: /User Homes/hruser.
targetFolderFolderRequires one target. A variable of type folder to move the copied folder into.
targetFolderIdStringRequires one target. The nodeId of the folder to move the copied folder into. For example 775a8f2d-8123-49a7-ae1f-f3f49d4eae20.
targetFolderPathStringRequires one target. The location path or relative path of the folder to move the copied folder into. For example, a location path: /app:company_home/app:user_homes/cm:hruser and a relative path: /User Homes/hruser.

The output parameters from copying a folder are:

ParameterTypeDescription
responseJSONOptional. The response from the call copying the folder.
folderFolderOptional. The copied folder available to be mapped to a variable.

Move folder

The MOVE_FOLDER action is used to move a folder from one location to another.

The input parameters to move a folder are:

ParameterTypeDescription
sourceFolderFolderRequires one source. A variable of type folder to select the folder to move.
sourceIdStringRequires one source. The nodeId of the folder to move. For example 775a8f2d-8123-49a7-ae1f-f3f49d4eae20.
sourcePathStringRequires one source. The location path or relative path of the folder to move. For example, a location path: /app:company_home/app:user_homes/cm:hruser and a relative path: /User Homes/hruser.
targetFolderFolderRequires one target. A variable of type folder to move the source folder into.
targetFolderIdStringRequires one target. The nodeId of the folder to move the source folder into. For example 775a8f2d-8123-49a7-ae1f-f3f49d4eae20.
targetFolderPathStringRequires one target. The location path or relative path of where to move the source folder into. For example, a location path: /app:company_home/app:user_homes/cm:hruser and a relative path: /User Homes/hruser.

The output parameters from moving a folder are:

ParameterTypeDescription
responseJSONOptional. The response from the call moving the folder.
folderFolderOptional. The moved folder available to be mapped to a variable.

Update actions

Update actions are used to update the contents of files and folders as well as setting other properties on nodes, such as permissions, tags, aspects and lock status.

The update actions are:

Update file content

The UPDATE_FILE_CONTENT action is used to update the contents of a file, creating a new version of it.

The input parameters to update the content of a file are:

ParameterTypeDescription
targetFileFileRequires one target. A variable of type file that should be updated.
targetFileIdStringRequires one target. The nodeId of the file to that should be updated. For example 775a8f2d-8123-49a7-ae1f-f3f49d4eae20.
targetFilePathStringRequires one target. The location path or relative path of the file that should be updated. For example, a location path: /app:company_home/app:user_homes/cm:hruser and a relative path: /User Homes/hruser.
sourceFileFileRequires one source. A variable of type file that is the new, updated file.
sourceTextStringRequires one source. The new source for the file described as a block of text.
sourceJsonJSONRequires one source. The new source for the file described in JSON format.
newNameStringOptional. A new file name for the file being updated, including the file extension. For example updated_draft.txt.
majorVersionBooleanOptional. If set to true then the update will create a new major version of the file.
versionCommentStringOptional. A comment that will appear in the version history of the updated file.

The output parameters from updating the contents of a file are:

ParameterTypeDescription
responseJSONOptional. The response from the call updating the contents of the file.

Update metadata

The UPDATE_METADATA action is used to update the metadata for a file or folder.

The input parameters to update the metadata of a file or folder are:

ParameterTypeDescription
fileFileRequires one. A variable of type file to update.
folderFolderRequires one. A variable of type folder to update.
nodeIdStringRequires one. The ID of the node to update. For example 775a8f2d-8123-49a7-ae1f-f3f49d4eae20.
pathStringRequires one. The location path or relative path of the node to update. For example, a location path: /app:company_home/app:user_homes/cm:hruser and a relative path: /User Homes/hruser.
metadataContent-MetadataRequired. Metadata to update the file or folder with. This is a JSON object of key value pairs. See below for an example.
underscoreMetadataBooleanOptional. If set to true, the input metadata can have its namespace prefixes written with _ instead of :, for example cm_title instead of cm:title. The output response will also have its prefixes replaced. This allows the JSON to be used in an expression, for example ${metadata.cm_title}, whereas ${metadata.cm:title} is not valid.

Note: underscoreMetadata can be set to true and the metadata input can still use : with the connector successfully executing the action. If underscoreMetadata is set to false and metadata uses _ then the connector will fail to execute the action.

An example of the metadata that can be sent with the file or folder is:

{
"ahr:contract-type": "Full Time",
"ahr:full-name": "John Doe",
"ahr:role": "Developer"
}

The output parameters from updating the metadata of a file or folder are:

ParameterTypeDescription
responseJSONOptional. The response from the call updating the metadata of the file or folder.

Set permissions

The SET_PERMISSIONS action is used to assign roles to a list of users on a file or folder.

The input parameters to set permissions are:

ParameterTypeDescription
fileFileRequires one. A variable of type file to set the permissions for.
folderFolderRequires one. A variable of type folder to set the permissions for.
nodeIdStringRequires one. The ID of the node to set the permissions for. For example 775a8f2d-8123-49a7-ae1f-f3f49d4eae20.
pathStringRequires one. The location path or relative path of the node to set the permission for. For example, a location path: /app:company_home/app:user_homes/cm:hruser and a relative path: /User Homes/hruser.
usersArrayRequired. An array of users to give the permissions to, for example hruser, salesuser or ["hruser", "salesuser"].
roleStringRequired. The role to provide to the users, for example Contributor.

The output parameters from setting permissions are:

ParameterTypeDescription
responseJSONOptional. The response from the call setting permissions.

Lock node

The LOCK_NODE action is used to lock a file or folder so that it cannot be edited.

The input parameters to lock a node are:

ParameterTypeDescription
fileFileRequires one. A variable of type file to lock.
folderFolderRequires one. A variable of type folder to lock.
nodeIdStringRequires one. The ID of the node to lock. For example 775a8f2d-8123-49a7-ae1f-f3f49d4eae20.
pathStringRequires one. The location path or relative path of the node to lock. For example, a location path: /app:company_home/app:user_homes/cm:hruser and a relative path: /User Homes/hruser.
lockTypeStringRequired. The type of lock to apply to the node: {::nomarkdown}
  • ALLOW_OWNER_CHANGES: Allows the owner of the node to continue to edit it. This is the default value.
  • FULL: No changes can be made to the node until it is unlocked.
{:/}
timeToExpireIntegerRequired. The number of seconds until the lock expires. If set to 0 then the lock will not expire until it is explicitly unlocked using an unlock event.
lifetimeStringRequired. Set whether the lock is persisted in the database or not, the possible values are:
  • PERSISTENT: The lock will be persisted in the database. This is the default value.
  • EPHEMERAL: The lock will be a volatile in-memory lock. This should be used if frequent short-term locks are being used that don't need to be kept when the repository restarts to avoid the overhead of writing to the database.

The output parameters from locking a file or folder are:

ParameterTypeDescription
responseJSONOptional. The response from the call locking the file or folder.

Unlock node

The UNLOCK_NODE action is used to unlock a locked file or folder so that it is editable.

The input parameters to unlock a node are:

ParameterTypeDescription
fileFileRequires one. A variable of type file to unlock.
folderFolderRequires one. A variable of type folder to unlock.
nodeIdStringRequires one. The ID of the node to unlock. For example 775a8f2d-8123-49a7-ae1f-f3f49d4eae20.
pathStringRequires one. The location path or relative path of the node to unlock. For example, a location path: /app:company_home/app:user_homes/cm:hruser and a relative path: /User Homes/hruser.

The output parameters from unlocking a file or folder are:

ParameterTypeDescription
responseJSONOptional. The response from the call unlocking the file or folder.

Add aspect

The ADD_ASPECT action is used to add an aspect to a file or folder.

The input parameters to add an aspect are:

ParameterTypeDescription
fileFileRequires one. A variable of type file to add the aspect to.
folderFolderRequires one. A variable of type folder to add the aspect to.
nodeIdStringRequires one. The ID of the node to add the aspect to. For example 775a8f2d-8123-49a7-ae1f-f3f49d4eae20.
pathStringRequires one. The location path or relative path of the node to add the aspect to. For example, a location path: /app:company_home/app:user_homes/cm:hruser and a relative path: /User Homes/hruser.
aspectContent-Aspect-SelectorRequired. The aspect to add to the file or folder, for example rv:reviewable.
nodeMetadataContent-MetadataOptional. Metadata to store with the file or folder. This is a JSON object of key value pairs. See below for an example.
underscoreMetadataBooleanOptional. If set to true, the input nodeMetadata can have its namespace prefixes written with _ instead of :, for example cm_title instead of cm:title. The output response will also have its prefixes replaced. This allows the JSON to be used in an expression, for example ${metadata.cm_title}, whereas ${metadata.cm:title} is not valid.

Note: underscoreMetadata can be set to true and the nodeMetadata input can still use : with the connector successfully executing the action. If underscoreMetadata is set to false and nodeMetadata uses _ then the connector will fail to execute the action.

An example of the nodeMetadata that can be sent with the file or folder is:

{
"ahr:contract-type": "Full Time",
"ahr:full-name": "John Doe",
"ahr:role": "Developer"
}

The output parameters from adding an aspect are:

ParameterTypeDescription
responseJSONOptional. The response from the call adding the aspect.

Remove aspect

The REMOVE_ASPECT action is used to remove an aspect from a file or folder.

The input parameters to remove an aspect are:

ParameterTypeDescription
fileFileRequires one. A variable of type file to remove the aspect from.
folderFolderRequires one. A variable of type folder to remove the aspect from.
nodeIdStringRequires one. The ID of the node to remove the aspect from. For example 775a8f2d-8123-49a7-ae1f-f3f49d4eae20.
pathStringRequires one. The location path or relative path of the node to remove the aspect from. For example, a location path: /app:company_home/app:user_homes/cm:hruser and a relative path: /User Homes/hruser.
aspectContent-Aspect-SelectorRequired. The aspect to remove from the file or folder, for example rv:reviewable.

The output parameters from removing an aspect are:

ParameterTypeDescription
responseJSONOptional. The response from the call removing the aspect.

Update tag

The UPDATE_TAG action is used to update the tags for a file or folder.

The input parameters to update tags are:

ParameterTypeDescription
fileFileRequires one. A variable of type file to update the tags for.
folderFolderRequires one. A variable of type folder to update the tags for.
nodeIdStringRequires one. The ID of the node to update the tags for. For example 775a8f2d-8123-49a7-ae1f-f3f49d4eae20.
pathStringRequires one. The location path or relative path of the node to update the tags for. For example, a location path: /app:company_home/app:user_homes/cm:hruser and a relative path: /User Homes/hruser.
tagsArrayRequired. A list of tags to update for the file or folder, for example wip, draft or ["wip", "draft"].

The output parameters from updating tags are:

ParameterTypeDescription
responseJSONOptional. The response from the call updating tags.

Set type

The SET_TYPE action is used to set the content type for a file or folder.

The input parameters to set the type of a file or folder are:

ParameterTypeDescription
fileFileRequires one. A variable of type file to set the type for.
folderFolderRequires one. A variable of type folder to set the type for.
nodeIdStringRequires one. The ID of the node to set the type for. For example 775a8f2d-8123-49a7-ae1f-f3f49d4eae20.
pathStringRequires one. The location path or relative path of the node to set the type for. For example, a location path: /app:company_home/app:user_homes/cm:hruser and a relative path: /User Homes/hruser.
nodeTypeContent-Type-SelectorRequired. The type to set for the file or folder, for example fin:invoice.
nodeMetadataContent-MetadataOptional. Metadata to store with the file or folder. This is a JSON object of key value pairs. See below for an example.
underscoreMetadataBooleanOptional. If set to true, the input nodeMetadata can have its namespace prefixes written with _ instead of :, for example cm_title instead of cm:title. The output response will also have its prefixes replaced. This allows the JSON to be used in an expression, for example ${metadata.cm_title}, whereas ${metadata.cm:title} is not valid.

Note: underscoreMetadata can be set to true and the nodeMetadata input can still use : with the connector successfully executing the action. If underscoreMetadata is set to false and nodeMetadata uses _ then the connector will fail to execute the action.

An example of the nodeMetadata that can be sent with the file or folder is:

{
"ahr:contract-type": "Full Time",
"ahr:full-name": "John Doe",
"ahr:role": "Developer"
}

The output parameters from setting the type of a file or folder are:

ParameterTypeDescription
responseJSONOptional. The response from the call selecting the metadata of the file or folder.

Governance actions

The governance actions are used to declare content as records in the repository.

Note: Governance actions require Alfresco Governance Services to be installed in Alfresco Cloud.

The governance actions are:

Declare record

The DECLARE_RECORD action is used to declare a file as a record.

The input parameters to declare a record are:

ParameterTypeDescription
fileFileRequires one. A variable of type file to declare as a record.
fileIdStringRequires one. The nodeId of the file to declare as a record. For example 775a8f2d-8123-49a7-ae1f-f3f49d4eae20.
filePathStringRequires one. The location path or relative path of the file to declare as a record. For example, a location path: /app:company_home/app:user_homes/cm:hruser and a relative path: /User Homes/hruser.
hideRecordBooleanOptional. Set whether the record is hidden from its current parent folder, for example true.
targetFolderFolderOptional. A variable of type folder to store the record in.
targetFolderIdStringOptional. The nodeId of the folder to store the record in. For example 775a8f2d-8123-49a7-ae1f-f3f49d4eae20.
targetFolderPathStringOptional. The location path or relative path of the folder to store the record in. For example, a location path: /app:company_home/app:user_homes/cm:hruser and a relative path: /User Homes/hruser.

The output parameters from declaring a record are:

ParameterTypeDescription
responseJSONOptional. The response from the call declaring the record.

Delete actions

The delete actions are used to delete files and folders from the repository.

The delete actions are:

Delete file

The DELETE_FILE action is used to delete a file.

The input parameters to delete a file are:

ParameterTypeDescription
fileFileRequires one. A variable of type file to delete.
fileIdStringRequires one. The nodeID of the file to delete. For example 775a8f2d-8123-49a7-ae1f-f3f49d4eae20.
permanentBooleanOptional. If set to true the file will be deleted permanently and not moved to the trashcan.

The output parameters from deleting a file are:

ParameterTypeDescription
responseJSONOptional. The response from the call deleting the file.

Delete folder

The DELETE_FOLDER action is used to delete a folder.

The input parameters to delete a folder are:

ParameterTypeDescription
folderFolderRequires one. A variable of type folder to delete.
folderIdStringRequires one. The nodeID of the folder to delete. For example 775a8f2d-8123-49a7-ae1f-f3f49d4eae20.
permanentBooleanOptional. If set to true the folder will be deleted permanently and not moved to the trashcan.

The output parameters from deleting a folder are:

ParameterTypeDescription
responseJSONOptional. The response from the call deleting the folder.

Errors

The possible errors that can be handled by the content connector are:

ErrorDescription
MISSING_INPUTA mandatory input variable was not provided.
INVALID_INPUTThe input variable has an invalid type.
INVALID_RESULT_FORMATThe service result payload cannot be parsed.
UNKNOWN_ERRORUnexpected runtime error.
BAD_REQUESTThe server could not understand the request due to invalid syntax.
UNAUTHORIZEDThe request has not been applied because it lacks valid authentication.
FORBIDDENThe server understood the request but refuses to authorize it.
NOT_FOUNDThe server could not find what was requested.
METHOD_NOT_ALLOWEDThe request method is known by the server but is not supported.
NOT_ACCEPTABLEThe server cannot produce a response matching the list of acceptable values.
REQUEST_TIMEOUTThe server would like to shut down this unused connection.
CONFLICTThe request conflicts with current state of the server.
GONENo longer available.
UNPROCESSABLE_ENTITYThe server understands the content type of the request entity, and the syntax of the request entity is correct, but it was unable to process the contained instructions.
LOCKEDThe resource that is being accessed is locked.
FAILED_DEPENDENCYThe request failed due to failure of a previous request.
INTERNAL_SERVER_ERRORThe server has encountered a situation it doesn't know how to handle.
NOT_IMPLEMENTEDThe request method is not supported by the server and cannot be handled.
BAD_GATEWAYThe server got an invalid response.
SERVICE_UNAVAILABLEThe server is not ready to handle the request.
GATEWAY_TIMEOUTThe server is acting as a gateway and cannot get a response in time.

© 2023 Alfresco Software, Inc. All Rights Reserved.