Introduction

Interactive Communications allow the agents prepraing ad-hoc correspondences to save partially completed correspondences and retrieve the same to continue working. AEM Forms provides you the Service Provider Interface. The customer is expected to implement this interface to get the Save and Resume functionality.

This article uses MySQL database to store the metadata of the letter instance. The letter data is stored on the file system.

The following video demonstrates the use case:

Transcript
In this video, we will take a look at the use case of a customer service agent saving a draft instance of the interactive communications letter. So I have opened the interactive communications letter in the agent UI and I can enter the amount owed here. Either I can submit this letter or I can save it as a draft to continue working at it at a later point in time. So I click on Save as draft, give a meaningful name to it. So let’s call it John Jacobs because the letter is being sent to John Jacobs. So I can save it here. The draft instance is saved successfully. Now to retrieve the draft instance, I’ve built a simple UI in adaptive forms here. If I were to refresh this, it would list me all the draft instances here, the draft name, draft ID, letter ID are here and I can click on this View Letter to open the saved instance of the letter. As you can see, the name is there, the data is there, and the entire data that associated with that particular letter instance is shown on my screen so I can make some changes to this letter and save these changes to come back to it at a later stage, or I can hit on the Submit button to complete the submission of this letter. So let me save the change here. So I can click on Save Changes. Then when you’re saving it for the second time, it doesn’t ask me for the name, it simply saves the letter instance. So this is how an agent can save a draft instance of a letter and come back to it at a later stage to work on it. So let’s briefly take a behind the scenes how this particular use case was implemented. The first thing we did was we saved the actual metadata of the letter in a MySQL database here. So that’s the table called ICDrafts, the status owner, draft ID, document ID, and the name of the draft instance is saved here. The actual data of the letter is saved on my file system here. So this is the file system and the actual data is stored in an XML file here. So that’s the XML file. The tutorial will explain you in detail how to implement the save, how to implement the update, and how do you get the saved instances of a letter and display it in your adaptive form.

Prequisites

You will need the following to implement the solution to meet your needs

  • Working experience with AEM Forms
  • AEM Server 6.5 with Forms Add on
  • Should be familiar in building OSGI bundles
recommendation-more-help
8de24117-1378-413c-a581-01e660b7163e