advertisement
▼
Scroll to page 2
of 93
Document Distributor 4.8 SDK Guide February 2015 www.lexmark.com Contents 2 Contents Getting started..............................................................................................5 Prerequisite skills for developing workflow solutions................................................................................5 Prerequisite skills for developing LDD system components...................................................................5 Understanding workflow solutions.................................................................................................................6 Understanding solution types...........................................................................................................................7 Version compatibility of workflow solutions.................................................................................................8 Understanding components.............................................................................................................................8 What is the LDD SDK?........................................................................................................................................8 System requirements..........................................................................................................................................8 Supported printers..............................................................................................................................................9 Supported ECM platforms................................................................................................................................10 Getting support...................................................................................................................................................10 Preparing for development.........................................................................11 Installing the development environment......................................................................................................11 Manually associating JavaScript files with Eclipse....................................................................................12 Accessing the Lexmark Document Distributor Script Reference Guide.............................................13 Developing workflow solutions.................................................................14 Best practices for solution design..................................................................................................................14 Creating a new workflow solution project...................................................................................................15 Understanding the contents of a workflow solution project...................................................................15 Managing solution projects..............................................................................................................................17 Editing the properties of an existing workflow solution project.............................................................17 Referencing a workflow solution project......................................................................................................17 Evaluating code quality with JSLint...............................................................................................................18 Understanding types of scripts.......................................................................................................................18 Using profile scripts ..................................................................................................................................................... 18 Using library scripts ..................................................................................................................................................... 19 Using auto-configure scripts .................................................................................................................................... 20 Using forms merge scripts ........................................................................................................................................ 28 Using scheduled scripts ............................................................................................................................................. 31 Understanding the objects used in solution development....................................................................32 Top-level objects ......................................................................................................................................................... 32 Prompts .......................................................................................................................................................................... 32 Services.......................................................................................................................................................................... 33 Contents 3 Configuring solutions.......................................................................................................................................34 Managing solution settings....................................................................................................................................... 34 Managing device policies ......................................................................................................................................... 36 Managing the Solution Status Page ....................................................................................................................... 40 Managing formsets ...................................................................................................................................................... 41 Managing custom reports .......................................................................................................................................... 41 Using the included document processing components.........................................................................42 Bar code read support ............................................................................................................................................... 42 Bar code write support .............................................................................................................................................. 44 OCR support ................................................................................................................................................................. 45 Using the included solution database..........................................................................................................47 Understanding the Job Submission Web Service....................................................................................48 Using REST JSAPI ....................................................................................................................................................... 48 Using SOAP JSAPI ...................................................................................................................................................... 52 Understanding dynamic prompting support..............................................................................................55 Using Kerberos authentication......................................................................................................................55 Developing workflow solutions for previous versions of LDD..............................................................56 Testing and deploying workflow solutions.............................................57 Testing with the MFP emulator and performance simulator..................................................................57 Accessing the MFP emulator or performance simulator .................................................................................. 57 Using the interactive MFP emulator ....................................................................................................................... 57 Using the performance simulator............................................................................................................................ 58 Determining the single‑server throughput for a solution.........................................................................71 Deploying a solution directly to an LDD server system..........................................................................72 Restarting the Lexmark Solutions Application Server.............................................................................73 Distributing a solution file and installing the solution using LMC.........................................................73 Managing the LDD 4.x System List...............................................................................................................73 Building a workflow solution from the command line..............................................................................74 Developing components............................................................................76 Understanding component design...............................................................................................................76 Best practices for component design..........................................................................................................76 Creating a new component project..............................................................................................................77 Understanding the contents of a component project..............................................................................77 Including a component in a workflow solution project............................................................................78 Troubleshooting..........................................................................................79 Network connection problems occur when installing or updating plug‑ins in Eclipse...................79 The Lexmark Solution Development perspective or other features are missing.............................79 Contents 4 Auto‑complete does not work or items are missing in auto‑complete lists for LDD objects........79 A properties file updated using revision control does not update......................................................80 LDD system times out when directly exporting a solution.....................................................................80 The MFP emulator does not run...................................................................................................................80 The MFP emulator runs but cannot be discovered in LMC....................................................................81 The Backspace and left arrow keys do not work when viewing LMC in Eclipse..............................81 Appendix......................................................................................................82 Notices.........................................................................................................85 Index.............................................................................................................90 Getting started 5 Getting started LexmarkTM Document Distributor (LDD) is a system for capturing paper documents and converting them to digital format, or capturing existing digital documents and then processing and routing these documents according to your business processes. Users can submit paper documents from multifunction printers, or they can submit digital documents from individual computers. For more information about Lexmark Document Distributor, see the Lexmark Document Distributor Administrator's Guide, available at http://support.lexmark.com. This guide covers the LDD software development kit (SDK), which is used to build the custom solutions that model business processes in the Lexmark Intelligent Capture system and LDD system, as well as their supporting components. Prerequisite skills for developing workflow solutions The following skills are essential for developing LDD workflow solutions with the LDD SDK: • Understanding of LDD 4.x (See the Lexmark Document Distributor Administrator's Guide, available at http://support.lexmark.com) • Basic knowledge of usage and network configuration of Lexmark multifunction printers (MFPs) • Object‑oriented programming basics: – Variables – Arrays – Conditional statements – Loops – Logic operators – Functions – Objects • JavaScript 1.2 • Eclipse Development Platform (http://www.eclipse.org) Prerequisite skills for developing LDD system components The following skills are essential for developing LDD system components with the LDD SDK: • • • • • • Code development within Java Platform, Standard Edition XML Management of Apache Tomcat Servlet containers Web services with WSDL and SOAP Spring Framework Development for the Lexmark Embedded Solutions Framework (eSF) Contact Lexmark Professional Services for more information about developing for the Lexmark eSF. Getting started 6 Understanding workflow solutions A workflow solution determines the specifics of each stage of a job in LDD to meet a business need. Each workflow solution contains scripts that determine the specifics of each stage of a job in LDD. The stages of a job in LDD are the following: 1 Document capture 2 Document processing 3 Document routing 4 Confirmation See the Lexmark Document Distributor Administrator's Guide for more information about each stage. A workflow solution usually provides a new profile, or a type of job a user can initiate, on a device or software client to which it is deployed. Some scripts may be scheduled to run at particular times. A workflow solution contains some or all of the following elements: • Scripts—These define the actions executed when a workflow solution is initiated. Scripts can be static, or they may solicit user input to make decisions about processing and routing documents. For example, a script that processes bank loans may request additional user input such as a branch name, account number, or social security number. Scripts are not required if a solution is used only to install an eSF application or component. • Policy—These are settings for the solution and the printers to which it is deployed: – Device settings—This is the configuration required on devices to support the jobs. This configuration typically includes profiles but can include almost any device setting. – Solution settings—These are settings exposed by a solution that allow its jobs or device configurations to be adjusted in the field. Some settings are global to the solution across all devices, while others vary from one group of devices to another. • eSF application—This is an application installed on the printer to provide functionality needed by the solution, such as delayed sending of scanned documents. Getting started 7 • Components—These are JAR files that provide services not available in the base LDD installation, such as interaction with a custom enterprise content management (ECM) system. • Formsets—These are custom form files used for merging data with standard forms. • Custom reports—These are reports created by a solution developer that present custom data. • Solution Status Page—This is an easy‑to‑use Web page that can be included with solutions to simplify viewing system status and performing basic operations related to a solution. Workflow solution scripts are written using JavaScript. See a JavaScript reference for information on core programming methods. Lexmark Document Distributor includes the LDD SDK for development of scripts, supporting components, and packaged solutions. Understanding solution types Three basic types of solutions can be developed depending on business needs: • A device solution allows users to submit documents and respond to prompts on a printer. • A client software solution allows users or other applications to submit documents electronically. • A hybrid solution uses a supporting eSF application on printers to deliver advanced functionality, such as cached or scheduled job submissions to the LDD system. Additionally, you can include functionality from more than one of these types in a single solution by including a separate script for each type. You can add features for each solution type. See the following table for more information. Feature Device solution Client software solution Initiation of workflow Printer Client computer or external Printer application, such as part of an ECM system Document submission Scanner glass or automatic document feeder (ADF) Client software on a computer; acceptable file types are determined by each solution Scanner glass or automatic document feeder (ADF) Workflow control LDD system LDD system Printer Main processing load LDD system LDD system Shared; the printer handles prompts and user interaction, and the LDD system may carry out additional processing and manage routing User prompt support Yes Lexmark Document Server Yes Printer Port Cached or scheduled job submission support No Conditional; caching or scheduling must be handled by an external application Yes No Required eSF application integration Yes support Hybrid solution Getting started 8 Feature Device solution Client software solution Hybrid solution Custom home screen support Yes No Yes Job confirmation customization Contained in solution script Contained in solution script Contained in eSF application Example included as LDD SDK template TestMFP TestSNS TestHybrid Note: The included source code of the eSF application file can be compiled only with the eSF SDK, not the LDD SDK. Version compatibility of workflow solutions Solutions developed for LDD 4.4 and 4.5 are compatible with an LDD 4.6, 4.7 or 4.8 system without modification. Solutions developed for LDD 4.6, 4.7 and 4.8 are not compatible with an LDD 4.5 or earlier system. Understanding components A component is a Java application built on the Spring Framework that is used to provide extended functionality to workflow solutions. What is the LDD SDK? The LDD SDK is a group of plug‑ins included with Lexmark Document Distributor for the Eclipse IDE, which is available from http://www.eclipse.org. The SDK provides tools for creating solutions for Lexmark Document Distributor, allowing you to write scripts, edit solution settings and device policies, develop components, and package finished solutions. System requirements Category Operating system Requirement • Windows Server 2012 Standard or Enterprise Edition • Windows Server 2008 Standard or Enterprise Edition • Windows Server 2003 Standard or Enterprise Edition with SP2 • Windows 8.x • Windows 7.x Processor 2GHz RAM 1GB Getting started 9 Category Requirement Hard disk drive space 400MB, including space for JDK, Eclipse IDE, and LDD SDK Video Capable of displaying 1024 x 768 or higher resolutions Supported printers e‑Task 4 printers e‑Task 4 (7‑ or 10‑inch screen MFPs) • • • • MX610, MX611 MX6500, MX6500e MX710, MX711 MX810, MX811, MX812 • MX910, MX911, MX912 • CX510 e‑Task 3 printers • • • • • • • • • X548 6500 X746, X748 X792 e‑Task 2+ printers • X463, X464, X466 • X651, X652, X654, X656, X658 X950, X952, X954 • X734, X736, C748 • X860, X862, C792 C925 X738 X864 e‑Task 2 printers • • • • X644, X646 X772 X782 X850, X852, X854 • X940, X945 • T6543 • W8503 • T6563 • • • • • • • • MX410, MX510, MX511 • CX410 SFP e‑Task 4 (4.3‑inch screen) MS610 CS510 MS810 MS911 X6202 X632, X642 printers X642 X6342 X7522 X8202 X830, X8322 X9122 C520, C522, C5243 • C530, C532, C5343 C950 e‑Task 4 (4.3‑inch screen MFPs) • • • • e‑Task printers1 • C732, C734, C7363 • • • • • • C780, C7823 C9203 C9353 E4503 E460, E4623 T640, T632, T6443 • T650, T6523 • W8403 SFP e‑Task 4 (7‑inch screen) • MS812 1 These printers do not support eSF applications used in hybrid solutions. 2 These printers may be identified as “C,” “T,” or “W” models in Lexmark Management Console. 3 These single-function printers do not support all prompts supported by multifunction printers. For a list of supported prompts, see “Prompts supported by single‑function printers” on page 82. Notes: • For more information on the latest device and firmware level support, see the Readme file. • Some printer models do not support double‑byte characters. For more information, see “Double‑byte character support” on page 82. Getting started 10 Supported ECM platforms • Perceptive Content or ImageNow 6.6, 7.x, or later • Windows SharePoint – Microsoft SharePoint Foundation 2010 – Microsoft SharePoint 2010 – Microsoft Office SharePoint Server 2007 – Windows SharePoint Services 3.0 • EMC Documentum 5.3 • IBM FileNet P8 with one of the following components: – Content Services connector – Image Services connector – Content Engine – Content Engine with shared repository • Autonomy iManage WorkSite with WorkSite Server 8.2 or 8.5 Notes: • Integration with ECM systems may require specific licenses. • For ECM platforms without direct integration, the application saves documents and metadata to a directory where an ECM system is configured to poll for files. Getting support When requesting technical support, provide the following information: • • • • • • Description of the problem Steps to reproduce the problem, if possible Operating system, version, and service pack level JDK and JRE version Eclipse version LDD SDK plug‑in versions Note: You can find the SDK plug‑in versions by clicking Help > About Eclipse Platform, and then clicking Plug‑in Details in the dialog that appears. LDD SDK plug‑ins list the provider as “Lexmark International Inc.” • A ZIP file containing the source files in your solution project • The current .solution file if the problem is with a built solution or installation • The Eclipse error log Note: The Eclipse error log is the file “.log” in the .metadata folder within your workspace folder. Preparing for development 11 Preparing for development Installing the development environment Before you begin, do either of the following: • For LDD 4.8.03 or later, install the Java SE 7 Development Kit (JDK) and Java Runtime Environment (JRE). These LDD versions are shipped with Java 1.7.0_55-b13. • For LDD 4.8.02 or earlier, install the Java SE 6 Development Kit (JDK) and Java Runtime Environment (JRE). These LDD versions are shipped with Java 1.6.0_18-b07. Note: JDK and JRE are also available at java.sun.com. The following instructions apply only to Eclipse IDE version 4.3.2 (Kepler). Instructions may vary for other versions of Eclipse. The Eclipse IDE for Java Developers is available at eclipse.org. 1 Open Eclipse. Note: In Windows 7 or later, make sure to run the Eclipse software as an administrator. 2 Change the workspace to a folder name with no spaces. For more information, see the documentation for Eclipse. 3 If the Welcome screen appears, then click X on the Welcome tab. 4 If you connect to the Internet through a proxy, then set up the proxy connection in Eclipse. Note: For more information, see the documentation for Eclipse. 5 Install the LDD SDK plug-in: • For offline installation using a provided ZIP file: a Extract the contents of the ZIP file to a new folder on your computer. b In Eclipse, click Help > Install New Software > Add > Local. c Navigate to the folder where you extracted the plug‑in, and then click OK. d Click OK to add the local site. e Select SBT, and then click Next. f Review the list of items to be installed, and then click Next. g Accept the license agreement, and then click Finish. h If you receive a security warning that indicates the software contains unsigned content, then click OK. i When prompted, click Yes to restart Eclipse. • For online installation (inside the Lexmark network): a In Eclipse, click Help > Install New Software > Add. b Type http://hyperion.mw.lexmark.com/lddsdk/current/ in the Location field, and then click OK. If the Password Required window appears, enter your user name and password, and then click OK. c Select SBT, and then click Next. d Review the list of items to be installed, and then click Next. e Accept the license agreement, and then click Finish. Preparing for development 12 f If you receive a Security Warning that indicates the software contains unsigned content, then click OK. g When prompted, click Yes to restart Eclipse. Note: When using online installation, you can automatically update the plug‑in by configuring the options in the Automatic Updates section of the Preferences window. After the Solution Builder Toolkit has been successfully installed, the LDD SDK menu is available. 6 Activate the Lexmark Solution Development perspective. Perspectives provide predefined layouts and editor sets in Eclipse. The Solution Builder Toolkit includes the Lexmark Solution Development perspective that should be used when developing solutions for LDD 4.x. a Click Window > Open Perspective > Other. b Select Lexmark Solution Development from the list, and then click OK. While using the Lexmark Solution Development perspective, “Lexmark Solution Development” appears on the title bar, and the LDD Build Log appears on the Workbench. 7 Install an Eclipse plug‑in for editing JavaScript files, such as JSEclipse. To install JSEclipse, add the site http://hyperion.mw.lexmark.com/lddsdk/jseclipse/ in the Available Software dialog in Eclipse. Notes: • Automatic completion of LDD script elements is available only with JSEclipse. If you do not install the JavaScript plug-in, then manually associate JavaScript files with the Eclipse text editor. • The JSEclipse plug‑in requires a workspace folder name with no spaces. 8 Enable the auto‑complete libraries for JSEclipse packaged with the Solution Builder Toolkit: a In Eclipse, click LDD SDK > Update JSEclipse Autocomplete. Note: The menu item is unavailable if JSEclipse is not installed. b When prompted, click Yes to restart Eclipse. Note: When updating plug‑ins, make sure to activate the Lexmark Solution Development perspective. Manually associating JavaScript files with Eclipse You must manually associate JavaScript files with the Eclipse text editor if a plug‑in for editing JavaScript files (such as JSEclipse) is not installed. 1 In Eclipse, click Window > Preferences. 2 In the Preferences dialog, select General > Editors > File Associations. 3 Beside the File types list, click Add. 4 Type *.js, and then click OK. 5 Make sure the new entry for *.js is selected, and then click Add beside the Associated editors list. 6 Make sure the Internal Editors check box is selected, and then select Text Editor from the list. 7 Click OK, and then click OK in the Preferences dialog. Preparing for development 13 Accessing the Lexmark Document Distributor Script Reference Guide 1 In Eclipse SDK, click LDD SDK > Reference Material. 2 On the page that appears, click LDD 4.6, 4.7, 4.8 Script Reference for working with LDD 4.8 scripts. The script reference guides for previous versions may also be available. 3 Select topics from the menu at the left side of the page. Developing workflow solutions 14 Developing workflow solutions Best practices for solution design Follow these guidelines when developing the workflow and user interface of a solution: • Make it clear to the user when document input is expected. Depending on the nature of the solution, a prompt asking the user to place a certain document on the scanner may be beneficial. Alternatively, if the purpose of the solution makes the expectation of document input obvious, a prompt may be unnecessary. • When possible, present all prompts before scanning the document. If a user does not know some of the information requested through prompts, then cancel the job before scanning since it takes the most time. On e‑Task 2 or later printers, you may choose to present prompts or confirmation after scanning and partially processing the document when appropriate. On e‑Task printers, however, no prompts can be used after the scan task. • Handle user‑initiated cancels at all stages. • When possible, allow the user to batch process multiple documents. To avoid forcing the user to wait between scan tasks, scan and store all documents before processing and routing. • To avoid unexpected errors due to incorrect or missing input, validate documents to scan the correct documents and the correct number of documents or pages. • When possible, complete all prompting and scanning before beginning processing and routing. Again, on e‑Task 2 or later printers, you may choose to present prompts or confirmation after scanning and partially processing the document when appropriate. Users do not expect a long wait between prompts, so minimize such intermediate processing. • After processing and routing, provide confirmation of success or failure to the user. On e‑Task devices, confirmation must be printed, and no further action may be taken in case of failure. On e‑Task 2 or later devices, you can use more prompts to deliver confirmation, and allow a user option to take corrective action in case of failure. • Report the percentage of completion to the system when the task is completed, or as accurately as possible when the task fails. • Handle all errors and recover whenever possible. On e‑Task 2 or later devices, allow a user option to take corrective action in case of errors. For example, the user may be prompted to rescan a document when a bar code could not be read because it was scanned upside down. On e‑Task devices, errors that occur during or after a scan can be reported only on the confirmation page. • Log all errors regardless of recovery ability, and report them to the user whenever possible. Log non‑fatal errors at the “ERROR” level and fatal errors at the “FATAL” level. • Log potential problems that are not errors at the “WARN” level. • To save space in the log and maintain better system performance, log messages that only an administrator can see during normal operation at the “INFO” level. Remember that an administrator can see the overall completion status of a job without a log message using the Jobs task in LMC. • To determine the location of a bug, log messages at the “DEBUG” level. Messages at the “DEBUG” level are not recorded unless specifically enabled by an administrator, so these messages do not affect space and performance during normal operation. Developing workflow solutions 15 Creating a new workflow solution project Each LDD solution is maintained as a project within Eclipse. 1 In Eclipse, click File > New > LDD 4.x Solution. Note: If the Lexmark Solution Development perspective is not open, then click File > New > Project. Select LDD 4.x Solution from the Lexmark folder, and then click Next. 2 Type a container name for the project. The container name is the name of the workflow solution project in Eclipse IDE. 3 Configure optional properties: a To use a solution name different from the container name, clear the Use Project Name check box, and then type a solution name. The solution name is the name of the solution displayed in LMC when the solution is installed. b To start a workflow solution project at a version other than 1.0, type a value in the Initial Version field. c To use a package name different from the default that is based on the solution name, clear the Use Default check box, and then type a package name. The package name is the name of the solution file built from the workflow solution project. 4 Select the version of the LDD system where the solution will be installed, and then click Next. 5 Select the template most appropriate for the solution you plan to develop from the Available Templates list, and then click Next. To see a description of a template, select that template from the Available Templates list. 6 Type a description of the solution and the name of the author, and then click Finish. The Lexmark Solution Development perspective is opened if another perspective was open before the new project is created. Understanding the contents of a workflow solution project The following folder structure details the contents of a workflow solution project. Some folders may not appear in all solutions. ProjectFolder\—This is the Container folder that contains all contents of the project. The Container folder is named when creating the project. docs\—This contains files for use during development. The contained files are not included with the compiled solution. platform\—This contains files and components accessed by the solution and shared with other solutions. All contents of this folder are copied to the application folder (\Lexmark\Solutions\apps\wf‑ldss\) when the solution is installed on a system. This folder is accessible by scripts through the taskInfo.platformDir property. Note: If files are included in this folder, then deployment of the solution may require a restart of the LDD system. Files that do not need to be shared with other solutions should be placed in the src \solution\WEB‑INF\ and src\solution\WEB‑INF\lib\ folders instead. Developing workflow solutions 16 src\—This contains the source files of the project. conf\—This contains the configuration files for the project. devicePolicy.ldd—This is the configuration file that manages the profiles and associated policy settings associated with a solution. forms.ldd—This is the configuration file that manages the formsets included with or linked to the solution. reports.ldd—This is the configuration file that manages the custom reports included with the solution. solutionSettings.ldd—This is the configuration file that manages the global and local solution settings available for a solution. Settings created here are accessible by scripts and can be changed using Lexmark Management Console. statusPage.properties—This is the configuration file that manages the look and feel of the custom status page that may be used instead of Lexmark Management Console for non‑technical users. esf\—This contains any .fls files for eSF applications used with a hybrid solution. esf-app-source-code\—This contains the source files from any eSF applications used with a hybrid solution. forms\—This contains any formsets included with the solution. (Use the forms.ldd configuration file to add forms.) images\—This contains images associated with the solution, such as home screen images added using the device policy editor. Files in this folder are copied to the images\ folder of the solution on the LDD system when the solution is installed. reports\—This contains compiled Jasper custom report files associated with the solution. (Use the reports.ldd configuration file to add reports.) scripts\—This contains the JavaScript scripts included in the solution. This folder may be empty for solutions that deploy only an eSF application or LDD component. Each main script located here should be assigned to a profile in devicePolicy.ldd. scheduled\—This contains scripts that can be scheduled using Lexmark Management Console after a solution is deployed. solution\—This contains files and components accessed only by the current solution. This folder is accessible by scripts through the taskInfo.solutionDir property. WEB‑INF\—This contains property files for custom components specific to a solution that should not be shared with other solutions. lib\—This contains custom components specific to a solution that should not be shared with other solutions. target\—This contains the compiled solution after a project build, in addition to associated class files and XML descriptor files. This folder appears only in a new project after the first build. Note: This folder may be deleted to ensure a clean build. install\—This contains the compiled solution, with the extension .solution. The file contained here can be distributed independently as a complete solution. solution\—This contains copies of all files contained in the solution file from the time of the build. Note: File and folder names within a workflow solution project cannot contain double‑byte characters. However, files themselves may contain double‑byte characters. Developing workflow solutions 17 Managing solution projects The following operations are performed the same way for LDD solution projects and for any project in Eclipse: • • • • Importing existing projects Importing archive files Creating scripts Building projects For more information, see the Eclipse documentation. Editing the properties of an existing workflow solution project After creating or importing a solution, you can change the name of the solution, build version, package name, and version of the LDD server where the solution is installed. 1 Right‑click the solution folder in the Package Explorer pane, and then click Properties. 2 Select LDD 4.x Properties from the list. 3 Edit the properties. The Solution Name, Build Version, Package Name, Valid For, and LDD Server Target attributes can be edited from the General tab, while the Description and Author attributes can be edited from the Description tab. 4 Click OK. Note: Changing the LDD server target does not modify the contents of scripts in any way. Scripts must be manually converted between different versions. Referencing a workflow solution project 1 Make sure the project to be referenced has been built. If Build Automatically is not enabled on the Project menu, then do the following: a Select the workflow solution project in Package Explorer. b Click Project > Build Project. The target\install folder should contain a solution file after a successful build. 2 Determine whether to include or reference the solution project: • An included solution does not update with changes made to the original component project. Do the following to include a solution: a Make sure the parent solution project appears in Package Explorer. b Click and drag the solution file from the target\install folder of the solution project to be included to the root folder of the parent solution project. • A referenced solution updates if the original solution project is changed and rebuilt. Do the following to reference a solution: a Right‑click the parent solution project folder in the Package Explorer pane, and then click Properties. b Select Project References from the list. Developing workflow solutions 18 c Select the check box beside the solution project you want to reference in the workflow solution project. Note: A project must appear in Package Explorer to appear in the Project References list. d Click OK. Evaluating code quality with JSLint To check for problems in your script code during builds, you can enable the included version of JSLint. JSLint evaluates code for overall quality, including syntax, structure, and style conventions, which may help avoid runtime errors by finding issues that cause compiler errors. For more information about the specific checks carried out by JSLint, see the JSLint instructions at www.jslint.com. Note that some checks specific to the use of JavaScript with HTML are omitted from LDD. Additionally, a different comment, described in the following, is used to identify functions defined later in or outside of the script and LDD objects as global variables. When JSLint is enabled, code is parsed during project builds. Any warnings generated are shown in the Problems view. Note: If the Problems view does not appear in Eclipse, then see the documentation for Eclipse. To enable JSLint during the build: 1 In Eclipse, click Window > Preferences. 2 In the category list, expand Lexmark, and then select JSLint. 3 Select Enable JSLint. 4 If necessary, configure the checks to be carried out by JSLint, and then click OK. Note: Project builds for large solutions may be noticeably slower when JSLint is enabled. You may want to enable JSLint only while debugging. Avoiding warnings for functions and LDD objects To identify LDD objects and indicate functions defined later in or outside of the script to JSLint, use the comment /**jsLint variableName */. For example, to identify the LDD top‑level objects, include this comment in the script: /**jsLint caller,confirm,confirmTarget,context,credentials,printerIP,taskInfo */ Understanding types of scripts Using profile scripts Most workflow solution projects include at least one profile script, which, after being assigned to a profile using the Device Policy Editor, can be executed from a printer or software client. A profile script may have any file name other than the names reserved for auto‑configure scripts, and each profile script file should contain a main() function. All LDD objects are available for use in profile scripts, and profile scripts can access library scripts. Developing workflow solutions 19 The script file TestMFP.js in the TestMFP example template is an example of a profile script. Using library scripts Library scripts, which can be accessed only by other scripts, can be used to contain common functionality, such as functions for database access, logging, and progress monitoring. Each function in a library script should use objects and methods appropriate only for scripts that will call it. For example, a library script called by a scheduled script should not use prompt objects or any scan methods. The script file library.js in the TestSNS example template is an example of a library script. Adding a library script to a solution A library script does not require a specific file name. To begin adding a library script, add a blank script in the scripts\ folder. To define the script as a library script, a specific structure is used: • Begin the library section of the script with an empty library() function. • Use the format library.prototype.<functionName> = function(<arguments>) for function headers. • Create a new library object. This must be done as the last line of the script. The following example shows the basic structure of a library script: function library() { } … library.prototype.myFunction = function(myArgument1,myArgument2) { … } … new library(); Accessing the functions of a library script To access the functions of a library script from another script, create an object reference to the library script using the context.callTask() method. The functions in the library script are then available as members of the new object. The first argument in the callTask() method is always taskInfo.solutionName. The second argument is the script file name with no extension. For example, if the previous library script is named “mylibrary.js,” the following line creates an object reference to that library: var myLib = context.callTask(taskInfo.solutionName, "mylibrary"); The included functions can then be accessed as follows: myLib.myFunction(arg1,arg2) Developing workflow solutions 20 Using auto-configure scripts If you have detailed knowledge of the LDD system where a solution will be deployed, then you can write an auto‑configure script that can: • • • • • • • Create a device group. Add printers to a device group. Deploy the solution to a device group. Configure home screens. Discover devices. Perform a policy update. Set the server online. Auto‑configure scripts can be triggered by several events. The event that triggers the script is determined by the name of the script: • configureNewSolution.js—This is triggered when a solution is installed to the LDD system. • configureNewSolutionServer.js—This is triggered when a solution is first added to each LDD server in the LDD system. • configureUpgradeSolution.js—This is triggered after an existing solution is upgraded in the LDD system. • configureUpgradeSolutionServer.js—This is triggered after a solution is upgraded on each server in the LDD system. • configureRemoveSolution.js—This is triggered when a solution is removed from the LDD system. • configureRemoveSolutionServer.js—This is triggered when a solution is removed from each server in the LDD system. • configureSolutionRestart.js—This is triggered when a solution is installed or upgraded, or a server is restarted, in which case it is run for each solution. To add an auto‑configure script to a workflow solution, create a script using the selected name in the scripts\ folder of the workflow solution project. Note: If a solution performs several actions using an auto‑configure script and you are deploying the solution directly to an LDD system by exporting it from Eclipse, then you may need to increase the value of the Solution Export Wait Time setting in the Lexmark preferences to allow enough time for deployment. Using auto‑configure methods All methods used for auto‑configure are members of the caller object, which is detailed in the Lexmark Document Distributor Script Reference. These methods can also be used in a scheduled script in which the caller object is assigned as follows: var caller = context.getObject("autoconfigUtilities") For an example of an auto‑configure script that uses several of the available methods, see the configureNewSolution.js file in the TestMFP template in Eclipse. Additionally, the simplelog.js file in the scheduled\ folder of the TestMFP template contains the preceding var statement and uses auto‑configure methods. Developing workflow solutions 21 Configuring the home screen with auto‑configure The method caller.setWelcomeScreen(groupName, solutionName, fileName) configures the home screen for the specified solution in the specified group. The specified XML file, located in the src\solution \welcomescreen\ folder, provides a description of the layout of the home screen. The description of a home screen for an individual device class is specified using the element <welcomescreen model="class">, where class is one of the following: • • • • • • • • • etask—e‑Task multifunction printers sfp_etask—e‑Task single‑function printers etask2—e‑Task 2 multifunction printers etask2+—e‑Task 2+ multifunction printers sfp_etask2—e‑Task 2 single‑function printers etask3—e‑Task 3 multifunction printers sfp_etask3—SFP e‑Task 3 single‑function printers x642—X642 printers T656—T656 printers (single‑function printer with a touch screen) The layout is specified as an integer in the contents of the <buttonLayout> element. The settings apply as shown in the following table. Buttons for the home screen are contained within a <buttons> element. Each button is defined using the <button> element, which contains the following child elements to define the properties of a button: • <action>—This specifies the action associated with the button. Values available for each device class are shown in the following table. To leave a space on the home screen, do not include this element. If Placeholder is specified for the action, then do not specify any other properties for the button. • <displayText>—This is the custom display text for the button. • <displayIcon>—This is the custom icon for the button. • <profileName>—This is the profile to assign to the button when <action> contains Single Profile, Copy + Profile, Fax + Profile, or Email + Profile. • <shortcut>—This is the shortcut number assigned to the button when <action> contains Shortcut. Developing workflow solutions 22 Device class Valid contents of the <buttonLayout> Valid contents of the<action> element element etask 1–9 The value specifies the number of buttons. Standard printer functions • • • • • Copy Fax Email Forms Printer Panel LDD profile • Single Profile List of profiles • Profiles Shortcut • Shortcut Standard functions overridden by profiles • Copy + Profile • Fax + Profile • Email + Profile sfp_etask 1–n The value specifies the number of buttons and should be the same as the number of <button> elements defined. etask2 1–9 The value specifies the number of buttons on the first page of the home screen. Three subsequent nine‑button pages are included in the layout, providing 27 additional buttons. LDD profile • Single Profile Standard printer functions • • • • • • • • Copy Fax Email Ftp Held Jobs Search Held Jobs Held Faxes Lock Device LDD profile • Single Profile Shortcut • Shortcut Placeholder for an eSF application installed with the solution • Placeholder Developing workflow solutions 23 Device class Valid contents of the <buttonLayout> Valid contents of the<action> element element etask2+ 1–9 The value specifies the number of buttons on the first page of the home screen. Three subsequent nine‑button pages are included in the layout, providing 27 additional buttons. Standard printer functions • • • • • • • • • • • • • • • • Change Language Copy Copy Shortcuts Fax Fax Shortcuts Email Email Shortcuts Ftp Ftp Shortcuts Held Jobs Search Held Jobs Held Faxes Usb Drive Bookmarks Jobs by user Lock Device LDD profile • Single Profile List of profiles • Profiles Shortcut • Shortcut Placeholder for an eSF application installed with the solution • App Reservation • Placeholder Standard functions overridden by profiles • • • • Copy + Profile Fax + Profile Email + Profile Ftp + Profile Developing workflow solutions Device class 24 Valid contents of the <buttonLayout> Valid contents of the<action> element element sfp_etask2+ 1–9 The value specifies the number of buttons on the first page of the home screen. Three subsequent nine‑button pages are included in the layout, providing 27 additional buttons. Standard printer functions • • • • • • • Change Language Search Held Jobs Held Jobs Usb Drive Bookmarks Jobs by user Lock Device LDD profile • Single Profile List of profiles • Profiles Shortcut • Shortcut Placeholder for an eSF application installed with the solution • App Reservation • Placeholder Developing workflow solutions 25 Device class Valid contents of the <buttonLayout> Valid contents of the<action> element element etask3 1–10 The value specifies the number of buttons on the first page of the home screen. Three subsequent ten‑button pages are included in the layout, providing 30 additional buttons. Standard printer functions • • • • • • • • • • • • • • • • Change Language Copy Copy Shortcuts Fax Fax Shortcuts Email Email Shortcuts Ftp Ftp Shortcuts Held Jobs Search Held Jobs Held Faxes Usb Drive Bookmarks Jobs by user Lock Device LDD profile • Single Profile List of profiles • Profiles Shortcut • Shortcut Placeholder for an eSF application installed with the solution • App Reservation Standard functions overridden by profiles • • • • Copy + Profile Fax + Profile Email + Profile Ftp + Profile Developing workflow solutions 26 Device class Valid contents of the <buttonLayout> Valid contents of the<action> element element sfp_etask3 1–4 The value specifies the number of buttons on the first page of the home screen. Three subsequent four‑button pages are included in the layout. Standard printer functions • • • • • • • Change Language Search Held Jobs Held Jobs Usb Drive Bookmarks Jobs by user Lock Device LDD profile • Single Profile List of profiles • Profiles Shortcut • Shortcut Placeholder for an eSF application installed with the solution • App Reservation x642 1–4 If the value is 1–3, it specifies the number of buttons. If the value is 4, it specifies a four‑page layout of four buttons each, providing 16 total buttons. Standard printer functions • • • • • Copy Fax Email Ftp Held Jobs LDD profile • Single Profile Shortcut • Shortcut Placeholder for an eSF application installed with the solution • Placeholder Developing workflow solutions 27 Device class Valid contents of the <buttonLayout> Valid contents of the<action> element element t656 1–9 The value specifies the number of buttons on the first page of the home screen. Three subsequent nine‑button pages are included in the layout, providing 27 additional buttons. Standard printer functions • • • • • • • Change Language Held Jobs Search Held Jobs Usb Drive Bookmarks Jobs by user Lock Device LDD profile • Single Profile List of profiles • Profiles Shortcut • Shortcut Placeholder for an eSF application installed with the solution • App Reservation • Placeholder The placement of each button is determined by the order in which the buttons are defined. • Multifunction printers and single‑function printers with touch screens—The first button specified is the button nearest the upper‑left corner of the home screen in the specified layout. The order of the buttons progresses left‑to‑right, and then top‑to‑bottom by rows. If subsequent pages are present, then each page begins after all buttons have been specified on the previous page. To leave a blank space in the specified layout, define the button using the <button> element, but do not include the <action> element or any other properties of the button. • Single‑function printers without touch screens—The buttons appear as menu items in the order in which they are defined. The following sample XML file specifies a home screen for e‑Task 2 devices: <?xml version="1.0" encoding="UTF-8"?> <welcomescreen model="etask2"> <buttonLayout>5</buttonLayout> <buttons> <!-- Buttons in page 1 --> <!-- A layout of 5 buttons is used, but only positions 2 and 3 on the first page contain buttons --> <button/> <button> <action>Copy</action> </button> <button/> <button> <action>Fax</action> <displayText>My Fax</displayText> </button> <button/> Developing workflow solutions 28 <!-- Buttons in page 2 (page 2 starts after specifying all 5 buttons on the first page) --> <!-- Place a profile button in position 5, using empty buttons for the first 4 --> <button/> <button/> <button/> <button/> <button> <action>Single Profile</action> <profileName>TestMFP</profileName> <displayText>Test MFP</displayText> <displayIcon>images\\testmfp_up.gif</displayIcon> </button> </buttons> </welcomescreen> An example file for the home screen on each device class can be found in the \src\solution\welcomescreen folder of the TestMFP example template. Using forms merge scripts You can use forms merge scripts to perform advanced management of forms merge operations or modify forms merge data and output documents. Using a forms merge script, you can: • Send merged documents to multiple destinations, including e‑mail messages, printers, network shares, FTP locations, or destinations provided by custom components included with the solution. • • • • • • Retrieve and modify input data. Create and insert new data pages. Retrieve the number and description of the port used to submit the job. Retrieve the name of the formset associated with the job. Retrieve global solution settings. Start another merge within the current merge. The following scripting elements are unique to forms merge scripts: • mergeContext top‑level object—This provides fields and methods for forms merge jobs. • DataPage object—This is a page of input data. • FormSetManageClass object—This is used to manage the formset, allowing you to add, delete, and update formsets through the methods specified in this class. • MergeClass object—This is used to merge data with a formset. The script file TestMergeScript.js in the TestMergeScript example template is an example of a forms merge script. Scripting for different stages of a forms merge Forms merge scripts use callbacks to define functions that are activated at various stages of a forms merge job. The main() function in the script contains any actions executed when the job is first submitted, as well as assignments of callback functions. You only need to define and assign callback functions for the stages where scripted actions are necessary. Assign callback functions to the following fields of the mergeContext top‑level object at the end of the main() function (or, when using exception handling, at the end of the try block within the function): Developing workflow solutions mergeContext field to which the callback function is assigned 29 Stage of forms merge at which the Parameters of assigned callback assigned function is called function mergeContext.renderDataPage After each page of input data is read page—DataPage object containing the data from the page mergeContext.endDoc After input from a single form is completed and the resulting PDF is rendered fileName—String containing the path and file name of the output PDF mergeContext.endDataSet fileName—String containing the After input from a single form is completed and the resulting dataset path and file name of the dataset, is generated which can be sent to a printer with a Note: A dataset is generated only if forms card this callback function is defined. mergeContext.endData After all input data is read None mergeContext.endJob After all PDFs included in the job have been rendered files—Array of strings containing the file names of all output PDFs A forms merge script with all callback functions defined is structured as follows: function main() { try { //Actions to take when job is first submitted … //Assignment of callback functions mergeContext.renderDataPage = myRenderDataPageFunction; mergeContext.endDoc = myEndDocFunction; mergeContext.endDataSet = myEndDataSetFunction; mergeContext.endData = myEndDataFunction; mergeContext.endJob = myEndJobFunction; } catch(e) { //Logging and other exception handling … throw e; } } function myRenderDataPageFunction(page) { try { //Actions to take after each page of data //is read from the input data … } catch(e) { //Logging and other exception handling … throw e; } } Developing workflow solutions function myEndDocFunction(fileName) { try { //Actions to take after input from a single form is completed //and the resulting PDF is rendered … } catch(e) { //Logging and other exception handling … throw e; } } function myEndDataSetFunction(fileName) { try { //Actions to take after input from a single form is completed //and the resulting dataset is generated … } catch(e) { //Logging and other exception handling … throw e; } } function myEndDataFunction() { try { //Actions to take after all input data is read … } catch(e) { //Logging and other exception handling … throw e; } } function myEndJobFunction(files) { try { //Actions to take after all PDFs included //in the job have been rendered … } catch(e) { //Logging and other exception handling … throw e; 30 Developing workflow solutions 31 } } Using the PrintClass service with forms merge scripts As in all scripts, you can use the PrintClass service to send a document to a printer. Two fields are particularly important when using PrintClass in a forms merge script: • nativeSpooling—Normally, the destination printer is identified by its IP address, but input data for a forms merge may contain the name of the output queue. Set this field to true, to identify the printer by queue name instead of by IP address. • optionMode—This field should always be set to PrintClass.OPTION_MODE_IGNORE to make sure print settings from the form are used instead of settings that may be defined using PrintClass. Printing forms on printers with forms cards If you have printers with forms cards, you can choose to print forms using a dataset, an XML list of key‑value pairs that represent input data. Most of the information about the final output form is stored on the forms card, and only the dataset is sent to the printer. Because less data is transferred over the network, use of datasets may provide better performance with limited network bandwidth. To use a dataset, define mergeContext.endDataSet in main(), and then use the function assigned to the field to send the dataset to the printer. Using scheduled scripts Scheduled scripts can be created to assist with system maintenance. Since scheduled scripts are launched by the LDD system itself rather than a printer or software client, they cannot use objects that require user intervention, such as prompt objects and scan methods. You can use auto‑configure methods for making changes to the LDD system in scheduled scripts if the caller object is assigned as follows: var caller = context.getObject("autoconfigUtilities") You can also access an Additional Options field that an administrator can populate with free‑form text when scheduling the task in LMC. You should provide the LDD administrator with documentation on any values that the script expects in the field. Scripts access the value supplied by the administrator using the field taskInfo.additionalOptions. To create a scheduled script, create a new script in the src\scripts\scheduled\ folder. For more information about adding scheduled scripts in LMC, see the Lexmark Document Distributor Administrator's Guide. Examples of scheduled scripts can be found in the TestMFP and TestSNS example templates. Developing workflow solutions 32 Understanding the objects used in solution development Most tasks in scripted solutions for the Lexmark Document Distributor are completed by creating and manipulating objects. The Solution Builder Toolkit includes three main types of objects specific to development of solutions for Lexmark Document Distributor: top-level objects, prompts, and services. Top-level objects Top-level objects provide global references to the entity that launched the script, including references to the printer, confirmation page, prompts and services, and task information. For example, the taskInfo object is used to access and set task information, such as the IP of the printer that originated the task or the status displayed with the job in LMC, and the caller object is used to execute a prompt on the printer. function main() { … // Use taskInfo to get the address of the originating printer var printerIP = taskInfo.printer; // Use taskInfo to set the task status in LMC taskInfo.status = "Running"; … // Use the caller object to execute the prompt caller.ask(mystringprompt); … } Prompts Prompts are used primarily during the document capture stage to receive inputs, including both documents and answers to prompts, from the caller (the printer or software client). The following example uses a string prompt to illustrate the basic structure necessary to create, manipulate, and execute most prompts, although some prompts use a different structure. For more information and examples for specific prompts, see the Lexmark Document Distributor Script Reference Guide. Note that a separate function is used for the prompt object to enhance readability and reusability of code. function main() { … var value = promptForString() … } function promptForString() { // Create instance of the StringPrompt object var myprompt = new StringPrompt; // Set text to display when the prompt is executed myprompt.text = "Enter a string"; Developing workflow solutions 33 // Set the default value of the prompt myprompt.value = "sample response"; // Execute the prompt caller.ask(myprompt); // Return the value of the prompt return myprompt.value; } Notes: • No prompts should be used when developing a script to be run on a schedule. • Some prompts are not supported for single‑function printers. For more information, see “Supported printers” on page 9. Services Services are used after document capture for processing and routing documents, as well as providing confirmation of the job to the user. Services may also be used during document capture for processing answers to prompts, such as checking passwords. However, you should avoid excessive processing between successive prompts to prevent unexpected delays for the user. Use the following structure to create, manipulate, and execute a service: // Create an instance of the service object "ServiceClass" var myService = new ServiceClass(); // Set properties of the service object myService.field1 = value1; myService.field2 = value2; // Execute the service myService.execute(); Note: Services that require a user to scan a document should not be used when developing a script to be run on a schedule. Developing workflow solutions 34 Configuring solutions Managing solution settings Solution settings can be accessed from scripts and are available to the LDD administrator through LMC during and after solution deployment. A solution setting is accessed from a script by name, just like a constant or variable. Solution settings may be global or local. The following table lists the differences between global and local solution settings: Setting type Scope Location in LMC Time of first configuration Global All device groups that use the solution Configuration task on The solution is the Solutions tab uploaded to LDD Local A single device group Solutions task on the that uses the solution Device Groups tab; dialog during deployment to a device group The solution is added to a device group Common uses • Global logging on/off • Mail server address • Database server address • Network share for a specific group (for example, one share for a group of printers in the Accounting Department, one for a group of printers in the Audit Department) • Scan settings • E‑mail address of the manager associated with each group Solution settings are generally configured throughout the solution development process as the need arises for each setting. To create solution settings, double‑click solutionSettings.ldd in the src\conf\ folder of the Package Explorer list. The Solution Settings Editor appears in the Editor pane. Separate lists of local and global solution settings are shown. To edit an existing setting, select an item in the Local Solution Settings list or Global Solution Settings list. To add a new setting, click New beside the associated list. To delete the current selection, click Remove beside the associated list. To change the position of the current selection in Lexmark Management Console, click Up or Down beside the associated list. Modify the properties of the selected or new setting using the fields on the right side of the window. While editing properties, click Clear to revert to the properties last saved for the setting, or click Save to save the new properties. Property Description Key This is the name used to access the property from a solution script Name This is the name used for the property in Lexmark Management Console Read‑Only (local solution settings only) This determines whether the property is read‑only. A read‑only property cannot be modified by a script or by the user in Lexmark Management Console. Type This is the type assignment for the property. See the following table of property types for a description of each type. Developing workflow solutions 35 Type Displayed in LMC Properties Check Check box Values: • true • false Content Type List of predefined content type settings Text Value field • Text • Photo • Mixed Any character Note: The Value field can be left blank. Number Value field Any character Note: The Value field should not be left blank, even if the minimum value is set to zero. Password Value field Any character Darkness List of predefined darkness values Values: • • • • • • • • • Depth 0 1 2 3 4 5 6 7 8 List of predefined color depth settings Values: • Black and White • Grayscale • Color Duplex List of predefined duplex settings Values: • Simplex • Long Edge Bound • Short Edge Bound File Type List of predefined file type settings Values: • • • • TIFF JPEG PDF PS Developing workflow solutions 36 Type Displayed in LMC Properties Media Size List of predefined media‑size settings Values: • • • • • • • • • • Resolution Letter Legal A4 B5 Executive A5 Business Card Photo (3 x 5) Photo (4 x 6) Mixed List of predefined resolution settings Values: • • • • • 150 200 300 400 600 Managing device policies The device policy developed within the solution determines the profiles that are made available to a printer or software client when the solution is deployed. Each profile is associated with a script within the solution. The policy also manages the default profile buttons, shortcut number, access control number, scan settings, and eSF applications associated with each profile. The device policy is generally configured near the end of the solution development process, since existing scripts are assigned to profiles. To manage the device policy associated with the solution, double‑click devicePolicy.ldd in the src\conf\ folder of the project in the Package Explorer pane. The Device Policy Editor appears in the Editor pane. To add a profile, click New, type the key for the new profile, and then click Create. To edit a profile, select it in the Device Profiles list. To delete a profile, select it in the Device Profiles list, and then click Remove. A device policy contains a separate sub‑policy for each device class and for software clients. Select a device class from the Device Group list to access the sub‑policy for each, or select Software to access the sub‑policy for software clients. Notes: • Each sub‑policy includes unique settings for Name, Task, No Scan, Profile buttons, Shortcut Number, Access Control Number, and Settings. Values are shown for only the currently selected Device Group. • Sub‑policies for single‑function printers are created using their respective device classes. Select No Scan to enable deploying a profile to single‑function printers. • Scan Settings, Profile buttons, Shortcut Number, and Access Control Number do not apply to software clients. These settings are not available when Software is selected. Developing workflow solutions 37 To reset all settings for a sub‑policy, click Reset beside the Device Group list. While editing properties, click Clear to revert to the last saved properties for the profile, or Save to save the new properties. Note: Changes in a sub‑policy must be saved before selecting a different Device Group. If the sub‑policy has been changed and you select a different Device Group, then you are asked whether to save changes to the current sub‑policy. The following table shows the properties available for each device profile: Property Description Key This property is the name used to access the profile from a script. The key applies to the policy as a whole and does not vary for sub‑policies. Device Group This property allows the solution developer to select which device subtypes are in the profile. The device group can be any of the following: • e‑Task 2—All devices with eSF framework support • e‑Task—Devices without eSF support • Software—LDD printer ports, Select'N'Send, hybrid eSF applications, and other applications that submit jobs to an LDD System using the LDD Job Submission Web Service Name This property is the name used for the profile in Lexmark Management Console. Note: For a profile used with a Lexmark Document Server Port, the name must be 14 or fewer characters. Task This property is the script associated with the policy. No Scan (e‑Task and e‑Task 2) This property indicates whether a scan task is part of the solution. A profile can be deployed to a single‑function printer only when No Scan is selected. No Prompt This property is a control added to note indicating that the profile does not contain prompting. It helps improve the performance of the LDD printer ports for print servers that do not support prompting. This setting is also active for device groups which are set to Software. Select this setting for any existing Software solutions, such as print release, to improve the LDD printer port performance for print servers. Setting (e‑Task and This property is the setting type to add to or edit in the list of settings. See the following table e‑Task 2) of setting types for a description of each type and available values. Mapped (e‑Task and e‑Task 2) This property determines whether the setting is mapped to a solution setting defined in solutionSettings.ldd. Value (e‑Task and e‑Task 2) This property is the value of the setting to add to or edit in the list of settings. See the following table of setting types for the available values for each setting type. Overrideable (e‑Task and e‑Task 2) This property determines whether the user at the printer can override the setting when the solution is run. Shortcut Number This property is the shortcut number by which a user can access the profile from the printer. Access Control Number This property is the number used to assign access controls specifically to the profile, using one of the Solution 1–10 settings in the printer Embedded Web Server. The following table shows the setting types available for device profiles: Developing workflow solutions Type 38 Available values Content Type • Text • Photo • Mixed Darkness • • • • • • • • • 0 1 2 3 4 5 6 7 8 Depth • Black and White • Grayscale • Color Duplex • Simplex • Long Edge Bound File Type • • • • TIFF • • • • • • • • • • Letter Media Size JPEG PDF PS Legal A4 B5 Executive A5 Business Card Photo (3 x 5) Photo (4 x 6) Mixed Orientation • Portrait • Landscape Resolution • • • • • 150 200 300 400 600 Developing workflow solutions 39 Profile buttons You can package profile buttons to appear on the home screen as part of the device policy for e‑Task and e‑Task 2 devices. When e‑Task or e‑Task 2 is selected in the Device Group list, the Profile Button(s) section appears. Additionally, when e‑Task 2 is selected, a selection appears for e‑Task 2 or e‑Task 2+ profile buttons, representing older and newer e‑Task 2 printers, respectively. You can determine which setting to use by matching the preview of the default image with the look of the existing buttons on the printer display. You can load separate images for Up Image and Down Image. The Up Image shows when the button is in default state, and the Down Image shows while the user is pressing the button. If no Down Image is specified, then the Up Image is used for both conditions. Note: File names of images used for the home screen cannot contain double‑byte characters. Images selected are resized to the following dimensions for each device class. For best results, resize or crop source images to the correct size before use. • • • • e‑Task—120 x 80 pixels e‑Task 2 and e‑Task 2+, SFP e‑Task 2+—120 x 75 pixels e‑Task 3—172 x 254 pixels X642—120 x 55 pixels eSF applications To associate an eSF application with the e‑Task 2 sub‑policy for a hybrid solution, click Import beside the eSF Applications list, and then locate an eSF application. Select the newly imported application in the list, and then make sure that e‑Task2 is selected in the Device Group list. To remove a previously imported eSF application, select it from the list, and then click Remove. Note: File names of eSF applications used in a solution cannot contain double‑byte characters. To manage the settings associated with the eSF application and allow configuration in LMC, import and configure the descriptor file for the eSF application. Notes: • LDD cannot accept colons in XML tag names, which appear in some descriptor files for eSF applications. Uploading a solution with a descriptor file containing colons in tag names disables the Solutions tab and the eSF Configuration task for device groups. Restoring access requires intervention from Lexmark Professional Services. Before importing the descriptor file, open it in a text editor and remove any colons from tag names. For example, if the tag <esf:display pattern="instptrn"> appears in the file, then change it to <esfdisplay pattern="instptrn">. Make sure to change matching closing tags as well. • LDD can manage eSF application settings for e‑Task 2+ printers only. Configure eSF application settings for e‑Task 2 and X642 printers using the Embedded Web Server on each printer after the application is deployed. 1 Select the eSF application from the eSF Application list. 2 Click Descriptor. 3 Locate the XML descriptor file for the eSF application. The file name should be the same as the file name of the eSF application, with an ”.xml” extension and “_desc” appended before the extension. 4 Click Open. 5 Select the eSF application from the eSF Application list. Developing workflow solutions 40 6 Click the eSF Descriptor Editor tab at the bottom of the Device Policy Editor. 7 Modify the settings if necessary, and then click Save. Managing the Solution Status Page The Solution Status Page can optionally be used to provide simple and easy-to-use access to status information for the server system where the solution is running and the printers in the device groups to which the solution is deployed. The Solution Status Page is ideal for users with a basic setup who are not experienced with LMC. Additionally, new printers and licenses can be added, and a single Fix button can fix many common problems. The Solution Status Page is particularly suited to less experienced users. Note: The Solution Status Page can be enabled only for solutions designed for device groups. To manage the Status Page associated with the solution, double‑click statusPage.properties in the src\conf\ folder of the project in the Package Explorer pane. The Status Page Editor appears in the Editor pane. Click Enable Status Page to enable the Status Page for the solution and show the additional Status Page settings. Two tabs are available at the bottom of the Status Page Editor to modify Status Page settings: • Status Page Editor—This provides access to the following basic settings of the Status Page: – Device Group Name—This is the Device Group for which the Status Page is used. – Background Image—This is the background image of the Status Page. – Logo Image—This is the logo image that appears beside the title of the Status Page. – Jobs Logo Image—This is the logo image that appears in the jobs section of the Status Page. • Status Page Properties—This provides access to all Status Page settings in the text‑based configuration file. In addition to the previously mentioned settings, most titles and message strings used on the Status Page can be customized. When a solution has been deployed with a Solution Status Page, the page can be accessed from your Web browser using the URL http://loadbalancer:9780/lmc/statuspage/? solutionName=<solutionname>, where loadbalancer is the computer where your load balancer and database are installed. Developing workflow solutions 41 Managing formsets You can use forms merge in a solution by including formsets created with Lexmark Forms Composer. Formsets included in a workflow solution project are uploaded to the LDD system when the workflow solution is installed. Formsets are added as needed throughout the solution development process. To manage formsets, double‑click forms.ldd in the src\conf\ folder of the Package Explorer list. The Forms List Editor appears in the Editor pane. The list of included formsets is shown. To add a formset that will be installed with a workflow solution: 1 In the Forms List Editor, click Import. 2 Browse to a formset (.sdd or .fdd) file. 3 Click Open. When uploaded, formsets may be shared among workflow solutions, and the administrator selects whether to remove associated formsets when removing solutions. To create a link with a formset included in another workflow solution: 1 In the Forms List Editor, click Link. 2 In the Form Name field, type the name of the formset. 3 Click Create. To remove a formset from the project, select it from the Forms List, and then click Remove. Managing custom reports LDD uses JasperReports for custom reports, which can be included with a workflow solution during development. You can create custom reports using the open source application iReport 3.5.2. For more information about overall report design, see the documentation for iReport, and for specific information about developing custom reports for LDD, see the Lexmark Document Distributor Administrator's Guide. Custom reports are added as needed throughout the solution development process. To manage custom reports, double‑click reports.ldd in the src\conf\ folder of the Package Explorer list. The Reports List Editor appears in the Editor pane. The list of included reports is shown. To add a report that will be installed with a workflow solution: 1 In the Reports List Editor, click Import. 2 Browse to a compiled JasperReports (.jasper) file. 3 Click Open. To edit the settings of a report after it is imported: 1 Select the report file from the Reports list. 2 Type a descriptive report name. 3 Select an output format. Note: Some reports are designed for a particular output format. For more information about a custom report, contact the designer of your custom report. 4 Select Database from the Datasource drop‑down menu. 5 Select Monitor from the Source Choice drop‑down menu. Developing workflow solutions 42 6 If you are using auto‑configure to schedule the report, then select the period for the report to cover. 7 Add a custom parameter for either a query parameter defined in the custom report file: a In the Key field, type the name of the parameter defined within the report. b Select the parameter type to identify the type of data contained in the parameter. c Type a default value for the parameter. Notes: • To add multiple custom parameters, save the report settings, and then enter the information for the next custom parameter. • To remove a custom parameter, select it from the list, and then click Remove. 8 Click Save. Using the included document processing components Bar code read support The LDD SDK includes two bar code read packages: a premium Windows native package, and a lower‑cost Java package. The following tables compare the details of each package: Premium package LDD script objects Value package BarcodeReadClass BarcodeConstant BarcodeReadLiteClass BarcodeReadLiteConstant License fees Required for each LDD server installation Included in system cost Code Windows native (.NET or COM) Java Performance Faster Slower Solution template project TestBarcodeRead TestBCRead Ideal scan resolution 300 dpi 300 dpi Expected quality Excellent, Good, Fair, or Poor Interval between scanned pixel rows, 1– 100 Reading from a specified zone Yes No Automatic detection of one‑dimensional codes Yes No Checksum validation Yes Yes Fixed length Yes No Minimum length Yes No Page number Yes No Coordinates Yes Yes Multiple codes with directional sorting Yes Yes Developing workflow solutions 43 One‑dimensional symbology support Premium package Value package Codabar Yes Yes Code 11 No Yes Code 25 Yes No Code 32 Yes Yes Code 39 Yes Yes Code 39 mod 43 Yes No Code 93 Yes Yes Code 128 Yes Yes EAN 8 Yes Yes EAN 8 + 2 Yes Yes EAN 8 + 5 Yes Yes EAN 13 Yes Yes EAN 13 + 2 Yes Yes EAN 13 + 5 Yes Yes GS1‑128 (formerly UCC/EAN‑128) Yes No Note: The GS‑128 symbology is specified for the type field of BarcodeReadClass using the constant BARCODE_UCC128 GS1 DataBar (formerly RSS) No Yes Note: The GS1 DataBar symbology is specified for the type field of BarcodeReadLiteClass using the constant BC_CODERSS14 or BC_CODERSSLIMITED. ITF‑14 Yes No Patch Code Yes Yes PLANET Yes Yes POSTNET Yes Yes QR Code No Yes RM4SCC No Yes Telepen No Yes UPC‑A Yes Yes UPC‑E Yes Yes USPS Intelligent Mail Yes No Developing workflow solutions 44 Two‑dimensional symbology support Premium package Value package Datamatrix Yes Yes PDF417 Yes Yes Bar code write support The LDD SDK includes two bar code write packages: a premium Windows native package, and an open source, Java‑based Barbecue. The following tables compare the details of each package: Features and usage Premium LDD script objects BCWriteClass BCWriteClass.options BarcodeConstant Barbecue ImagingClass.options.overlay.barcode BarcodeConstant License fees Required for each LDD server installation Open source; no fees Code Windows native (.NET or COM) Java Custom minimum width No Yes Human‑readable text Above, below, or embedded position Below only Human‑readable text Controllable justification Fixed Premium Barbecue Codabar Yes Yes Code 25 Yes Yes Code 25 Interleaved Yes Yes Code 39 Yes Yes Code 93 Yes No Code 128 Yes Yes Code 128A Yes Yes Code 128B Yes Yes Code 128C Yes Yes EAN 8 Yes No EAN 8 + 2 Yes No EAN 8 + 5 Yes No EAN 13 Yes Yes Developing workflow solutions 45 Premium Barbecue EAN 13 + 2 Yes No EAN 13 + 5 (Bookland) Yes Yes GS1‑128 (formerly UCC/EAN‑128) Yes Yes GS1‑DataMatrix Yes Yes ITF‑14 Yes No POSTNET Yes Yes QR Code Yes No UPC‑A Yes Yes UPC‑E Yes No USPS Intelligent Mail Yes No Premium Barbecue Yes No Note: The GS‑128 symbology is specified for the type field using the constant BARCODE_UCC128 PDF417 OCR support Lexmark Document Distributor optionally includes an optical character recognition (OCR) module to retrieve text from scanned documents, enabling them for searching, editing, and indexing. Entire documents, specific pages of documents, or specific areas of pages can be stored as text documents. The following table lists the features of the OCR module: Developing workflow solutions Feature Supported languages 46 Details • • • • • • • • • • • • • • English Czech Danish Dutch Finnish French German Italian Norwegian Polish Portuguese Russian Spanish Swedish Note: Czech is supported only in LDD 4.8.5. Dictionaries Supported text types Each language has one associated dictionary. The search order of language dictionaries can be configured in a script. • • • • • • • • Common typographic (serif, sans‑serif, italic, monospace) Typewriter‑printed Dot‑matrix‑printed ZIP‑code‑style numerals OCR‑A OCR‑B MICR (E‑13B and CMC‑7) Gothic Supported input text size 10 points–220 points Default output fonts The following selections are made for default output fonts based on the input font: • Serif fonts—Times New Roman • Sans‑serif fonts—Arial • Monospaced fonts—Courier New Output fonts can be changed to any supported TrueType fonts within a script, after the OCR operation, and before the text is exported to a document. Zoning • Automatic—The entire page is scanned and analyzed for blocks of text. • Manual—The script defines regions on a page for OCR scanning. This method is faster, since it does not require analyzing the entire page. Developing workflow solutions Feature Available output formats Document color 47 Details • HTML • Searchable PDF – PDF versions 1.3 to 1.6 (LDD 4.8.1.0 and later – PDF-A (LDD 4.8.1.0 and later) – PDF-A1a (LDD 4.8.1.0 and later) – MRC compression (LDD 4.8.5.0 and later) • Plain text (TXT) • Rich Text Format (RTF) Supported for input: • Bitonal • Grayscale • Color Supported for output: • Bitonal • Color Resolution Input is accepted from documents scanned at 150–600 dpi. For best performance, scan documents at 300 dpi. Image‑processing capabilities The following image‑processing tasks are available: • • • • Despeckle Deskew Rotation (90‑degree increments) Identification of text without output of text Accuracy factors The accuracy of the OCR module depends on the quality of the image scanned from the document, which is determined by the following factors: • Media type—More‑reflective specialty media may result in poor‑quality scanned images. • Document condition—Aged, wrinkled, or creased documents may result in poor‑quality scanned images. • Document image quality—Low resolution or color depth of the scanned image or poor print quality in the scanned document may result in poor‑quality scanned images. • Document alignment—Skewed or slightly rotated documents, such as pages fed through a misaligned automatic document feeder (ADF) may cause difficulty in reading the scanned image. Using the included solution database The LDD system includes a Firebird database that your solutions can use to store information instead of a custom database. This allows you to create and modify tables without first creating a custom database, and data in the included database is automatically migrated to a new version when the Firebird database installation used by LDD is upgraded. The included database is SOLUTIONINFO.fdb, located in the \firebird\data\ folder where the LDD database is installed, along with the system databases. Developing workflow solutions 48 The credentials for the database are as follows: • User name—framework • Password—rivet Understanding the Job Submission Web Service LDD 4.x provides an interface called the Job Submission API (JSAPI) that allows Web service–capable client software to interact with an LDD system. It supports both representational state transfer (REST) and simple object access protocol (SOAP) Web services. Client applications (such as eSF applications, Select'N'Send, Lexmark Document Server Ports, and other applications) can use these services to run an LDD script or profile. Using JSAPI, the client software can also pass extra metadata to the running script or profile for additional processing or data capture. Through the Web service, clients can do the following: • • • • Query the system for the profiles available to a client system based on the IP address of the client. Submit documents to the LDD system. Execute a profile to process documents. Query the system for task progress and status. The following requirements must be met for the Web service to be available to a client: • A software client license is installed for the client. • The IP address of the client has been added to a software client group. • A solution with the client software script or profile is installed and added to a software client group. Note: Multiple software client groups and client software solutions, scripts, or profiles can be installed on an LDD system. • The LDD system is online. Using REST JSAPI REST JSAPI is available only in LDD 4.6.4.1 or later. Notes: • • • • All server responses and client requests are in JavaScript Object Notation (JSON) format. REST JSAPI supports both HTTPS and HTTP. Strings passed to and from the API should be UTF‑8 encoded. Dates returned from the API are in POSIX time format. Use the following HTTP methods when sending requests to the server: • • • • POST—Create a new resource. GET—Retrieve a resource. PUT—Edit a resource. DELETE—Remove a resource. The base URI for RESTful JSAPI is http://loadbalancer:9780/lmc/rws/jsapi, where loadbalancer is the name or IP address of the load balancer. Developing workflow solutions 49 Submitting jobs Sample request URI: /jsapi/v1/jobs Method: POST Version: v1 Content‑type: multipart/form‑data HTTP Form Parameters: (*Required parameter) The following table lists the HTTP form parameters used when submitting a job: Parameter key or object Value type profileName* String Description The name of the LDD profile to execute that is in an LDD SDK solution installed on an LDD system. For example, use Test SNS with the TestSNS example solution. authId* String The name of the user who submitted the job. clientIPAddr* String The IPv4 address of the client submitting the job. Note: IPv6 addresses are not supported. clientHostName* String The host name of the client submitting the job. A fully qualified domain name (FQDN) is preferred. Note: If the host name cannot be determined, then use the IP address. clientMACAddr* String The network card MAC address of the client submitting the job. For example, 12:BA:4F:67:91:B4. submitTime* Long The time on the client when job submission started. Note: Use POSIX time format. For example, 1340125377 GMT. appId* String The application ID where the job is coming from. Use one of the following IDs: • PNS—Use for jobs sent from LDD printer ports. • SNS—Use for jobs sent from LDD Select’N’Send client software applications. • • • • eSF—Use for jobs sent from eSF applications. cSF—Use for jobs sent from cSF or WebKit applications. LSP—Use for jobs sent from Lexmark Solutions Platform (LSP). mobile—Use for jobs sent from mobile applications. Note: The TestSNS example solution only looks for PNS and SNS IDs. resolver String Use either of the following: • software—Use for clients that are associated with a software client group and client software script or profile. • hosted—Use if the client is not associated with LDD software client group settings. Note: If no value is added, then the parameter defaults to software. * Required parameter Developing workflow solutions Parameter key or object Value type language String 50 Description The language used by the client. Use the format ISO 639‑1_ISO 3166‑1. For example, en_US. The first two letters are important, and the next two letters are used only to distinguish between Simplified (zh_CN) and Traditional (zh_TW) Chinese. Notes: • This language ID format is used by Lexmark printers. • For more language strings, navigate to the LDD SDK script reference, and then click taskInfo > language information (taskInfo.language). You can also open a Web browser and search for “ISO 639‑1” and “ISO 3166‑1.” • If no value is added, then the parameter defaults to en_US. xyz String, Other metadata (key and value pairs) that is needed by the specific profile integer, etc. launched by the job submitted. file object File object File binary, file name, file extension, etc. The key name must be prompt.[x].file.[y], where x is the scan prompt number and y is the number of the file returned by the prompt. For example, prompt.0.file.0. x and y are both zero‑based. * Required parameter 201 Created indicates a successful response, and the HTTP header value indicates the new resource location. Sample response 201 Created Location: http://xxx.xxx.xxx.xxx:9780/jsapi/v1/jobs/123456 Content‑Type: application/json [json‑data] Sample success JSON response { "jobID": "123456" } If the submission fails, then one of the following errors is returned: • 400 ‑ client did not send required data ‑ list of required parameters that are missing • • • • 403 ‑ client software not licensed 403 ‑ client address is not in the list of allowed devices 403 ‑ client user is not authorized 404 ‑ profile name does not exist Sample error JSON response for a 403 error { "reason": "client software is not licensed" } Developing workflow solutions 51 Querying a job status Sample request URI: /jsapi/v1/jobs/{jobID} Method: GET Version: v1 Parameters: (*Required parameter) {jobID} is the ID returned from the submit job request. The following table lists the keys returned when querying a job status: Key Value type Description jobID String The ID of the job you are querying. state String The status of the job you are querying. The status can be one of the following: • Running—The profile initiated by the job is still running. • Completed—The profile initiated by the job is completed. • Error—The profile initiated by the job is stopped because of an error. percentComplete Integer The percentage of how much the profile initiated by the job is completed. Note: If the percentComplete value is not 100 or the state value is not error, then do not update percentComplete in the profile. solutionName String The name of the solution on the LDD system that contains the profile. taskName String The name of the task or script running on the LDD system for the profile. submitTime Long The time on the client when job submission started. The returned time is in POSIX time format. For example, 1340125377 GMT. startTime Long The time on the LDD system when the job started. The returned time is in POSIX time format. For example, 1340125377 GMT. Note: If the job is not started, then this key is not added in the returned JSON data. endTime Long The time on the LDD system when the job ended. The returned time is in POSIX time format. For example, 1340125377 GMT. Note: If the job is not started, then this key is not added in the returned JSON data. authID String The name of the user who submitted the job. clientIPAddr String The IPv4 address of the client submitting the job. Note: IPv6 addresses are not supported. clientHostName String The host name of the client submitting the job. Note: If the host name cannot be determined, then the IP address appears. clientMACAddr String The network card MAC address of the client submitting the job. Developing workflow solutions 52 Key Value type Description appID String The application ID where the job is coming from. The ID can be one of the following: • • • • • • PNS—For jobs sent from LDD printer ports. SNS—For jobs sent from LDD Select’N’Send client software applications. eSF—For jobs sent from eSF applications. cSF—For jobs sent from cSF or WebKit applications. LSP—For jobs sent from Lexmark Solutions Platform (LSP). mobile—For jobs sent from mobile applications. Note: The TestSNS example solution only looks for PNS and SNS IDs. language String The language used by the client. srvIPAddr String The IP address of the LDD server processing this job. srvHostName String The host name of the LDD server processing the job. Note: If the host name cannot be determined, then the IP address appears. srvThreadName String The name of the thread that is processing the job. For example, workflow‑29. Sample success JSON response 200 OK Location: http://xxx.xxx.xxx.xxx:9780/jsapi/v1/jobs/123456 Content-Type: application/json Content-Length: xxxx { "jobId": "123456", "state": "running", "percentComplete": 40, “solutionName”: “TestSNS”, “taskName”: “testsns”, “submitTime”: 1340125377, “startTime”: 1340125400, “authId”: “smith”, “clientIPAddr”: “10.190.64.123”, “clientHostName”: “my-pc.area.company.com”, “clientMACAddr”: “12:BA:4F:67:91:B4”, “appId”: “mobile”, “language”: “en_US”, “srvIPAddr”: “10.190.64.75” “srvHostName”: “lddsrv1.area.company.com” “srvThreadName”: “workflow-29” } Using SOAP JSAPI SOAP JSAPI is available in LDD 4.3.x.x or later. We recommend using RESTful JSAPI instead of SOAP JSAPI to work with your client software applications. For more information, contact your Lexmark representative. The following table lists the methods used with the SOAP Web Service: Developing workflow solutions 53 Method Target Description start Load balancer Initiates a job submission session. Parameters • resolver—The resolver used to determine the device group, solution, and task settings. The default resolver uses clientIP and profileName only. • protocol—The protocol used to extract prompt answers from the metadata. The default is webdav. Return values • sessionID— The session ID, which must be used in later calls. • tomcatIP—The address of the LDD server, which must be the target for later calls. • scanUrl—The WebDAV folder where documents are submitted. • authId—The client user name. • clientIP—The client IP address. • deviceGroup— The device group associated with the job. • profileName— The profile used for the job. post WebDAV Submits files in response to ScanPrompt. See the WebDAV documentation Developing workflow solutions 54 Method Target Description metadata LDD server Provides answers for other prompts. Parameters • continue— Return values Reserved. Indicates that more metadata follows. • scan.x.file. y—The path of a scanned file in the WebDAV repository. x indicates the sequence number of a scan prompt, and y indicates the sequence number of a file from that scan prompt. x and y are both zero‑based. nextPrompt (optional) LDD server Requests for the next sessionID—The prompt. session ID returned from the initial start call. return nextPrompt—The parameters of returned changes based on the prompt type. finish—Shows the finish button. back—Lets users go to the previous prompt. type—Prompt type. queryTaskStatus (optional) LDD server Calls this method with the sessionID to determine if the job has is successfully. sessionID—The session ID returned from the initial start call. percentComplete —The percentage of the job completion that is updated as the script runs. id—The session ID from the start of the job. status—Shows the status of the job. startTime—The time when the job started. endTime—The time when the job ended. Developing workflow solutions 55 Understanding dynamic prompting support When a profile is selected, solutions usually either prompt you for information or start a job. Many solutions involve submitting jobs with related information (such as account numbers, passwords, or processing options) that is obtained through prompting. Where possible, prompting should occur before submitting the job. This gives you the opportunity to cancel jobs when prompted for information they don't have at the moment. The Job Submission Web Service provides prompting capability to Lexmark Document Server Printer Port clients. From the port monitor, the following prompts are supported: • • • • • • • • • MessagePrompt BooleanPrompt IntegerPrompt ListPrompt ArrayPrompt PasswordPrompt ScanPrompt MessagePrompt EndPrompt When the prompt wizard appears on the client screen, you can respond to the prompt within 30 seconds before it times out. Prompting depends on whether or not there are any more required information or documents to process. If there are more, then the end user is asked whether to continue or not. When the user reaches the last prompt, a summary dialog of the answers appears. The user can then choose to send or cancel the job. You can cancel the job at any time, although cancelling the job cannot undo the job application processing that has already taken place. Note: LDD 4.6.3.x printer ports on a clustered print server is not supported. Using Kerberos authentication If a user logs in at a printer using Kerberos, then the LDD system uses the credentials to manipulate network files or interact with ECM systems. Notes: • Enable secure communication between printers and servers in the LMC for any device group that uses a solution with Kerberos authentication. • Make sure that the date and time on the printer, LDD server, and KDC server are synchronized. The following objects use Kerberos authentication: • • • • FileClass LdapClass SharePointClass TextFileClass If necessary, Kerberos tickets are accessed, and no additional scripting is necessary. Note: Credentials set for an object in a solution script override Kerberos credentials. Developing workflow solutions 56 You can set a KDC address and realm within a script using the credentials top‑level object: credentials.add(“kdc”, “myhost.mycompany.com”); credentials.add(“realm”, “myrealm.mycompany.com”); Developing workflow solutions for previous versions of LDD You can use the current version of the LDD SDK to develop workflow solutions for previous versions of LDD 4.x. However, auto‑complete is installed in JSEclipse only for the objects in the latest version of LDD, so do not rely on auto‑complete when developing solutions for previous versions. For information about objects in previous versions of LDD, see the Lexmark Document Distributor Script Reference. Testing and deploying workflow solutions 57 Testing and deploying workflow solutions Testing with the MFP emulator and performance simulator The MFP emulator and performance simulator are used to test LDD solutions without a physical printer. The emulator interactively emulates an e-Task 2 printer control panel. The performance simulator lets you set parameters and quickly run multiple tests simulating either an e-Task or an e-Task 2 printer. The interactive emulator is useful for preliminary debugging, and the performance simulator is useful for comprehensive functional and stress testing. Note: In Windows 7 or later, make sure to run Eclipse and LDD SDK as an administrator, for the simulator and emulator to function properly. Accessing the MFP emulator or performance simulator • To access the interactive MFP emulator: In Eclipse, click LDD SDK > MFP > Emulator (eTask2). • To access the performance simulator: In Eclipse, click LDD SDK > MFP > Performance Simulator. If you are running the MFP emulator or performance simulator for the first time, then the installation window appears: 1 If necessary, change the folder where to install the application. Note: The installation path cannot contain double‑byte characters. 2 To launch the emulator or performance simulator after installation (depending on your initial selection) , select Launch Emulator. 3 Click Finish. If you selected Launch Emulator or if the MFP emulator is already installed, then the interactive MFP Emulator or MFP Simulator configuration window appears. Using the interactive MFP emulator Using the interactive MFP emulator with an LDD system 1 From the MFP Emulator configuration window, click Interactive Mode > MFP > Emulator (eTask2). The home screen window appears, and the emulator is accessible as a printer from LMC. 2 Make sure the LDD system is online. 3 Upload the solution to be tested in LMC. For more information about uploading a solution to the LDD system, see the Lexmark Document Distributor Administrator's Guide. Testing and deploying workflow solutions 58 4 Add the MFP emulator to a device group in LMC, and then discover it. Note: The IP address of the emulator is the IP address of the computer where it is running. This address appears beside Client IP in the MFP Emulator configuration window, as well as in the upper‑left corner of the home screen. 5 Deploy the solution and modify the home screen for the device group as necessary, and then perform a policy update. 6 If you included the profile on the home screen, then click the icon for the profile. If the profile does not appear on the home screen, then do the following: a Click Held Jobs > Profiles. b Click the icon for the profile. The profile launches the associated script on an LDD server. Note: Some prompts are not supported in interactive mode. When a script includes an unsupported prompt, a message appears on the emulated printer control panel. Click Next to continue the script after the prompt. Simulating a scan task 1 Type or browse to the path of a TIFF, JPEG, PDF, or PostScript file to simulate the document to be scanned. 2 Click OK. To assign a default image file to appear in each Scan File dialog, click File > Properties. Saving print jobs Print jobs initiated by a profile are discarded by default. To enable saving print jobs: 1 Make sure you have run the interactive emulator at least once. The configuration that contains the settings for the interactive emulator is created automatically the first time it is run. 2 Locate the \Profiles\interactive\conf\ folder where the MFP emulator is installed. The default is C:\Program Files\mfpsimulator\. 3 Open sim‑interactive.properties in a text editor. 4 If necessary, modify the location where print jobs are saved beside interactive.advanced.pj.output=. 5 Change the value beside interactive.advanced.pj.save= to true. 6 If the interactive emulator is open, then close, and then restart it. Using the performance simulator Preparing and running tests in the performance simulator 1 From the MFP Simulator configuration window, click File > New Configuration. 2 Type the IP address or host name of the LDD system in the Load Balancer IP field. Testing and deploying workflow solutions 59 3 Type the profile name to execute. Note: The profile name refers to a device profile created using the Device Policy Editor in the solution. A list of profiles can also be found in the Profiles task after the solution has been deployed to the relevant device group in LMC. 4 Select whether to simulate an e‑Task 2 or e‑Task device. 5 Discover the performance simulator and deploy the appropriate solution in LMC: Note: This step is only necessary if the interactive MFP emulator or performance simulator has not been discovered, or if the necessary solution has not been deployed. a To set the simulator to discovery mode, type 0 for both “Number of MFPs” and Repetitions fields. b c d e Click to save the test profile, and then click to start the simulator in discovery mode. Make sure the LDD system is online. Upload the solution to be tested in LMC. Add the performance simulator to a device group in LMC, and then discover it. Note: The IP address of the simulator is the IP address of the computer where it is running. This address appears in the Client IP field in the MFP Simulator configuration window. f Deploy the solution and modify the home screen for the device group as necessary, and then perform a policy update. g Click to stop the simulator. 6 Type the number of MFPs to simulate. 7 Type the number of repetitions for the test. 8 In the Scan File field, browse to a TIFF, JPEG, PDF or PostScript file to use in simulating a scan task. 9 If necessary, configure advanced settings, including any answers to prompts that should be different than the default. For more information, see “Configuring advanced properties” on page 59. 10 To create a log during the test in Log4J, select Enable UI Logging. 11 Click to save the test profile, and then click to start testing. You can stop a test that is still in progress by clicking . Configuring advanced properties Several advanced properties for the performance simulator, including custom prompt answers, are found on the Advanced tab of the MFP Simulator configuration window. Some properties also appear as fields on the Configuration tab. The selection of E‑Task2 or E‑Task on the Configuration tab determines whether the Advanced (e‑Task 2) or Basic (e‑Task) properties are used. To save the test configuration after modifying advanced properties, click . Testing and deploying workflow solutions 60 Property Description Default serverAddress The IP address or host name of the LDD system None profileName The profile to run on the LDD system None Note: The profile name refers to a Device Profile created using the Device Policy Editor in the solution. A list of profiles can also be found in the Profiles task for the relevant device group in LMC. cancelProbability The probability that the profile will be canceled, expressed as a decimal between 0 and 0.0 1. In repetitive testing and testing on multiple printers, the profile is canceled for the specified percentage of the tests, with canceled tests randomly selected. When the application determines that a particular test will be canceled, a random prompt is selected within that test for the point of cancellation. The setting 0 specifies that no tests are canceled, and the setting 1 indicates that every test is canceled at a random prompt. ui.logging Determines whether the test is logged in Log4J false Property Description Default basic.addressRange The IP addresses used for emulated e‑Task printers. A single IP may be used to emulate multiple e‑Task printers at a single address, since the emulator can use multiple HTTP connections for e‑Task. Multiple addresses are specified as a range, in the format xxx.xxx.xxx.xxx‑xxx.xxx.xxx.xxx, and each included address must be bound to a network adapter in the local computer. If multiple addresses are specified, then only the first is used unless basic.multiIP is set to true. Local IP address (set autotmatically when the simulator is started) basic.scanfiles The TIFF, JPEG, PDF, or PostScript files to use in simulating None the scan task. The setting can contain a comma‑delimited list of multiple files, which are submitted together for the scan task. Note: The delimiter used in the list can be changed using the scanFileDelimiter property. basic.promptAnswers None A comma‑delimited list of answers to supply for prompts asked by the profile. If left blank, the default response is used for all prompts. If you need to supply an answer for any prompt, then you must supply all answers for the applicable logic path. For more information, see “Supplying answers to prompts” on page 67. Note: The delimiter used in the list can be changed using the delimiter property. basic.repetitions The number of repetitions for the test on each emulated printer. Use 0 for both this property and basic.nummfps to enter discovery mode. 0 Testing and deploying workflow solutions 61 Property Description Default basic.nummfps The number of printers to emulate for the test. Use 0 for both 0 this property and basic.repetitions to enter discovery mode. Note: It is not recommended to emulate more than 250 printers. basic.bind Determines whether to bind the local IP address to the print true listener for receiving print jobs basic.prompting Indicates to the application whether the profile contains prompts true basic.scanning Indicates to the application whether the profile contains a scan task true basic.profilerunTimeThreshold The time in milliseconds allowed for a profile to run before a 30000 warning message is logged basic.timeToFirstPromptThreshold The time in milliseconds allowed for the first prompt in the profile to display before a warning message is logged 2000 basic.multiIP Determines whether multiple IP addresses are used for emulating multiple e‑Task printers. If false, then only the first address specified for basic.addressRange is used. If true, then the number of addresses specified for basic.addressRange must match the number specified for basic.nummfps. true (automatically changed to false if the test is run without specifying multiple addresses) basic.readTimeout The timeout in milliseconds for reading data from the LDD system 360000 basic.connectionTimeout The timeout in milliseconds for connection requests to the LDD system 180000 native This property should always be false for LDD 4.x. false basic.useRandomFileFromDirectory Determines whether a random file is used from the folder false specified in basic.randomFileDirectoryPath for simulating the scan task. When set, these properties override files specified for basic.scanfiles. basic.randomFileDirectoryPath Specifies the folder where image files for scans can be found None when basic.useRandomFileFromDirectory is set to true Testing and deploying workflow solutions 62 Property Description Default advanced.promptAnswers A comma‑delimited list of answers to supply for prompts None asked by the profile. If left blank, the default response is used for all prompts. If you need to supply an answer for any prompt, then you must supply all answers for the applicable logic path. For more information, see “Supplying answers to prompts” on page 67. Note: The delimiter used in the list can be changed using the delimiter property. advanced.addressRange The IP addresses used for emulated e‑Task 2 printers. A single IP may be used to emulate multiple e‑Task 2 printers at a single address, since the emulator can use multiple HTTP connections for e‑Task 2. Multiple addresses are specified as a range, in the format xxx.xxx.xxx.xxx‑xxx.xxx.xxx.xxx, and each included address must be bound to a network adapter in the local computer. If multiple addresses are specified, then only the first is used unless advanced.multiIP is set to true. advanced.repetitions The number of repetitions for the test on each emulated 0 printer. Use 0 for both this property and advanced.nummfps to enter discovery mode. advanced.nummfps The number of printers to emulate for the test. Use 0 for 0 both this property and advanced.repetitions to enter discovery mode. Local IP address (set autotmatically when the simulator is started) Note: It is not recommended to emulate more than 250 printers. advanced.multiIP Determines whether multiple IP addresses are used for emulating multiple e‑Task 2 printers. If false, then only the first address specified for advanced.addressRange is used. true (automatically changed to false if the test is run without specifying multiple addresses) advanced.profilerunTimeThreshold The time in milliseconds allowed for a profile to run before a warning message is logged 30000 advanced.timeToFirstPromptThreshold The time in milliseconds allowed for the first prompt in the profile to display before a warning message is logged 2000 advanced.useSecureWebdav Determines whether WebDAV communication with the true LDD system should be secure. This property should be true when the LDD system is v4.4.0.2 or later, or false when the LDD system is v4.4.0.1 or earlier. Testing and deploying workflow solutions 63 Property Description Default advanced.webdavUsername The user name used for secure WebDAV ldd communication with the LDD system. In most cases, this property should not be changed. advanced.webdavPassword The password used for secure WebDAV communication ldd with the LDD system. In most cases, this property should not be changed. advanced.useRandomFileFromDirectory Determines whether a random file is used from the folder false specified in advanced.randomFileDirectoryPath for simulating scan tasks. When set, these properties override files specified for advanced.scanfilesN. advanced.randomFileDirectoryPath Specifies the folder where image files for scans can be None found when advanced.useRandomFileFromDirectory is set to true advanced.scanfiles1– advanced.scanfilesN The TIFF, JPEG, PDF, or PostScript files to use in None simulating scan tasks. Each property represents a single scan task, so properties after advanced.scanfiles1 are only used for profiles that contain multiple scan tasks. Each property can contain a comma‑delimited list of multiple files, which are submitted together for the scan task. Note: The delimiter used in the list can be changed using the scanFileDelimiter property. Property Description Default basic.linfo.name The profile name associated with ${CurrentTestProfile.profileName} the scan task. The default, which (This refers to the profileName property in the refers to the profile that is run for Simulator Properties table.) the test, should usually remain set. basic.linfo.resolution Resolution for the scan task 300 basic.linfo.format Image format for the scan task TIFF basic.linfo.depth Bit depth for the scan task 8 basic.linfo.orientation Orientation for the scan task PORTRAIT basic.linfo.papersize LETTER Paper size for the scan task basic.linfo.numpages Number of pages for the scan task 1 Testing and deploying workflow solutions 64 Property Description Default advanced.linfo.name The profile name associated ${CurrentTestProfile.profileName} with the scan task. The default, (This refers to the profileName property in the which refers to the profile that Simulator Properties table.) is run for the test, should usually remain set. advanced.linfo.resolution Resolution for the scan task advanced.linfo.format Image format for the scan task TIFF advanced.linfo.depth Bit depth for the scan task 300 8 advanced.linfo.orientation Orientation for the scan task PORTRAIT advanced.linfo.papersize LETTER Paper size for the scan task advanced.linfo.numpages Number of pages for the scan task Property Description 1 Default basic.pj.addressRang The address range to receive ${CurrentTestProfile.basic.addressRange} e print jobs from the LDD system. (This refers to the basic.addressRange property in The default, which refers to the the Basic prompting properties table.) address range set for the overall test, should usually remain set. basic.pj.output The folder in which simulated print jobs should be saved The /Profiles/CurrentTestProfile/conf/dat a/PrintJobs folder where the MFP emulator and performance simulator are installed basic.pj.ext The file extension of saved print ps jobs. Do not include a period (.) before the extension. The extension implies the file type used. One of the following: pdf, ps, tif. basic.pj.save Determines whether to save print false jobs from the LDD system basic.pj.poolSize The size of the thread pool to use ${CurrentTestProfile.serverPoolSize} for print jobs. The default, which refers to the overall server pool size, should usually remain set. Testing and deploying workflow solutions 65 Property Description Default advanced.pj.addressRan ge The address range to ${CurrentTestProfile.advanced.addressRange} receive print jobs from (This refers to the advanced.addressRange property in the LDD system. The the Basic prompting properties table.) default, which refers to the address range set for the overall test, should usually remain set. advanced.pj.output The folder where simulated print jobs should be saved advanced.pj.ext The file extension of ps saved print jobs. Do not include a period (.) before the extension. The extension implies the file type used. One of the following: pdf, ps, tif. advanced.pj.save Determines whether to save print jobs from the LDD system advanced.pj.poolSize The size of the thread ${CurrentTestProfile.serverPoolSize} pool to use for print jobs. The default, which refers to the overall server pool size, should usually remain set. The /Profiles/CurrentTestProfile/conf/data/P rintJobs folder where the MFP emulator and performance simulator are installed false Property Description Default clientStartUpDelay The delay, in milliseconds, between starting each group 500 of emulated MFPs when testing with more than one MFP clientStartUpDelaySize The number of MFPs to start after each interval specified 10 by clientStartUpDelay startDelayMin* The minimum delay between test repetitions 2000 startDelayMax* The maximum delay between test repetitions 2000 promptDelayMin* The minimum delay before answering prompts 2000 promptDelayMax* The maximum delay before answering prompts 2000 initScanDelayMin* The minimum delay before submitting a simulated scan 2000 initScanDelayMax* The maximum delay before submitting a simulated scan 2000 betweenScanDelayMin* The minimum delay between submitting multiple files in 2000 a simulated scan task * The delay properties are useful in simulating real‑world delays where user input is expected when stress‑testing a solution. For each delay specified, a random value is selected between the minimum and maximum values. Testing and deploying workflow solutions 66 Property Description Default betweenScanDelayMax* The maximum delay between submitting multiple files in 2000 a simulated scan task * The delay properties are useful in simulating real‑world delays where user input is expected when stress‑testing a solution. For each delay specified, a random value is selected between the minimum and maximum values. Property Description Default delimiter The delimiter used between subsequent prompt answers in basic.promptAnswers and advanced.promptAnswers , Note: A colon (:) cannot be used as the delimiter. scanFileDelimiter The delimiter used between multiple scan files in basic.scanfiles and advanced.scanfilesN , defaultAnswer The string used in basic.promptAnswers and advanced.promptAnswers to indicate the default prompt answer [DEFAULT] cancelAnswer The string used in basic.promptAnswers and advanced.promptAnswers to indicate canceling the prompt [CANCEL] randomAnswer The string used in basic.promptAnswers and advanced.promptAnswers to indicate that a random answer should be selected [RANDOM] serverPoolSize The maximum number of threads in server thread pools 50 JMXHTTPAdaptorPort The HTTP port for an Adaptor used for JMX‑based remote management 8090 Property Description Default basic.pauseCronExp A CRON expression that schedules a pause in the test None basic.unpauseCronExp A CRON expression that schedules the test to resume after a pause None has been scheduled basic.addMfpCronExp A CRON expression that determines the interval at which a new printer is added to the test basic.removeMfpCronExp A CRON expression that determines the interval at which a printer None is removed from the test basic.numScheduledMfpsToAdd The number of printers to add at the interval specified by basic.addMfpCronExp None 1 basic.numScheduledMfpsToRemove The number of printers to remove at the interval specified by basic.removeMfpCronExp 1 Property Description Default advanced.pauseCronExp A CRON expression that schedules a pause in the test None advanced.unpauseCronExp A CRON expression that schedules the test to resume after a None pause has been scheduled advanced.addMfpCronExp A CRON expression that determines the interval at which a new None printer is added to the test advanced.removeMfpCronExp A CRON expression that determines the interval at which a printer is removed from the test None Testing and deploying workflow solutions 67 Property Description Default advanced.numScheduledMfpsToAdd The number of printers to add at the interval specified by advanced.addMfpCronExp 1 advanced.numScheduledMfpsToRemove The number of printers to remove at the interval specified by 1 advanced.removeMfpCronExp Supplying answers to prompts You can supply a comma‑delimited list of answers to supply for prompts asked by the profile in the setting basic.promptAnswers (for e‑Task printers) or advanced.promptAnswers (for e‑Task 2 printers). If the setting is left blank, then the default response is used for all prompts. The delimiter for the list may be changed using the delimiter setting. If you need to supply an answer for any prompt, then you must supply all answers for the applicable logic path. To specify the default answer for a prompt in the path, use [DEFAULT], or the answer otherwise specified by the defaultAnswer setting. The logic path may be different depending on prompt answers, so you must plan answers for the specific path you want to take through the prompts. It may be helpful to test the path by first using the interactive MFP emulator. The following table shows the valid answer values for each prompt type: Testing and deploying workflow solutions 68 Prompt type Valid answer values Default value if no default is specified by the script Array Zero‑based array index 0 Authentication (magnetic stripe card or RFID data) A value, separated by a colon from a colon‑delimited list of key=value pairs Empty string that simulate data from a magnetic stripe card or RFID device, using the following standard keys: FormatCode Name Track1 Track1Raw Track1Pan Track1AdditionalData Track2 Track2Raw Track2Pan Track2AdditionalData Track3 Track3Raw Track3Pan Track3AdditionalData For example: 4444555566667777:Track2Raw=;4444555566667 777=09051010000041600000?:Track1Raw=%B444 4555566667777^USER/JOEQ^09051010000000000 000000000000000000416000000?:FormatCode=B :Track1AdditionalData=0905101000000000000 0000000000000000416000000:Track1Pan=44445 55566667777Track2AdditionalData=090510100 00041600000:Name=USER/JOE Q Note: Line breaks may be included in Authentication values. However, line breaks in the example are included only for clarity. Boolean true false true Copy [DEFAULT] only N/A CopyUI [DEFAULT] only N/A Custom VLML [DEFAULT] only N/A Email [DEFAULT] only N/A EmailUI [DEFAULT] only N/A Fax [DEFAULT] only N/A FaxUI [DEFAULT] only N/A Image boolean true false true Testing and deploying workflow solutions 69 Prompt type Valid answer values Default value if no default is specified by the script Image list Zero‑based array index 0 Image message [DEFAULT] only N/A Integer Numeric integer 0 List Zero‑based array index 0 Message [DEFAULT] only N/A Numeric Numeric integer 0 Password Text string Empty string Scan None; scan prompts are handled by the basic.scanfiles and advanced.scanfilesN settings. Answers for scan prompts should not be included in the sequence of prompt answers. N/A ScanUI [DEFAULT] only N/A String Text string Empty string Using JConsole to monitor and modify a running test You can use the Java Monitoring and Management Console (JConsole) or another JMX‑enabled application to access attributes and operations of the performance simulator process during a test. The following steps detail accessing these attributes and operations using JConsole specifically, but the listed attributes and operations are the same for other JMX‑enabled applications. 1 Run JConsole. Note: JConsole is installed with the Java SE Development Kit. The default location for JConsole is C: \Program Files\Java\jdk<current version>\bin\jconsole.exe. 2 While a performance simulator test is running, select com.lexmark.workflow.simulator.App from the list of processes on the Local tab. Note: If a test is started after the “Connect to Agent” dialog is opened, then click the empty area within the list of processes to refresh it. 3 Click Connect > MBeans tab. 4 Expand the simulator folder, and then expand the folder for the currently running test profile. 5 For e‑Task 2, expand the Advanced folder. or For e‑Task, expand the Basic folder. 6 Select Simulation. From the Attributes tab, you can see the following details of a running test: • ActiveMfps—This is the number of MFPs currently being emulated for the test. • BetweenClientStartUpDelaySize—This is the number of MFPs started after each interval specified by the clientStartUpDelay setting in the test profile. Testing and deploying workflow solutions 70 • Cancels—This is the number of tests canceled, which is controlled by the cancelProbability setting in the test profile. • Failures—This is the number of tests run that did not complete successfully. • Name—This is the name of the test, which includes the test profile name; Advanced for e‑Task 2 or Basic for e‑Task. • • • • PausedMfps—This is the number of paused MFPs. RunCount—This is the total number of completed tests. StartTime—This is the date and time when the test was started. Successes—This is the number of successfully completed tests. Only the BetweenClientStartUpDelaySize value can be changed from the Attributes tab. From the Operations tab, you can perform any of the following actions by clicking the corresponding button: • getBetweenClientStartUpDelaySize—Retrieve the current setting for the number of MFPs started after each interval specified by the clientStartUpDelay setting in the test profile. • setBetweenClientStartUpDelaySize—Set the number of MFPs started after each interval specified by the clientStartUpDelay setting in the test profile. • • • • • • • • • • • • • getActiveMfps—Retrieve the number of MFPs currently being emulated for the test. getRunCount—Retrieve the total number of completed tests. getCancels—Retrieve the number of tests canceled. getSuccesses—Retrieve the number of successfully completed tests. getFailures—Retrieve the number of tests run that did not complete successfully. pause—Pause the test. getPausedMfps—Retrieve the number of paused MFPs. addMfps—Add the number of MFPs specified for p1 to the test. removeMfps—Remove the number of MFPs specified for p1 from the test. shutdown—Stop the test. getName—Retrieve the name of the test. resume—Resume a paused test. getStartTime—Retrieve the date and time when the test was started. Testing and deploying workflow solutions 71 Determining the single‑server throughput for a solution When building or upgrading an LDD system around a particular solution, determine the single‑server throughput of the solution to help in sizing the system. Determine this value by testing the solution with the performance simulator. For more information on system sizing using the value determined by this process, see the Lexmark Document Distributor Administrator's Guide. Note: Perform this test either on a separate test LDD system, or during a time that your production system is not processing any other jobs. Make sure that the test LDD system has at least one server matching the performance of your production system. 1 On the LDD system where the solution is being tested, set all but one server offline. Note: If there are unequal servers in the system, then test the solution on each server. 2 In Eclipse, click LDD SDK > MFP > Performance Simulator. Notes: • In Windows 7 or later, make sure to run Eclipse and LDD SDK as an administrator, for the simulator and emulator to function properly. • If you have not installed the MFP emulator and performance simulator, then follow the instructions on the computer screen. 3 From the MFP Simulator configuration window, click File > New Configuration. 4 Configure the simulator and LDD system for the test. Make sure that you have discovered the simulator in the LDD system and have deployed the solution to the simulator. After the MFP simulator has been discovered, use the following settings in the MFP Simulator configuration window: • Configuration tab: – Number of MFPs to simulate—1 – Repetitions—A number high enough to run at least an hour. The following typical throughputs on a server with the recommended hardware may help determine a rough estimate: Solution processing load Functions used Average single‑server throughput Typical • Some image‑processing • Printing 6000–8000 jobs per hour Heavy • • • • 2000–3000 jobs per hour Very heavy (OCR) Extensive image‑processing Bar codes External processes Small to medium Document Producer (e-forms) jobs 100–200 jobs per hour • OCR • Large Document Producer (eforms) jobs Note: Using less than the recommended RAM significantly reduces throughput. For example, a dual‑processor server with only 2GB of RAM can process only 600–800 jobs per hour when using a “heavy” solution. Testing and deploying workflow solutions 72 – Scan File—If a scan task is part of the profile, then a TIFF, JPEG, PDF, or PostScript file is required to simulate the task. Note: If different files must be used for separate scan tasks for an e‑Task 2 solution, then use the advanced property advanced.scanfilesN instead. • Advanced tab: – basic.promptAnswers/advanced.promptAnswers—A list of answers to prompts that results in the logic path with the heaviest possible processing load. You may omit this setting if the default answer to each prompt results in the same logic path. Note: You can change any other properties that help simulate your system more accurately. 5 Click to save the test profile, and then click to start testing. Let the test to run for an hour. Deploying a solution directly to an LDD server system Notes: • Solutions can only be deployed directly from Eclipse when using LDD 4.3 or later. • Proxy settings may need to be updated in Eclipse for communication with the LDD server system. If a proxy server is in use and configured in Eclipse, and the LDD system is inside the proxy, then the host name of the load balancer must be added to the “No Proxy for” list in the Network Connections preferences. • If a solution performs several actions using an auto‑configure script, then you may need to increase the value of the Solution Export Wait Time setting in the Lexmark preferences to allow enough time for deployment. 1 Select the solution you want in the Package Explorer pane. 2 If Build Automatically is not enabled on the Project menu, then click Project > Build Project. 3 Click File > Export. 4 Expand the Lexmark folder, and then select Deploy to LDD 4.3+ Server. 5 Click Next. 6 If the server has not been accessed from Eclipse before, then do the following: a Select Deploy to new LDD System. b Type either the host name or IP address of the load balancer. c Type the user name and password used to log in to LMC. Note: The Password field cannot accept double‑byte characters. To enter a password with double‑byte characters, type it in a text editor, copy it, and then paste it into the Password field. d Click Add. 7 Select Deploy to existing LDD System. 8 Select the server from the list. 9 Click Finish. Testing and deploying workflow solutions 73 Restarting the Lexmark Solutions Application Server If you install a workflow solution that includes a component, then you may need to restart the Lexmark Solutions Application Server for the solution to fully function. Before restarting the Lexmark Solutions Application Server, set the server offline on the System tab in LMC. Make sure the server is offline before proceeding. Click Refresh, and then make sure offline is reported in the Status column for the server. You can restart the Lexmark Solutions Application Server from the Windows Services control panel. Note: When you restart the Lexmark Solutions Application Server service, any solution‑related file in the \Lexmark\Solutions\apps\wf-ldss\ or \Lexmark\Solutions\apps\wf-ldss\solutions folders, such as a property file for a solution, is reverted to the version stored with the solution package as it was initially installed or upgraded, and any manual changes are lost. Distributing a solution file and installing the solution using LMC When the development system does not have access to the LDD server system, you can distribute the solution file and install the solution using LMC. Note: The following procedure applies to LDD 4.3 or later. For information about manually installing a solution on an LDD 4.2 system, see the documentation for LDD 4.2. 1 If Build Automatically is not enabled on the Project menu, then select the solution in the Package Explorer pane, and then click Project > Build Project. 2 Distribute and install the solution file: a Open LMC. b Click the Solutions tab. c Select All Solutions from the Solutions list. d Click Install/Upgrade. e In the window that appears, type a path to a solution file, or click Browse to browse for the solution file. Note: For general distribution, the solution file is located in the \target\install folder within the main folder of the solution project. The solution file has an extension of .solution. f Click Upload. Managing the LDD 4.x System List To access the LDD 4.x System List window, click LDD SDK > LDD 4.x System List. From the System List window, you can: • Add a new server system: 1 Click New. 2 Type either the host name or IP Address of the load balancer. 3 If necessary, change the port used to access LMC. Testing and deploying workflow solutions 74 4 Type the user name and password used to log on to LMC. Note: The Password field cannot accept double‑byte characters. To enter a password with double‑byte characters, type it in a text editor, copy it, and then paste it into the Password field. 5 If necessary, select the release (LDD version) of the targeted server system. 6 Click Add. If authentication with the server system is successful, then the host name or IP address appears in the list. • Edit settings for an existing system: 1 Select a server system from the list. 2 Edit the connection and authentication settings as necessary. 3 Click Update. • Remove an existing system: 1 Select a server system from the list. 2 Click Remove. • Quickly access LMC for an existing system: 1 Select a server system from the list. 2 Click LMC. The management console of the selected system appears in the Eclipse Web browser. Note: Proxy settings may need to be updated in Eclipse for communication with an LDD server system. If a proxy server is in use and configured in Eclipse, and an LDD system is inside the proxy, then the host name of the load balancer must be added to the “No Proxy for” list in the Network Connections preferences. Building a workflow solution from the command line 1 Create a working folder. Example: C:\solutionfolder\ 2 Copy the following files, located in the Eclipse \plugins folder, to the new folder: • com.lexmark.lddsdk.core_1.0.0.timestamp.jar • com.lexmark.lddsdk.sbtcore_1.0.0.timestamp.jar • com.lexmark.lddsdk.sbt4x_1.0.0.timestamp.jar timestamp represents the timestamp that appears on the latest version of each file, and x represents the target version of LDD. 3 Copy the Rhino JavaScript compiler, js-1.6R1.jar, to the new folder. 4 Add the working folder to the classpath. Example: java ‑classpath C:\solutionfolder\ 5 Remove the timestamp from the file names of com.lexmark.lddsdk.core_1.0.0.timestamp.jar and com.lexmark.lddsdk.sbtcore_1.0.0.timestamp.jar, so that the new file names are as follows: • com.lexmark.lddsdk.core_1.0.0.jar • com.lexmark.lddsdk.sbtcore_1.0.0.jar 6 From the working folder, execute this command, noting the replacements that follow: Testing and deploying workflow solutions 75 java ‑jar com.lexmark.lddsdk.sbt4x_1.0.0.timestamp.jar project_container working_folder_path/js‑1.6R1.jar Note: Multiple lines are shown for clarity. Type the entire command on a single line. Make the following replacements in the command: • timestamp—The timestamp contained in the file name Example: com.lexmark.lddsdk.sbt44_1.0.0.v20081027-1303.jar • x—The version number of the target version of LDD Example: com.lexmark.lddsdk.sbt44_1.0.0.v20081027-1303.jar • project_container—The full path to the container folder of the project in the workspace Example: C:/workspace/TestMFP • working_folder_path—The full path of the working folder you created in step 1 Command example: java ‑jar com.lexmark.lddsdk.sbt44_1.0.0.v20081027-1303.jar C:/workspace/TestMFP C:/solutionfolder/js‑1.6R1.jar After a successful build, a new solution file can be found in the \target\install folder within the project container folder. The file extension of the solution file is .solution. Developing components 76 Developing components Understanding component design A typical component contains four classes: • Service interface—This defines the contracts for the service implementation class and serves as a property type for the bean implementation class. • Service implementation—This implements service interface class. • Bean interface—This sets properties for the bean implementation class. • Bean implementation—This implements the bean interface and calls the methods of the service implementation class. Best practices for component design • Implement a standard JavaScript component interface: – Implement the new operator to create instances of the component. – Use uppercase letters for constants. – Define all constants as children of the component class. – Implement the setInput method, and accept an array where appropriate. – Implement the result field, and return an array where appropriate. • Each method is automatically logged to the confirmation page when called. Use com.lexmark.workflow.framework.annotation.ConfirmBeanMethodLoggingOverride to hide methods or arguments that should not appear in the confirmation page, such as passwords: – To prevent a method from appearing at all on the confirmation page, add @ConfirmBeanMethodLoggingOverride(hide=true) before the method declaration. – To prevent only the arguments of a method from appearing on the confirmation page, add @ConfirmBeanMethodLoggingOverride(hideArguments=true) before the method declaration. The arguments are replaced with the text <hidden‑args> on the confirmation page. • Log all activity using the Apache log4j framework, using the following levels: – ERROR—Fatal errors, such as system failures – WARN—Non‑fatal errors, such as script exceptions – INFO—Diagnostic information, such as progress or status – DEBUG—Debugging information • Handle script errors by throwing exceptions. Avoid catching exceptions within the component. • Use com.lexmark.workflow.framework.service.temporaryFile.TemporaryFileService for output files and temporary files. • Add a new bean, xxxVersionBean, in applicationContext.xml to show the version number of the component in LMC. Developing components 77 Creating a new component project Like solutions, each LDD component is maintained as a project within Eclipse. 1 In Eclipse, click File > New > Project. 2 Expand the Lexmark folder. 3 Select LDD 4.x Component, and then click Next. 4 Type a container name for the project. The container name is the name of the component project in Eclipse IDE. 5 Configure optional settings: • To use a component name different from the container, clear the Use Default check box , and then type a component name in the Component Name field. • To use a base Java package name different from the default, clear the Use Default check box, and then type a name for the base Java package in the Component Name field. • To start a component project at a version other than 1.0, type a value in the Initial Version field. • To use a package name different from the default that is based on the solution name, clear the Use Default check box, and then type a package name. 6 Select the version of the LDD system where to install the solution, and then click Next. 7 Select the template most appropriate for the component you plan to develop from the Available Templates list. 8 Click Next. 9 Type a description for the solution and the name of the author, and then click Finish. The Lexmark Solution Development perspective is opened if another perspective is open before the new project is created. Understanding the contents of a component project The following folder structure details the contents of a component project. Some folders may not appear in all components. ProjectFolder\—This is the container folder, named when creating the project, that contains all contents of the project. docs\—This contains documentation files for the component. lib\—This contains third‑party .jar, .exe, and .dll files used by the component. src\—This contains the source files of the project. conf\—This contains the configuration files for the project images\—This contains images associated with the component. java\—This contains Java source files. native\—This contains any non‑Java source files. platform\—This maps to the target\component\platform folder, which contains the .jar file built from the component project. prop\—This contains properties files. Developing components 78 test\—This contains source files for unit and integration tests. web\WEB‑INF\—This contains applicationContext*.xml class configuration files for Spring Framework. Note: To be recognized by Spring Framework, class configuration file names must begin with applicationContext. The default class configuration file is named applicationContext‑ContainerName.xml. target\—This contains the compiled component after a project build, in addition to associated class files, XML descriptor files, and copies of script files from the time of the build. This folder only appears in a new project after the first build. Note: This folder may be deleted to ensure a clean build. component\—This contains the XML descriptor of the component project. platform\—This contains the .jar file built from the component project. install\—This contains the compiled component solution, with the extension .solution. Note: File and folder names within a component project cannot contain double‑byte characters. However, files themselves may contain double‑byte characters. Including a component in a workflow solution project 1 Make sure the component project has been built. If Build Automatically is not enabled on the Project menu, then do the following: a Select the component project in Package Explorer. b Click Project > Build Project. The src\platform folder should contain a .jar file after a successful build. 2 Determine whether to include or reference the component: • An included component does not update with changes made to the original component project. Do the following to include a component: a Make sure the workflow solution project appears in Package Explorer. b Click and drag the .jar file from the src\platform folder of the component project to the root folder of the workflow solution project. • A referenced component updates if the original component project is changed and rebuilt. Do the following to reference a component: a Right‑click the workflow solution project folder in the Package Explorer pane, and then click Properties. b Select Project References from the list. c Select the check box beside the component project you want to reference in the workflow solution project. Note: A project must appear in Package Explorer to appear in the Project References list. d Click OK. Troubleshooting 79 Troubleshooting Network connection problems occur when installing or updating plug‑ins in Eclipse If you connect to the Internet through a proxy, then make sure the proxy connection is set up correctly in Eclipse. For more information, see“Installing the development environment” on page 11. The Lexmark Solution Development perspective or other features are missing Make sure that Java SE 6 is installed: 1 From the Windows Control Panel, double‑click Java. 2 On the General tab, click About. 3 In the About Java window, make sure that the version number is at least 6. 4 If an older version is installed, then install the Java SE 6 Development Kit (JDK) and Java Runtime Environment (JRE), available from java.sun.com Auto‑complete does not work or items are missing in auto‑complete lists for LDD objects Try one or more of the following: • Make sure JSEclipse is installed properly. • JSEclipse requires a workspace folder name with no spaces. Make sure your workspace folder name does not have spaces: 1 Click File > Switch Workspaces > Other. 2 In the Workspace field, type a path with no spaces, or click Browse and then select a folder that results in a path with no spaces. 3 To copy your current workbench layout and working sets, expand Copy Settings and select the options. 4 Click OK. Eclipse restarts and uses the new workspace. 5 Click LDD SDK > LDD Update JSEclipse Autocomplete. 6 When prompted, click Yes to restart Eclipse. • Make sure the auto‑complete libraries for JSEclipse have been updated for LDD: 1 In Eclipse, click LDD SDK > LDD Update JSEclipse Autocomplete. Note: The menu item will be unavailable if JSEclipse is not installed. 2 When prompted, click Yes to restart Eclipse. Troubleshooting 80 A properties file updated using revision control does not update If a properties file is updated by revision control software outside Eclipse, changes in the file may not appear in the associated editor in Eclipse. To refresh the settings in a properties file in Eclipse, restart Eclipse. LDD system times out when directly exporting a solution Try one or more of the following: • If a proxy server is in use and configured in Eclipse, and the LDD system is inside the proxy, then make sure the host name of the load balancer has been added to the “No Proxy for” list in the Network Connections preferences. • If a solution performs several actions using an auto‑configure script or the network is slow, then increase the timeout for exporting a solution to an LDD system: 1 Click Window > Preferences. 2 In the category list, select Lexmark. 3 In the Solution Export Wait Time field, type a higher value. The MFP emulator does not run Occasionally, a Java process associated with the MFP emulator may continue to run after the MFP Emulator window is closed, which prevents a new session from running correctly. Restart the MFP emulator: 1 Make sure the MFP Emulator window is closed. 2 Right‑click the taskbar, and then click Task Manager. 3 Click the Processes tab. 4 If java.exe appears in the list of processes, then do the following: a Select java.exe. b Click End Process > Yes. 5 If javaw.exe appears in the list of processes, then do the following: a Select javaw.exe. b Click End Process > Yes. 6 Reopen the MFP Emulator window. Troubleshooting 81 The MFP emulator runs but cannot be discovered in LMC The SNMP Windows service in Windows Server 2003 may cause a conflict with the MFP emulator. If the SNMP service is running, then the MFP emulator appears to run normally, but it cannot be discovered in LMC. 1 Close the MFP emulator. 2 Disable the SNMP service in the Services control panel. 3 Restart the MFP emulator, and then reattempt to discover the emulator in LMC. The Backspace and left arrow keys do not work when viewing LMC in Eclipse When using LMC from the Web browser in Eclipse, the Backspace and left arrow keys may stop working in text boxes after the Eclipse tab focus is changed. You can restore the function of the Backspace and left arrow keys by opening and closing a dialog: 1 Click Help > About Eclipse Platform > OK. 2 Return to the Lexmark Management Console tab, and then continue editing. Appendix 82 Appendix Prompts supported by single‑function printers Single‑function printers do not support all prompts supported by multifunction printers. Lists of supported prompts are included in the table below. Touch screen printers Supported prompts • • • • • • • • • • • • • • Non‑touch screen printers • • • • • • • • • • ArrayPrompt AuthenticationPrompt1 BooleanPrompt CustomVlmlPrompt ImageBooleanPrompt ImageListPrompt ImageMessagePrompt IntegerPrompt ListPrompt MessagePrompt ArrayPrompt AuthenticationPrompt1, 2 BooleanPrompt IntegerPrompt ListPrompt MessagePrompt NumericPrompt PasswordPrompt3 StringPrompt2 NullPrompt4 NumericPrompt PasswordPrompt StringPrompt NullPrompt 1 Requires a supported card reader. 2 Supported by T654 and W850 models only. 3 Supports only numeric PINs in e‑Task printers. E‑Task printers include C520, C522, C524, C530, C532, C534, C732, C734, C736, C780, C782, C920, C935, E450, E460, E642, T640, T642, T644, T650, T652, W840. 4 Supported by e‑Task printers only. Double‑byte character support Not all printer models support double‑byte characters. If your printer is not listed in the table below, it does not support double‑byte characters. Printer model Simplified Chinese Traditional Chinese Japanese Korean C748 X X X X C792 X X X X C925 X X X X C950 X X X X CS510 X X X X CX410 X X X X Appendix 83 Printer model Simplified Chinese Traditional Chinese Japanese Korean CX510 X X X X MS610 X X X X MS810, MS812, MS911 X X X X MX410, MX510, MX511 X X X X MX610, MX611 X X X X MX710, MX711 X X X X MX810, MX811, MX812 X X X X MX910, MX911, MX912 X X X X X463, X464, X466 X X X548 X X X642 X X644, X646 X X651, X652, X654, X656, X658 X X 6500 X X X734, X736, X738 X X X746, X748 X X X782 X X792 X X850, X852, X854 X X860, X862, X864 X X X925 X X X940, X945 X X950, X952, X954 X Dim names, values Set names = XML.selectNodes("//name") Set values = XML.selectNodes("//value") X X X X X X X X X X Public Function fnJSAPIProfileCall(ByVal profileName As String, pWorkdoc As SCBCdrPROJLib.SCBCdrWorkdoc) Dim SOAPResponse, XML ' Parse START response Set XML = CreateObject("Microsoft.XMLDOM") XML.setProperty "SelectionLanguage", "XPath" XML.async = False XML.loadXML(SOAPResponse) X X Sample script for an export event SOAPResponse = fnJSAPIStart(profileName, pWorkdoc) X X X X X X X X X X X X Appendix Dim key, sessionID, scanUrl, tomcatIP, webdavUser, webdavPasswd Dim idx For idx=0 To names.length-1 key = names(idx).Text If key = "sessionID" Then sessionID = values(idx).Text ElseIf key = "tomcatIP" Then tomcatIP = values(idx).Text ElseIf key = "scanUrl" Then scanUrl = values(idx).Text ElseIf key = "webdavUser" Then webdavUser = values(idx).Text ElseIf key = "webdavPasswd" Then webdavPasswd = values(idx).Text End If Next ' Optionally put the original tiff to the correct webdav folder ' location for processing by the script being run. Dim doWebDavPut As Boolean doWebDavPut = True ' hardcoded True for this example If doWebDavPut Then Dim http, fNameWithoutExt, fName, fileObject, fileBytes ' Original tiff file fNameWithoutExt = Left(pWorkdoc.Filename, CStr(Len(pWorkdoc.Filename) - 3)) fName = fNameWithoutExt & "tif" ' Load tif bytes Set fileObject = CreateObject("ADODB.Stream") fileObject.type = 1 fileObject.Open fileObject.LoadFromFile fName fileBytes = fileObject.Read ' webdav put bytes Set http = CreateObject("MSXML2.XMLHTTP.3.0") http.Open "PUT", scanUrl & "/scan.0.file.0.tif", False, webdavUser, webdavPasswd http.setRequestHeader "translate", "f" ' Set this to prevent stream problems http.Send fileBytes ' Send the stream across End If fnJSAPIMetadata(sessionID, scanUrl, tomcatIP) End Function 84 Notices 85 Notices Edition notice February 2015 The following paragraph does not apply to any country where such provisions are inconsistent with local law: LEXMARK INTERNATIONAL, INC., PROVIDES THIS PUBLICATION “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some states do not allow disclaimer of express or implied warranties in certain transactions; therefore, this statement may not apply to you. This publication could include technical inaccuracies or typographical errors. Changes are periodically made to the information herein; these changes will be incorporated in later editions. Improvements or changes in the products or the programs described may be made at any time. References in this publication to products, programs, or services do not imply that the manufacturer intends to make these available in all countries in which it operates. Any reference to a product, program, or service is not intended to state or imply that only that product, program, or service may be used. Any functionally equivalent product, program, or service that does not infringe any existing intellectual property right may be used instead. Evaluation and verification of operation in conjunction with other products, programs, or services, except those expressly designated by the manufacturer, are the user’s responsibility. For Lexmark technical support, visit http://support.lexmark.com. For information on supplies and downloads, visit www.lexmark.com. © 2015 Lexmark International, Inc. All rights reserved. Trademarks Lexmark and Lexmark with diamond design are trademarks of Lexmark International, Inc., registered in the United States and/or other countries. Sun, Sun Microsystems, Solaris, and the Solaris Logo are trademarks or registered trademarks of Sun Microsystems, Inc. in the U.S. and other countries, and are used under license. All other trademarks are the property of their respective owners. GOVERNMENT END USERS The Software Program and any related documentation are "Commercial Items," as that term is defined in 48 C.F.R. 2.101, "Computer Software" and "Commercial Computer Software Documentation," as such terms are used in 48 C.F.R. 12.212 or 48 C.F.R. 227.7202, as applicable. Consistent with 48 C.F.R. 12.212 or 48 C.F.R. 227.7202-1 through 227.7207-4, as applicable, the Commercial Computer Software and Commercial Software Documentation are licensed to the U.S. Government end users (a) only as Commercial Items and (b) with only those rights as are granted to all other end users pursuant to the terms and conditions herein. Notices 86 The Apache Software License, Version 1.1 Copyright (c) 2000-2002 The Apache Software Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1 Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2 Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3 The end-user documentation included with the redistribution, if any, must include the following acknowledgment: "This product includes software developed by the Apache Software Foundation (http://www.apache.org/)." Alternately, this acknowledgment may appear in the software itself, if and wherever such third-party acknowledgments normally appear. 4 The names "Apache" and "Apache Software Foundation", "Jakarta-Oro" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact [email protected]. 5 Products derived from this software may not be called "Apache" or "Jakarta-Oro", nor may "Apache" or "Jakarta-Oro" appear in their name, without prior written permission of the Apache Software Foundation. THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==================================================================== This software consists of voluntary contributions made by many individuals on behalf of the Apache Software Foundation. For more information on the Apache Software Foundation, please see http://www.apache.org/ Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1 Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or Notices 87 otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2 Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3 Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a crossclaim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4 Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: a (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and b (b) You must cause any modified files to carry prominent notices stating that You changed the files; and Notices 88 c (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and d (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. 5 6 7 8 9 You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS Notices 89 APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Index 90 Index a properties file updated using revision control does not update 80 accessing the functions of a library script 19 accessing the LDD Script Reference Guide 13 accessing the MFP emulator 57 accessing the performance simulator 57 adding a library script to a solution 19 adding an auto‑configure script to a solution 20 advanced properties, performance simulator configuring 59 associating JavaScript files with Eclipse 12 auto‑complete does not work for LDD objects 79 auto‑configure 20 configuring the home screen 21 methods 20 component projects contents 77 components best practices 76 creating a new component project 77 including in a workflow solution project 78 understanding 8 understanding design 76 configuring advanced properties for performance simulator 59 configuring the home screen with auto‑configure 21 contents of a component project 77 contents of a workflow solution project 15 creating a new component project 77 creating a new workflow solution project 15 credentials object 55 custom reports managing 41 B D A Backspace and left arrow keys do not work when viewing LMC in Eclipse 81 bar code read support 42 bar code write support 44 bar codes read support 42 write support 44 best practices for component design 76 best practices for solution design 14 building a workflow solution from the command line 74 C code quality evaluating with JSLint 18 command line building a workflow solution 74 databases using the included solution database 47 deploying a solution directly to an LDD server system 72 determining single‑server throughput for a solution 71 developing workflow solutions for previous versions of LDD 56 development environment installing 11 device policies managing 36 distributing a solution file and installing the solution using LMC 73 Documentum 10 double‑byte character support 82 dynamic prompting 55 dynamic prompting support 55 E Eclipse associating JavaScript files 12 ECM supported platforms 10 editing the properties an existing workflow solution project 17 emulator 57 evaluating code quality with JSLint 18 export event sample script 83 F FileNet 10 forms merge scripts printing forms on printers with forms cards 31 scripting for different stages of a forms merge 28 using 28 using the PrintClass service with forms merge scripts 31 formsets managing 41 G getting support 10 H home screen configuring with auto‑configure 21 I ImageNow 10 including a component in a workflow solution 78 installation system requirements 8 installing LDD 10 installing the development environment 11 installing the Solution Builder Toolkit 11 interactive emulator saving print jobs 58 Index simulating a scan task 58 using the interactive MFP emulator with an LDD system 57 J JavaScript files associating with Eclipse 12 JConsole monitoring and modifying a running performance simulator test 69 JMX monitoring and modifying a running performance simulator test 69 Job Submission API 48 Job Submission Web service 48 JSLint evaluating code quality 18 91 manually associating JavaScript files with Eclipse 12 MFP emulator accessing 57 saving print jobs 58 simulating a scan task 58 using the interactive MFP emulator with an LDD system 57 MFP emulator cannot be discovered in LMC 81 MFP emulator does not run 80 minimum system requirements 8 monitoring and modifying a running performance simulator test 69 N K network connection problems occur when installing or updating plug‑ins in Eclipse 79 notices 85 KDC address 55 Kerberos authentication 55 O preparing tests in the performance simulator 58 prerequisite skills for developing LDD system components 5 prerequisite skills for developing workflow solutions 5 previous versions of LDD developing workflow solutions 56 print jobs saving 58 printers supported 9 printing forms on printers with forms cards 31 profile scripts 18 projects contents of a component project 77 prompts overview 32 supported by single function printers 82 properties, solutions editing 17 R LDD SDK 8 system requirements 8 LDD system times out when directly exporting a solution 80 Lexmark Solution Development perspective or other features are missing 79 Lexmark Solutions Application Server restarting 73 library scripts 19 accessing functions 19 adding to a solution 19 objects prompts 32 services 33 top-level objects 32 OCR support 45 overview prerequisite skills for developing LDD system components 5 prerequisite skills for developing workflow solutions 5 prompts 32 services 33 top-level objects 32 M P S L managing custom reports 41 managing device policies 36 managing formsets 41 managing solution projects 17 managing solution settings 34 managing the LDD 4.x System List 73 managing the Solution Status Page 40 performance simulator accessing 57 configuring advanced properties 59 monitoring and modifying a running test 69 preparing tests 58 running tests 58 supplying answers to prompts 67 realm 55 referencing a workflow solution project 17 reports managing custom reports 41 REST Web service 48 querying job status 48 submitting jobs 48 using 48 restarting the Lexmark Solutions Application Server 73 running tests in the performance simulator 58 saving print jobs 58 scan task simulating 58 scheduled scripts using 31 Script Reference Guide accessing 13 scripting for different stages of a forms merge 28 Index scripts auto‑configure 20 library scripts 19 profile scripts 18 scheduled scripts 31 using forms merge scripts 28 SDK 8 servers determining throughput for a solution 71 services overview 33 SharePoint 10 simulating a scan task 58 simulator 57 configuring advanced properties 59 monitoring and modifying a running test 69 preparing tests 58 running tests 58 supplying answers to prompts 67 SOAP Web Service using 52 SOAP Web service 48 software development kit 8 solution determining single‑server throughput 71 Solution Builder Toolkit installing 11 solution database included 47 solution projects managing 17 solution settings managing 34 Solution Status Page managing 40 solution types understanding 7 solutions accessing the MFP emulator or performance simulator 57 best practices 14 contents of a workflow solution project 15 deploying directly to an LDD server system 72 distributing and installing using LMC 73 92 editing the properties an existing workflow solution project 17 understanding types 7 supplying answers to prompts for the performance simulator 67 support 10 supported ECM platforms 10 supported printers 9 System List managing 73 system requirements 8 system sizing determining single‑server throughput for a solution 71 T technical support 10 testing determining single‑server throughput for a solution 71 testing with MFP emulator 57 testing with performance simulator 57 throughput, single‑server determining for a solution 71 top-level objects overview 32 troubleshooting a properties file updated using revision control does not update 80 auto‑complete does not work for LDD objects 79 Backspace and left arrow keys do not work when viewing LMC in Eclipse 81 features are missing 79 Java 79 LDD system times out when directly exporting a solution 80 Lexmark Solution Development perspective or other features are missing 79 MFP emulator cannot be discovered in LMC 81 MFP emulator does not run 80 network connection problems occur when installing or updating plug‑ins in Eclipse 79 U understanding component design 76 understanding components 8 understanding solution types 7 understanding the objects used in solution development prompts 32 services 33 top-level objects 32 understanding workflow solutions 6 using auto‑configure 20 using auto‑configure methods 20 using forms merge scripts 28 using JConsole to monitor and modify a running performance simulator test 69 using Kerberos authentication 55 using library scripts 19 using profile scripts 18 using REST Web service 48 using scheduled scripts 31 using SOAP Web Service 52 using the included solution database 47 using the interactive MFP emulator with an LDD system 57 using the PrintClass service with forms merge scripts 31 V version compatibility of workflow solutions 8 W Web services 48 workflow solution project creating 15 understanding contents 15 workflow solution projects managing 17 referencing 17 workflow solutions building from the command line 74 creating a new workflow solution project 15 Index developing for previous versions of LDD 56 including a component in a workflow solution project 78 understanding 6 version compatibility 8 WorkSite 10 93
advertisement
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project