Prepare Interactive Communication using the Agent UI
-
Select Forms > Forms & Documents.
-
Select the appropriate Interactive Communication and select Open Agent UI.
NOTE
Agent UI works only if the selected Interactive Communication has a print channel.Based on the Interactive Communication’s content and properties, the agent UI appears with the following three tabs: Data, Content, and Attachment.
Proceed to entering data, managing the content, and managing the attachments.
Enter Data
-
In the Data tab, enter the data for variables, form data model properties, and print template (XDP) fields, as required. Fill up all the mandatory fields marked with an asterisk (*) to enable the Submit button.
Select a data field value in the Interactive Communication preview to highlight the corresponding data field in the Data tab or conversely.
Manage Content
In the Content tab, manage the content such as document fragments and content variables in the Interactive Communication.
-
Select Content. The content tab of the Interactive Communication appears.
-
Edit the document fragments, as required, in the Content tab. To bring focus to the relevant fragment in the content hierarchy, you can either select the relevant line or paragraph in the Interactive Communication preview or select the fragment directly in the Content hierarchy.
For example, the document fragment with the line "Make a payment online now … " is selected in the preview in the below graphic and the same document fragment has got selected in the Content tab.
In the Content or Data tab, by tapping Highlight Selected Modules In Content (
The fragments that can be edited by the agent while creating the Interactive Communication have the Edit Selected Content (
For more information on the actions available for various document fragments in the Agent user interface, see Actions and info available in the Agent user interface.
-
To add a page break to the print output of the Interactive Communication, place the cursor where you want to insert a page break and select Page Break Before or Page Break After (
An explicit page break placeholder gets inserted in the Interactive Communication. To view how an explicit page break affects the Interactive Communication, see the print preview.
Proceed to managing the attachments of the Interactive Communication.
Manage Attachments
-
Select Attachment. The Agent UI displays the available attachments as set up while creating the Interactive Communication.
You can choose not to submit an attachment along with the Interactive Communication by tapping the view icon and you can select the cross in the attachment to delete it (if the agent is allowed to delete or hide the attachment) from the Interactive Communication. For the attachments specified as mandatory while creating the Interactive Communication, the View and Delete icons are disabled.
-
Select the Library Access (
NOTE
Library Access icon is available only if library access was enabled while creating the Interactive Communication (in the Document Container properties of the Print channel). -
If the order of the attachments was not locked while creating the Interactive Communication, you can reorder the attachments by selecting an attachment and tapping the down and up arrows.
-
Use Web Preview and Print Preview to see if the two outputs are as per your requirement.
If you find the previews to be satisfactory, select Submit to submit/send the Interactive Communication to a post process. Or to make changes, exit the preview to go back to the making changes.
Formatting text
While editing a text fragment in the agent UI, the toolbar changes depending on the type of edits you choose to make: Font, Paragraph, or List:
Font toolbar
Paragraph toolbar
List toolbar
Highlight/Emphasize parts of text
To highlight\emphasize parts of text in an editable fragment, select the text and select Highlight Color.
Paste formatted text
Insert special characters in text
The Agent UI has built in support for 210 special characters. The admin can add support for more/custom special characters by customization.
Attachment delivery
- When the Interactive Communication is rendered using Server-side APIs as an interactive or non-interactive PDF, the rendered PDF contains attachments as PDF attachments.
- When a post process associated with an Interactive Communication is loaded as part of the Submit using Agent UI, attachments are passed as the List<com.adobe.idp.Document> inAttachmentDocs parameter.
- Delivery mechanism workflows, such as email and print, also deliver attachments along with the PDF version of the Interactive Communication.
Actions and info available in the Agent user interface
Document fragments
- Up/Down arrows: Arrows to move document fragments up or down in the Interactive Communication.
- Delete: If allowed, delete the document fragment from the Interactive Communication.
- Page Break Before (applicable for child fragments of target area): Inserts page break before the document fragment.
- Indent: Increase or decrease indent of a document fragment.
- Page Break After (applicable for child fragments of target area): Inserts page break after the document fragment.
-
Edit (text fragments only): Open rich text editor for editing the text document fragment. For more information, see Formatting text.
-
Selection (eye icon): Includes\excludes document fragment from the Interactive Communication.
-
Unfilled Values (info): Indicates the number of unfilled variables in the document fragment.
List document fragments
- Insert Blank Line: Inserts new blank line.
- Selection (eye icon): Includes\excludes document fragment from the Interactive Communication.
- Skip Bullets/Numberings: Enable if you want to skip bullets/numbering in the list document fragment.
- Unfilled Values (info): Indicates the number of unfilled variables in the document fragment.
Save Interactive Communications as a draft
You can use the Agent UI to save one or more drafts for each Interactive Communication and retrieve the draft later to continue working on it. You can specify a different name for each draft to identify it.
Adobe recommends executing these instructions in sequence to successfully save an Interactive Communication as a draft.
Enable the Save as a Draft feature
The Save as a Draft feature is not enabled, by default. Perform the following steps to enable the feature:
-
Implement the ccrDocumentInstance Service Provider Interface (SPI).
The SPI enables you to save the draft version of the Interactive Communication to the database with a draft ID as the unique identifier. These instructions assume that you have prior knowledge on how to build an OSGi bundle using a Maven project.
For sample SPI implementation, see Sample ccrDocumentInstance SPI implementation.
-
Open
http://<hostname>:<port>/ system/console/bundles
and select Install/Update to upload the OSGi bundle. Verify that the status of the uploaded package displays as Active. Restart the server if the status of the package does not display as Active. -
Go to
https://'[server]:[port]'/system/console/configMgr
. -
Select Create Correspondence Configuration.
-
Select Enable Save Using CCRDocumentInstanceService and select Save.
Save an Interactive Communication as draft
Perform the following steps to save an Interactive Communication as a draft:
-
Select an Interactive Communication in Forms Manager and select Open Agent UI.
-
Make appropriate changes in the Agent UI and select Save as Draft.
-
Specify the name of the Draft in the Name field and select Done.
Once you save the Interactive Communication as a draft, select Save Changes to save any further changes to the draft.
Retrieve the draft of an Interactive Communication
After saving an Interactive Communication as a draft, you can retrieve it to continue working on it. Retrieve the Interactive Communication using:
https://server:port/aem/forms/createcorrespondence.hmtl?draftid=[draftid]
[draftid] refers to the unique identifier for the draft version that gets generated after saving an Interactive Communication as a draft.
Sample ccrDocumentInstance SPI implementation
Implement the ccrDocumentInstance
SPI to save an Interactive Communication as a draft. The following is a sample implementation of the ccrDocumentInstance
SPI.
package Implementation;
import com.adobe.fd.ccm.ccr.ccrDocumentInstance.api.exception.CCRDocumentException;
import com.adobe.fd.ccm.ccr.ccrDocumentInstance.api.model.CCRDocumentInstance;
import com.adobe.fd.ccm.ccr.ccrDocumentInstance.api.services.CCRDocumentInstanceService;
import org.apache.commons.lang3.StringUtils;
import org.osgi.service.component.annotations.Component;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.*;
@Component(service = CCRDocumentInstanceService.class, immediate = true)
public class CCRDraftService implements CCRDocumentInstanceService {
private static final Logger logger = LoggerFactory.getLogger(CCRDraftService.class);
private HashMap<String, Object> draftDataMap = new HashMap<>();
@Override
public String save(CCRDocumentInstance ccrDocumentInstance) throws CCRDocumentException {
String documentInstanceName = ccrDocumentInstance.getName();
if (StringUtils.isNotEmpty(documentInstanceName)) {
logger.info("Saving ccrData with name : {}", ccrDocumentInstance.getName());
if (!CCRDocumentInstance.Status.SUBMIT.equals(ccrDocumentInstance.getStatus())) {
ccrDocumentInstance = mySQLDataBaseServiceCRUD(ccrDocumentInstance,null, "SAVE");
}
} else {
logger.error("Could not save data as draft name is empty");
}
return ccrDocumentInstance.getId();
}
@Override
public void update(CCRDocumentInstance ccrDocumentInstance) throws CCRDocumentException {
String documentInstanceName = ccrDocumentInstance.getName();
if (StringUtils.isNotEmpty(documentInstanceName)) {
logger.info("Saving ccrData with name : {}", documentInstanceName);
mySQLDataBaseServiceCRUD(ccrDocumentInstance, ccrDocumentInstance.getId(), "UPDATE");
} else {
logger.error("Could not save data as draft Name is empty");
}
}
@Override
public CCRDocumentInstance get(String id) throws CCRDocumentException {
CCRDocumentInstance cCRDocumentInstance;
if (StringUtils.isEmpty(id)) {
logger.error("Could not retrieve data as draftId is empty");
cCRDocumentInstance = null;
} else {
cCRDocumentInstance = mySQLDataBaseServiceCRUD(null, id,"GET");
}
return cCRDocumentInstance;
}
@Override
public List<CCRDocumentInstance> getAll(String userId, Date creationTime, Date updateTime,
Map<String, Object> optionsParams) throws CCRDocumentException {
List<CCRDocumentInstance> ccrDocumentInstancesList = new ArrayList<>();
HashMap<String, Object> allSavedDraft = mySQLGetALLData();
for (String key : allSavedDraft.keySet()) {
ccrDocumentInstancesList.add((CCRDocumentInstance) allSavedDraft.get(key));
}
return ccrDocumentInstancesList;
}
//The APIs call the service in the database using the following section.
private CCRDocumentInstance mySQLDataBaseServiceCRUD(CCRDocumentInstance ccrDocumentInstance,String draftId, String method){
if(method.equals("SAVE")){
String autoGenerateId = draftDataMap.size() + 1 +"";
ccrDocumentInstance.setId(autoGenerateId);
draftDataMap.put(autoGenerateId, ccrDocumentInstance);
return ccrDocumentInstance;
}else if (method.equals("UPDATE")){
draftDataMap.put(ccrDocumentInstance.getId(), ccrDocumentInstance);
return ccrDocumentInstance;
}else if(method.equals("GET")){
return (CCRDocumentInstance) draftDataMap.get(draftId);
}
return null;
}
private HashMap<String, Object> mySQLGetALLData(){
return draftDataMap;
}
}
The save
, update
, get
, and getAll
operations call the database service to save an Interactive Communication as a draft, update an Interactive Communication, retrieve data from the database, and retrieve data for all Interactive Communications available in the database. This sample uses mySQLDataBaseServiceCRUD
as the name of the database service.
The following table explains the sample ccrDocumentInstance
SPI implementation. It demonstrates how the save
, update
, get
, and getAll
operations call the database service in the sample implementation.
The following is an example of the pom.xml
file that is part of the implementation:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="https://maven.apache.org/POM/4.0.0"
xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.adobe.livecycle</groupId>
<artifactId>draft-sample</artifactId>
<version>2.0.0-SNAPSHOT</version>
<name>Interact</name>
<packaging>bundle</packaging>
<dependencies>
<dependency>
<groupId>com.adobe.aemfd</groupId>
<artifactId>aemfd-client-sdk</artifactId>
<version>6.0.160</version>
</dependency>
</dependencies>
<!-- ====================================================================== -->
<!-- B U I L D D E F I N I T I O N -->
<!-- ====================================================================== -->
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>3.3.0</version>
<extensions>true</extensions>
<executions>
<!--Configure extra execution of 'manifest' in process-classes phase to make sure SCR metadata is generated before unit test runs-->
<execution>
<id>scr-metadata</id>
<goals>
<goal>manifest</goal>
</goals>
</execution>
</executions>
<configuration>
<exportScr>true</exportScr>
<instructions>
<!-- Enable processing of OSGI DS component annotations -->
<_dsannotations>*</_dsannotations>
<!-- Enable processing of OSGI metatype annotations -->
<_metatypeannotations>*</_metatypeannotations>
<Bundle-SymbolicName>${project.groupId}-${project.artifactId}</Bundle-SymbolicName>
</instructions>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>8</source>
<target>8</target>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>autoInstall</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.sling</groupId>
<artifactId>maven-sling-plugin</artifactId>
<executions>
<execution>
<id>install-bundle</id>
<phase>install</phase>
<goals>
<goal>install</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
aemfd-client-sdk
dependency to 6.0.160 in the pom.xml
file.Experience Manager
Espressos & Experience Manager: AEM Forms
Espressos & Experience Manager
Thursday, Mar 6, 7:00 PM UTC
Join Adobe's AEM product team as they highlight AEM Forms' latest innovations, including: the new Gen AI Assistant, Unified Composition with AEM Sites, and new ways to deploy forms through conversations.
RegisterAdobe Experience Manager Forms at Summit
Register for these sessions:
- The Future of Forms: Experience Success Across the Enrollment Journey (attend online)
- Elevate and Empower Teams with Agentic AI for Exceptional Experiences (attend online)
- Driving Marketing Agility and Scale: Transforming your Content Supply Chain with AI (attend online)
- The True Cost of a Failed Implementation (attend online)
- Put the Customer at the Center and Build Relationships That Last a Lifetime (attend online)
Connect with Experience League at Summit!
Get front-row access to top sessions, hands-on activities, and networking—wherever you are!
Learn more