Launch Workbench. Log in to localhost as administrator.
Adobe® LiveCycle® Workspace supports the management of task assignment and completion activities for forms and documents. These forms and documents can be XDP Forms, Flex® forms, or Guides (deprecated) that have been rendered in XDP, PDF, HTML, or Flex formats.
These capabilities are further enhanced. LiveCycle now supports collaboration with third-party applications that support functionality similar to the Livecycle Workspace. A common part of this functionality is the workflow of assignment and subsequent approval of a task. LiveCycle provides a single unified experience for Livecycle enterprise users so that all such task assignments or approvals for the supported applications can be handled through Livecycle Workspace.
As an example, let us consider Correspondence Management as the sample candidate for integration with HTML 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 HTML Workspace. For more details, see Working with letter templates' topic in Correspondence Management guide.
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.
The custom render/submit process let you use the data specified in 'Assign Task' operation. The process interprets the location of the form template and data and returns it appropriately to the workspace client.
Use the following steps to create a custom renderer:
Launch Workbench. Log in to localhost as administrator.
Click File > New > Application. In the Application Name field, enter CMDemoSample and then click Finish.
Select CMDemoSample/1.0 and right-click NewProcess. In the name field, enter CMRenderer and then click Finish.
Drag the Activity Picker and add the Set Value Operation.
Create an output variable runtimeMap of type ‘map’ and subtype ‘object’ (WorkflowDSC > object).
Add mappings as shown here.
||Denotes if the application is an external application. Value in this field is mandatory for successful integration.
||Complete URL, which when loaded in Workspace client iframe, renders the external application form user interface.|
|/process_data/runtimeMap[@id="externalAppFormType"]||'text/html'||Optional. Denotes the external app content type. Not in use currently. Meant for any possible future enhancements (Default: text/html)
|Optional. If true, hides actions such as forward, reject, and share from the user interface (Default: false)|
|/process_data/runtimeMap[@id="hideDirectActions"]||false()||Optional. If true, hides actions such as submit and save from the user interface (Default: false)
|/process_data/runtimeMap[@id="cancelMessage"]||'submitCancel'||Optional. Message from third-party app to notify Workspace to cancel the task (that is, close without save/submit). (Default: cancel)|
|/process_data/runtimeMap[@id="errorMessage"]||'submitFault'||Optional. Message from third-party app to notify Workspace that an error occurred. (Default: error)|
|/process_data/runtimeMap[@id="successMessage"]||'submitSuccess'||Optional. Message from third-party app to workspace that an event has occurred successfully. (Default: submit)|
||Optional. Message from third-party app to notify workspace whether to enable a direct action button. The third-party app is required to send a payload (true/false).|
||Optional. Id of the embed tag of the third-party application. (Default 'ccrSwf')|
Drag the Activity Picker to add an Execute Script Operation.
Add the following script:
Map runtimeMap = patExecContext.getProcessDataMapValue("runtimeMap");
Map routeActionMap = new HashMap();
This maps the user actions defined for the task with the third-party application actions. If no user action is defined for the task, ‘complete’ is used. Otherwise, the named actions are used. Since a render service is orchestration-agnostic, map all possible user actions (across processes) to the corresponding third-party app actions.
Add another variable to the application named letterId of type string. Mark it as input and required
Correspondence Management does not have a requirement of custom submit process as Correspondence Management submit takes care of the post process requirements. For other applications, a custom submit can be created for the additional requirements.
Add a new process called CMTest to the application.
Add an xdp (say ApplicationforLongTermCareServices.xdp) to the application and place it under CMDemoSample/CMDemoSample/1.0
Select ‘AssignTask’ from Activity Picker. A warning may appear asking you to change the process from short lived to long lived. Click Yes.
In ‘Initial User Selection’, select ‘Assign to specific user’ and add user (say Gloria Rios).
In the ‘Presentation and Data’ tab’ for the asset, browse to ApplicationforLongTermCareServices.xdp added in step 2. This asset is a placeholder and will not be used in case of external application.
Click on ‘Manage Action Profiles’
Add a new Action Profile and name it CMTest
In Render Process, select the renderer you created, that is
Click OK. Render process properties are displayed as shown here:
Specify a letter Id for example /content/apps/cm/correspondence/letters/NoticeOfActionLetterWithoutPostProcess. This is the same letter Id that you created at the beginning of the exercise.
Deploy the Application. Check in and save assets if prompted.
Right click on the CMTest process from Workbench and select Invoke.
Login to HTML Workspace http://[server]:[port]/lc/content/ws as Gloria Rios, as specified in Step 4.
Open the task you had added. The Correspondence Management Letter should open up.
Fill in the required data and submit the letter. The window should close. Any Correspondence Management post-process activity associated with the letter is invoked.