The modelExtension tag has a set of customAction child tags that configure the action, permissions, and appearance of the action button. Following is the list of customAction configuration tags:

Name

Description

name

The alphanumeric name for the action to perform. Value of this tag is required, must be unique (within the modelExtension tag), and must start with an alphabet.

label

The label to display on the action button

tooltip

Tool tip text of the button, which is displayed when the user hovers over the button.

styleName

Name of the custom style that is applied on the action button.

permissionName

The corresponding action is displayed only if user has the permission specified by permissionName. When you specify permissionName as forms-users, all the users get access to this option.

actionHandler

Fully qualified name of the ActionHandler class that is called when user clicks the button.

Apart from the above parameters, there can be additional configurations associated with a customAction. These additional configurations are made available to the handler through the CustomAction object.

Name

Description

serviceName

If a customAction contains a child tag with name serviceName, then on clicking of the relevant button/link, a process is called with the name represented by serviceName tag. Ensure this process has the same signature as the Letter PostProcess. Add "Forms Workflow ->" prefix in service name.

Parameters containing cm_ prefix in tag name

If a customAction contains a child tags starting with name cm_, then in post process (be it Letter Post Process or the special process represented by serviceName tag) these parameters are available in the input XML code under the relevant tag with cm_ prefix removed.

actionName

Whenever a post process is due to a click, submitted XML contains a special tag with name under the tag with the name of the user action.

Click Save All.

Create a locale folder with properties file in the /apps branch

The ACMExtensionsMessages.properties file includes labels and tooltip messages of various fields in Create Correspondence user interface. For the customized actions/buttons to work, make a copy of this file in the /apps branch.

Right-click the locale folder at the following path and select Overlay Node:

/libs/fd/cm/config/defaultApp/locale

Ensure that the Overlay Node dialog has the following values:

Path: /libs/fd/cm/config/defaultApp/locale

Overlay Location: /apps/

Match Node Types: Checked

Click OK.

Click Save All.

Right-click the following file and select Copy:

/libs/fd/cm/config/defaultApp/locale/ACMExtensionsMessages.properties

Right-click the locale folder at the following path and select Paste:

/apps/fd/cm/config/defaultApp/locale/

ACMExtensionsMessages.properties file is copied in the locale folder.

To localize the labels of the newly added custom action/button, create the ACMExtensionsMessages.properties file for the relevant locale in /apps/fd/cm/config/defaultApp/locale/.

For example, for localizing the custom action/button created in this article, create a file named ACMExtensionsMessages_fr.properties with the following entry:

loc.letterInstance.letterreview.label=Revue De Lettre

Similarly, you can add more properties, such as for tooltip and style, in this file.

Click Save All.

Restart the Adobe Asset Composer Building Block bundle

After making every server-side change, restart the Adobe Asset Composer Building Block bundle. In this scenario, the acmExtensionsConfig.xml and ACMExtensionsMessages.properties files on the server-side are edited, and hence the Adobe Asset Composer Building Block bundle requires a restart.

Nota:

You may need to clear the browser cache.

Go to http://[host]:[port]/system/console/bundles. If necessary, log in as Administrator.

After restarting the Adobe Asset Composer Building Block bundle, the custom button appears in the Create Correspondence User Interface. You can open a letter in the Create Correspondence User Interface to preview the custom button.

Add action handling to the button

The Create Correspondence user interface by default has implementation of ActionHandler in the cm.domain.js file at the following location:

/libs/fd/cm/ccr/gui/components/admin/clientlibs/ccr/js/cm.domain.js

For custom action handling, create an overlay of the cm.domain.js file in the /apps branch of CRX.

Handling the action/button on clicking action/button includes logic for:

Making the newly added action as visibe/invisible: done by overriding the actionVisible() function.

In the Service Name list, click + icon and add a serviceName SendLetterForReview/SendLetterForReviewProcess.

Click Save.

Configure the email service

In this scenario, for Correspondence Management to be able to send an email, configure the email service in the LiveCycle server.

Log in with Admin credentials to Livecycle Server adminui at http:/[lc server]:[lc port]/adminui.

Navigate to Home > Services > Applications and Services > Service Management.

Locate and click EmailService.

In SMTP Host, configure the email service.

Click Save.

Configure the DSC service

To use the Correspondence Management API, download the DSCSample.jar (attached in this document as part of components.zip) and upload it to the LiveCycle server. After the DSCSample.jar file is uploaded to the LiveCycle server, the AEM server uses the DSCSample.jar file to access the renderLetter API.