How to hide the ‘DO-NOT-DELETE’ tag with CSS

Problem

The ‘DO-NOT-DELETE’ tracking tag that is added to the end of a reply-to-complete email should be hidden from end users if possible.

Solution

When an HTML email is sent, the ‘DO-NOT-DELETE’ tag can be easily hidden by using a CSS style sheet to hide that section of the email.

Detailed explanation

You can reply to an email to complete a task that you are assigned in LiveCycle Workspace 9. The feature (informally called  “Reply-to-complete”) is available in LiveCycle Process Management 9 and allows you to complete an assigned task without opening the form or even logging in to Workspace. A good example of this might be a purchase request below 200 dollars.

The email that is received from the Assign Task or Assign Multiple User operation in the process includes a tracking tag that is prefixed with ‘DO-NOT-DELETE’. This tag can be confusing to some users when they receive the email so it would be nice if it could be removed from the presentation so that it is not a concern.

The DO-NOT-DELETE tag is easily hidden in HTML emails by adding a small style declaration to your HTML email template. The following html style block should be added to the beginning of your HTML email template:

<style>
p#task-tracking-id
{
display: none;
}
</style>

That’s it! Now the DO-NOT-DELETE tracking id will be hidden in the emails of your end users.

 

- Khushwant Singh

VN:F [1.9.22_1171]
Was this helpful? Please rate the content.
Rating: 5.0/10 (2 votes cast)

SQL Server in Windows Authentication Mode

Administrators can login to SQL Server either in Windows Authentication Mode or SQL server authentication mode. In the Windows Authentication mode, whenever you login to SQL server, you need not to provide the credentials; SQL Server uses your Windows credentials.

1)       Open SQL Server Management Studio, connect to the database server using SQL Server Authentication.

2)       Click Server > Security, and then right-click Logins and select New Login.

3)       Enter the login name in Login Name box [domainName/Username].

4)       Select the Windows Authentication.

5)       Leave the Default Database to Master

6)       In the Select a page pane, click Server Roles, select the sysadmin check box, and then click OK.

7)        Disconnect the Object Explorer and again Connect in Windows Authentication mode.

In the following procedure, [database_name] represents the name of the windows Authenticated DB.

8)       Click Server > Databases > Right Click on Databases and click New Database.

9)       Enter the database name of your choice for example: [database_name].

10)   (SQL Server 2005 Only) Ensure that Use Full-Text Indexing is deselected.

11)   In the Database Data Initial Size MB box, enter the appropriate value:

•      For small development or small production systems, specify 200 MB.

12)   In the Database DataAutogrowth box, enter 50%.

13)   In the Database Log Initial Size box, enter the appropriate value:

•      For small development or small production systems, specify 20 MB.

14)   In the Database LogAutogrowth box, enter 50%.

15)   Click OK to create the database.

16)   Click Server > Databases > [database_name] > Security, and then right-click Schemas and select New Schema.

17)   In the Schema Name box, type an appropriate schema name, example: [schema_Name], and click OK.

18)    Change the default owner to ‘sa’. The detailed steps are listed below:

        18.1 In SQL Management Studio menu, click New Query.

        18.2 In the query Panel, type the following command:

         Use [database_name] EXEC sp_changedbowner 'sa'

        18.3 Click Execute. A success response is displayed in the messages panel.

19)   Click Server > Databases > [database_name] > Security, and then right-click Users and select New User.

20)   Select user Type “Windows User” from the drop down menu.

21)   In the New User dialog box, type the login name and user name as [domainName/UserName] as created through steps 1-7.

22)   Set the default schema to schema created as in step 16-17.

23)    (SQL Server 2008 R2) In the Schemas Owned by this User area, select the schema as created in step 16-17.

24)   Click Server > Databases > [database_name] > Security, and then right-click schema  [created in step 16-17] and select properties and  select permissions

a)       Click search button in Users or Roles and type [database_username] and click OK.

b)       In the Explicit tab grant  the following permissions:

   1. Alter

  2. Insert

 3.  Reference

 4.  Select

 5.  Update

6.  Delete

c)       Click OK.

 25)   Right Click Server > Databases > [database_name] and select properties then select permissions tab

a)       Select Explicit tab

b)       Grant the following  permissions:

1. Connect

2. Create Table

3. Create View

c)       Click Ok.

Associate the LiveCycle user with the database

After you create the LiveCycle user, associate it with the LiveCycle database.

26)   Click Security > Logins, and then right-click [domainName/UserName] and select Properties.

27)   In Login Properties, on the General page, set the user’s default database to [database_name].

28)   Select the User Mapping page and, in the Users Mapped to This Login section, verify that [database_name] is selected, User is set to [domainName/UserName], and Default Schema is set to [schemaName created in step 16-17].

29)   Ensure that [database_name] is selected in the Users Mapped to This Login table, and ensure that public is selected in the Database Role Membership for [database_name] table and then click OK.

Set the isolation level for the LiveCycle database

 LiveCycle requires a specific isolation level to manage deadlocking when long-running transactions occur at the same time as numerous shorter reads.

Important: You must set the isolation level for MS SQL Server to avoid deadlocking issues.

1)        Click Databases and then right-click [database_name] and select New Query.

 Note: [database_name] represents the name you specified when you created your database.

 2)        In the Query panel, type the following text:

ALTER DATABASE [database_name] SET READ_COMMITTED_SNAPSHOT ON GO

3)       Click Execute. A response is displayed in the messages panel.

 Note: In order to deploy the LC when DB is in Windows Authentication Mode, Application Server and DataBase user must be created under same user (DomainName/Username). If Application Server and DataBase do not fall under same user, then create the common user on both the Systems which are having DB and App Servers.

VN:F [1.9.22_1171]
Was this helpful? Please rate the content.
Rating: 0.0/10 (0 votes cast)

XFA-based PDF forms on Firefox 19

With the release of Firefox 19, Mozilla introduced a built-in PDF viewer. However, the XFA-based PDF forms do not open in the PDF viewer, by default. To open these forms using Firefox 19, you’d need to configure Firefox to open PDFs in Adobe Reader or Adobe Acrobat.

For more details on how to accomplish this, see the knowledge base article at http://helpx.adobe.com/livecycle/kb/xfa-forms-mozilla-firefox-19.html.

VN:F [1.9.22_1171]
Was this helpful? Please rate the content.
Rating: 5.0/10 (2 votes cast)

Importing LiveCycle DSCs using command-line

- Ankush Kumar, Lead Software Engineer @ Adobe

Many a times, we have the requirement to deploy single or group of system or custom DSCs. System DSCs are deployed by LiveCycle Configuration Manager. However, in the case of custom DSCs, we need to manually deploy the component through LiveCycle Workbench. Sometimes, launching Workbench for solely deploying component seems like too much effort. Moreover, it’s not very easy to automate.

You can use the attached sample tool to deploy a DSC using command-line.

  1. Download and extract the tool archive on your machine. It contains a folder libs, a runme.bat file, and an ImportDSC.jar file.
  2. Place <LiveCycle Installation Dir>\sdk\client-libs\thirdparty\*.jar files in libs folder.
  3. Place adobe-usermanager-client.jar and adobe-livecycle-client.jar files in libs folder.
  4. Modify runme.bat accordingly.

The ImportDSC.jar is used in the following way in the runme.bat file (provided classpath is set):

java com.adobe.livecycle.sample.ImportDSC appserver=<websphere|weblogic|jboss> serverhost=<name of machine> port=<port of LC> username=<user to install DSC> password=<password of mentioned user> dscpath=<absolute path till DSC> force=<true|false>

The source code is also included in the archive. Please review it in case of any doubt and modify as per your requirements.

DISCLAIMER: This sample code is not officially delivered or supported as part of Adobe LiveCycle product. One should verify this on a testing environment before employing in production environment.

 

 

VN:F [1.9.22_1171]
Was this helpful? Please rate the content.
Rating: 8.0/10 (1 vote cast)

Using LiveCycle to programmatically split the PDF documents – Part 1

- Khushwant Singh, Content and Community Lead @ Adobe

A discussion on Adobe forums indicates that a lot of LiveCycle users are trying to figure out how to programmatically split a PDF file. Adobe LiveCycle provides a simple method to programmatically split PDF documents using LiveCycle Assembler service. You can split PDF files using the bookmark tags or by page number.

To split the PDF documents, you require:

  • A DDX (For more information about DDX, see Adobe LiveCycle DDX reference guide)
  • Source documents
  • Access to the running instance of Adobe LiveCycle

You can write a custom DDX document suited to your requirements.  Some of the most commonly requested DDX are:

DDX for splitting PDF document using bookmarks

In the following sample DDXLiveCycle Assembler service generates a single document for each level 1 bookmark in the source document (AssemblerResultPDF.pdf in this example). The Assembler service generates a name for each document that is the concatenation of the following items:

  • A string specified by the prefix attribute
  • A 6-digit sequence number (This number could be used to re-create the original order of the pages after the document is disassembled.)
  • The bookmark title
  • The filename extension .pdf

<PDFsFromBookmarks prefix="stmt">
<PDF source="doc1.pdf"/>
</PDFsFromBookmarks>

DDX for splitting PDF document using page numbers

In this sample DDXLiveCycle Assembler service generates documents for the mentioned page number from the source document. The Assembler service generates a name for each document based on the result parameter specified in the DDX.

<?xml version="1.0" encoding="UTF-8"?>
<DDX xmlns="http://ns.adobe.com/DDX/1.0/">
<PDF result="Final.pdf">
<PDF source="PDF1.pdf" pages="1"/>
</PDF>
<PDF result="Final2.pdf">
<PDF source="PDF1.pdf" pages="2"/>
</PDF>
</DDX>

DDX for splitting PDF document using the page range

In this sample DDXLiveCycle Assembler service generates documents for the mentioned range of the pages. The Assembler service generates a name for each document based on the result parameter specified in the DDX.

<?xml version="1.0" encoding="UTF-8"?>
<DDX xmlns="http://ns.adobe.com/DDX/1.0/">
<PDF result="Final.pdf">
<PDF source="PDF1.pdf" pages="1-5"/>
</PDF>
</DDX>

DDX for splitting PDF documents using page range from different PDF documents and creating a single resultant PDF document

In the following sample DDXLiveCycle Assembler service extracts pages from multiple documents as per the range of pages mentioned in the DDX and generates a single output document

<?xml version="1.0" encoding="UTF-8"?>
<DDX xmlns="http://ns.adobe.com/DDX/1.0/">
<PDF result="Final.pdf">
<PDF source="PDF1.pdf" pages="1-3"/>
<PDF source="PDF2.pdf" pages="4-5"/>
</PDF>
</DDX>

Sample program to split a PDF document
Let us write a simple Java program to split a PDF document into multiple documents.   To download the resources used in this sample program, click here.

Complete the following steps:

  1. Create a new file and add the following code  to the file
    <DDX xmlns="http://ns.adobe.com/DDX/1.0/">
    <PDFsFromBookmarks prefix="Readme">
    <PDF source="AssemblerResultPDF.pdf"/>
    </PDFsFromBookmarks>
    </DDX>

    For this example, save the XML file as shell_disassemble.xml.
  2. Create a new Java project and add shell_disassemble.xml to the project.
  3. Add the following libraries to your project. These libraries are required to invoke assembler service in SOAP mode:
    • adobe-assembler-client.jar
    • adobe-livecycle-client.jar
    • adobe-usermanager-client.jar
    • adobe-utilities.jar
    • jbossall-client.jar (use a different JAR file if LiveCycle ES is not deployed on JBoss)
    • activation.jar
    • axis.jar
    • commons-codec-..jar
    • commons-collections-..jar
    • commons-discovery.jar
    • commons-logging.jar
    • dom-xml-apis-.jar
    • jaxen-.-beta-jar
    • jaxrpc.jar
    • log4j.jar
    • mail.jar
    • saaj.jar
    • wsdl4j.jar
    • xalan.jar
    • xbean.jar
    • xercesImpl.jar
  4. Create a new class named DisassemblePDFSOAP .
  5. Add the source PDF file to the project. I have used AssemblerResultPDF.pdf
  6. Add following code to the class:
    import com.adobe.livecycle.assembler.client.*;
    import java.util.*;
    import java.io.InputStream;
    import java.io.*;
    import com.adobe.idp.Document;
    import com.adobe.idp.dsc.clientsdk.ServiceClientFactory;
    import com.adobe.idp.dsc.clientsdk.ServiceClientFactoryProperties;
    public class DisassemblePDFSOAP
    {
    public static void main (String args[]) {
    Document outDoc = null;
    try{
    //Set connection properties required to invoke LiveCycle ES2
    Properties connectionProps = new Properties();
    connectionProps.setProperty(ServiceClientFactoryProperties.DSC_DEFAULT_SOAP_ENDPOINT, “http://10.40.18.95:8080″);
    connectionProps.setProperty(ServiceClientFactoryProperties.DSC_TRANSPORT_PROTOCOL,ServiceClientFactoryProperties.DSC_SOAP_PROTOCOL);
    connectionProps.setProperty(ServiceClientFactoryProperties.DSC_SERVER_TYPE, “JBoss”);
    connectionProps.setProperty(ServiceClientFactoryProperties.DSC_CREDENTIAL_USERNAME, “administrator”);
    connectionProps.setProperty(ServiceClientFactoryProperties.DSC_CREDENTIAL_PASSWORD, “password”);//Create a ServiceClientFactory instance
    ServiceClientFactory myFactory = ServiceClientFactory.createInstance(connectionProps);//Create an AssemblerServiceClient object
    AssemblerServiceClient assemblerClient = new AssemblerServiceClient(myFactory);FileInputStream myDDXFile = new FileInputStream(“E:\\workspace\\disassemble\\src\\shell_disassemble.xml”);
    //Create a Document object based on the DDX file
    Document myDDX = new Document(myDDXFile);//Create a Map object to store PDF source documents
    Map inputs = new HashMap();FileInputStream mySourceMap = new FileInputStream(“E:\\workspace\\backup\\disassemble\\src\\AssemblerResultPDF.pdf”);//Create a Document object based on the map.pdf source file
    Document myPDFSource = new Document(mySourceMap);//Place two entries into the Map object
    inputs.put(“AssemblerResultPDF.pdf”,myPDFSource);//Create an AssemblerOptionsSpec object
    AssemblerOptionSpec assemblerSpec = new AssemblerOptionSpec();
    assemblerSpec.setFailOnError(false);//Submit the job to the Assembler service
    AssemblerResult jobResult = assemblerClient.invokeDDX(myDDX,inputs,assemblerSpec);
    java.util.Map allDocs = jobResult.getDocuments();

    //Retrieve the result PDF documents from the Map object

    int index = 0;

    //Iterate through the map object to retrieve the result PDF document
    for (Iterator i = allDocs.entrySet().iterator(); i.hasNext();) {
    // Retrieve the Map object’s value

    Map.Entry e = (Map.Entry)i.next();
    if (index == 0)
    {
    Object o = e.getValue();

    //Cast the Object to a Document
    //and save to a file
    outDoc = (Document)o;
    File myOutFile = new File(“E:\\disassemble\\SplitPDF”+index +”.pdf”);
    outDoc.copyToFile(myOutFile);
    }
    index++;
    }
    if (index > 0)
    System.out.println(“The PDF document was disassembled into “+index+” PDF documents.”);
    else
    System.out.println(“The PDF document was not disassembled.”);

    }catch (Exception e) {
    System.out.println(“Error OCCURRED: “+e.getMessage());
    e.printStackTrace();
    }
    }
    }

  7. Modify the locations mentioned in the sample code according to the file paths in your machine
  8. Run the code.
  9. The code splits the file into multiple PDF documents based on the bookmarks or the page numbers specified in the DDX.

This is first blog in the series of the blogs about programmatically splitting the PDF document. In this blog I have shared sample code to split PDF document using bookmarks. In the follow-up blogs, I will include sample code to split PDF documents using:

  • Page numbers
  • Page range
  • Pages from different PDF documents and generate a single output document
VN:F [1.9.22_1171]
Was this helpful? Please rate the content.
Rating: 9.2/10 (5 votes cast)

Error when attempting to interact with a service managed by the Livecycle DSC container

- Siddharth Jain, Quality Manager @ Adobe

Issue

On WebSphere, errors are encountered on attempting to interact with a service managed by the Livecycle DSC container. The service is unexpectedly shown as inactive in the Livecycle administration console. Examination of the server logs (SystemOut.log) shows that the service failed to start due to class-loading issues (ClassNotFoundException errors).

Reason

The issue occurs as a result of a file-lock which prevents the DSC container from properly extracting the class files required by the DSC class-loader to a temporary directory on the local file-system. To confirm that this is the case, note the time-stamp of the ClassNotFoundException error thrown during service startup in the WAS SystemOut.log and then check that the WAS SystemErr.log contains warning messages of the form ‘The process cannot access this file because it is being used by another process’ around the same time.

Solution

To remove the lock, shut down the server and periodically try to manually delete the file for which the file-lock warning is appearing in SystemErr.log (the log file should contain the complete path of the file) . If the deletion succeeds within a reasonable amount of time, start the server and check that things are fine. If the file continues to stay locked for a long period of time, try restarting the machine.

VN:F [1.9.22_1171]
Was this helpful? Please rate the content.
Rating: 0.0/10 (0 votes cast)

LiveCycle Designer accessibility resources

LiveCycle Designer allows designers to design accessible forms, that are usable by people with various disabilities. Accessible forms also help designers comply with various laws and accessibility standards, such as Section 508. LiveCycle Designer also provides support for creating accessible XHTML files (using LiveCycle Forms) and PDF forms.

If you are working with accessible forms, you will find the following official resources very useful:

VN:F [1.9.22_1171]
Was this helpful? Please rate the content.
Rating: 9.5/10 (2 votes cast)

Debugging LiveCycle – Working with logs (Part 2)

- Ankush Kumar, Lead Software Engineer @ Adobe

In Debugging LiveCycle – Working with logs (part 1), we covered how to handle logs at application server level. In this blog, we will cover a few areas where we can fine tune the logging in applications itself.

 LCM Logs

As you might have noticed LCM logs are found at <LiveCycle Installation Location>/configurationManager/log. Default logging level of this is INFO. This is governed by properties file kept inside adobe-lcm.jar: \com\adobe\livecycle\lcm\logging\log.properties.

Using this property file, you can:

  • Change Logging Level
  • Define file location and file name.
  • Define rotation policy

If you want to overwrite the default location of this file to a more convenient location, you can do so by modifying <LiveCycle Installation Location>/configurationManager/bin/ConfigurationManager.bat and specifying following system property:

-Djava.util.logging.config.file=<path to file>

 Generating ORB Trace

While working with natives like XMLForms, you can sometimes run into issues where an application abnormally terminates. Following parameters help in generating extra trace information for debugging such issues.

These are required to be placed as argument to the native application:

-ORBtraceLevel 25 -ORBtraceThreadId 1 -ORBtraceInvocations 1 -ORBtraceInvocationReturns 1 -ORBtraceTime 1 –ORBtraceFile <Path to log file>

Also, when we are debugging an issue related to native applications, in System Out logs we can find system natives being invoked and a large IOR is passed to them as input. This IOR can be analyzed by many easily available IOR parsers. (Just Google for them). This can be first step towards debugging natives related problem.

Variable Logging

In order to better understand and debug an orchestration, LiveCycle offers excellent process debug feature. Using workbench, one can easily trace every step of a process and find what exact values any variable hold. For more information, one can refer this blog.

http://blogs.adobe.com/shwetank/2011/11/21/process-recording-feature-of-livecycle-workbench/

But sometimes this gets difficult due to environment constraints and performance overheads. One may want to introduce a step which will log current state of all variables in either System Out log or the log of your choice.

This can be accomplished using Variable Logger service. One can introduce this while designing the orchestration. Now each time the orchestration runs, the values of variables will be logged as the step is executed.

Other Application Logging Locations

Content Services and CMSA Logs

Content Services and CMSA logs are created in working directory of the application server.

LiveCycle Installer Logs

Installer logs can be found in following two locations

  • <LiveCycle Installation Home>
  • <LiveCycle Installation Home>/logs

Service Pack Logs

Service pack logs can be found at <LiveCycle Installation Home>/patch/<Patch Name>/log

CRX and Correspondence Management Logs

From ES3 onwards, you will find CRX and CM logs at <CRX Repository Directory>/logs. (More on this will be covered in next part of blogs)

PDFG Configuration Logs

  • PDFG System Readiness Testing Logs:  <LiveCycle Installation Home>/pdfg_srt/reports
  • PDFG Config Logs: <LiveCycle Installation Home>/logs
VN:F [1.9.22_1171]
Was this helpful? Please rate the content.
Rating: 10.0/10 (1 vote cast)

Troubleshooting Common LiveCycle Configuration Errors

- Shishir Pandey, Software Engineer @ Adobe

The following lists the common configuration errors, why they occur, and steps to troubleshoot them.

  • Error: Component: com.adobe.xxx version: 10.0.3.20120511.1.316647 introduced a new service, it should not be patched
    Reason: This issue generally occurs when order of operation in Configuration Manager is incorrect after applying a patch. That is, the deployment of the component is performed before configuring and deploying of the EAR files. It usually occurs in command line execution because each step is run separately in this mode.
    Workaround: Re-run the Configuration Manager and ensure that configuration and deployment of ear is done before deploying components.
  • Error: In case of Weblogic, a “null” folder gets created after deploying EARs.
    Workaround: Stop the managed-server first, followed by the node manager, and finally stop the admin-server. Restart them in reverse order. You will see a folder Adobe gets created in the Weblogic domain.
  • Error: The following error occurred while executing this line: java.lang.OutOfMemoryError: Java heap space
    Reason:  This issue generally occurs if the XMX setting is missing from the server configuration.
    Workaround:  Increase the XMX value for the server or restart the server, and re-run Configuration Manager.
  • Error: weblogic.management.NoAccessRuntimeException: Access not allowed for subject: principals=[], on Resource AdobeService Operation: set , Target: EnableSSL at com.adobe.livecycle.bootstrap.bootstrappers.CoreBootstrapper.bootstrap(CoreBootstrapper.java:60)
    Reason:  This error generally occurs due to missing JMX policies in case of Weblogic during the Initialize LiveCycle step of the Configuration Manager.
    Workaround: Configure JMX as described in Creating JMX policies for database initialization. Restart the server and re-run the Initialize LiveCycle step.
VN:F [1.9.22_1171]
Was this helpful? Please rate the content.
Rating: 7.0/10 (4 votes cast)

Creating web applications using HTML5/JavaScript Remoting Client SDK with LiveCycle Data Services

- Harpreet Singh, Technical Support @ Adobe

LiveCycle Data Services 4.6 provides a HTML5/JavaScript library that lets you develop client applications that call remoting destinations in Data Services using plain HTML and JavaScript with no Adobe Flash involved.

You can use the JavaScript APIs that do not require compilation against services-config.xml. Remoting only needs destination-to-channel mapping, and the channel information (URL, ID) from services-config.xml. Therefore, instead of compiling against the services-config.xml, you create your own ChannelSet, and assign a component (RemoteObject) before using the component. Alternatively, if your browser supports the HTML5 WebSockets, you can use a WebSocket channel, instead of a RTMP channel in Flash, for real-time communication.

  1. Set up the channel(s).
    var channel = new flex.client.channels.Channel("my-amf","http://localhost:8400/RemotingHtmlLcdsApp/messagebroker/amf");
    var amfChannel = new flex.client.channels.Channel("my-nio-amf","http://localhost:2080/nioamf","flex.client.channels.Channel.HttpMode.REGULAR");
    var wsChannel = new flex.client.channels.Channel("my-nio-amf-websocket","ws://localhost:2080/nioamfwebsocket");
  2. Create a channel set.
    var channelSet = new flex.client.channels.ChannelSet([ channel,amfChannel ]);
  3. Create and initialize a RemoteObject with channelSet and destinationId.
    var remoteObject = new flex.client.rpc.remoting.RemoteObject("EchoService");
    remoteObject.setChannelSet(channelSet);
  4. Add the result and fault handlers for the remoteObject.
    remoteObject.addEventListener(flex.client.rpc.events.ResultEvent.RESULT, function(resultEvent) {
    result = resultEvent.getResult();
    alert(result);
    });
    remoteObject.addEventListener(flex.client.rpc.events.FaultEvent.FAULT, function(faultEvent) {
    var fault = faultEvent.getFaultString();
    alert(fault);
    });
  5. Make the remoting call and call the disconnect on remoteObject.
    remoteObject.invoke("echo");
    remoteObject.disconnect();

Download the sample code from here. Access the JavaScript reference here.

VN:F [1.9.22_1171]
Was this helpful? Please rate the content.
Rating: 5.8/10 (6 votes cast)