You're viewing help content for version:
- 6.4
- 6.3
- 6.2
- Older Versions
AEM Forms workspace supports the management of task assignment and completion activities for forms and documents. These forms and documents can be XDP Forms, or Guides (deprecated) that have been rendered in XDP, PDF, or HTML.
AEM Forms also supports collaboration with third-party applications that support functionality similar to the AEM Forms workspace. A common part of this functionality is the workflow of assignment and subsequent approval of a task. AEM Forms provides a single unified experience for AEM Forms enterprise users so that all such task assignments or approvals for the supported applications can be handled through AEM Forms workspace.
As an example, let us consider Correspondence Management as the sample candidate for integration with AEM Forms workspace. Correspondence Management has the concept of a 'Letter', which can be rendered and allows actions.
Start by creating a sample Correspondence Management template that is rendered in AEM Forms workspace. For more details, see Create a letter template.
Access the Correspondence Management template at its URL to verify if the Correspondence Management template can be rendered successfully. The URL has a pattern similar to http://[server]:[port]/lc/content/cm/createcorrespondence.html?cmLetterId=encodedLetterId&cmUseTestData=1&cmPreview=0;
where encodedLetterId is the URL-encoded letter Id. Specify the same letter Id, when defining the render process for workspace task in Workbench.
-
(Optional) To add another user in the workflow, drag an activity picker, configure it, and assign it to a user. Write a custom wrapper (sample given below) or download and install the DSC (given below) to extact Letter template, Start Point Output, and task Attachment.
A sample custom wrapper is as listed below:
public LetterInstanceInfo getLetterInstanceInfo(Document dataXML) throws Exception { try { if(dataXML == null) throw new Exception("dataXML is missing"); CoreService coreService = getRemoteCoreService(); if (coreService == null) throw new Exception("Unable to retrive service. Please verify connection details."); Map<String, Object> result = coreService.getLetterInstanceInfo(IOUtils.toString(dataXML.getInputStream(), "UTF-8")); LetterInstanceInfo letterInstanceInfo = new LetterInstanceInfo(); List<Document> attachmentDocs = new ArrayList<Document>(); List<byte[]> attachments = (List<byte[]>)result.get(CoreService.ATTACHMENT_KEY); if (attachments != null){ for (byte[] attachment : attachments) { attachmentDocs.add(new Document(attachment)); } } letterInstanceInfo.setLetterAttachments(attachmentDocs); byte[] updateLayout = (byte[])result.get(CoreService.LAYOUT_TEMPLATE_KEY); if (updateLayout != null) { letterInstanceInfo.setLetterTemplate(new Document(updateLayout)); } else { throw new Exception("template bytes missing while getting Letter instance Info."); } return letterInstanceInfo; } catch (Exception e) { throw new Exception(e); } }
Download
Download DSC: A sample DSC is available in the DSCSample.zip file attached above. Download and unzip the DSCSample.zip file. Before you use the DSC service, you need to configure it. For information, see Configure the DSC Service.
In the Define Activity dialog, select the appropriate activity such as getLetterInstanceInfo and click OK.