Watched folder start point properties

Use the Process Properties view to configure the following Watched Folder start point properties:

General

Name:
The name of the start point. The name appears in the Service Management pages of administration console. Provide a name that is meaningful to both Workbench developers and service administrators.

Description:
(Optional) A description of the start point. Provide a description for other developers who edit the process. The text that you provide also appears as a description for the corresponding endpoint in the Service Management pages of administration console.

Path:
The watched folder location on the AEM forms Server. The default path is /WatchedFolders/application name/process name. These folders are created in the root of the server machine upon application deployment. In a clustered environment, the path must point to a shared network folder that is accessible from every computer in the cluster.

Invoke Asynchronously:
Determines whether the process is invoked asynchronously or synchronously:
  • Select this option for long-lived processes, which must be invoked asynchronously.

  • Do not select this option for short-lived processes, which must be invoked synchronously.

By default, this option is selected (asynchronous invocation).

Domain Name:
The User Management domain of the user that is used to invoke the process. The default value is DefaultDom, the default domain that is created for AEM forms.

User Name:
The name of the AEM forms to invoke the process. The user must be assigned the Services User role. This value is the user ID property, which is the name used to log in to AEM forms. The default value is SuperAdmin.

Server Configurations

Properties for specifying how files are handled.

Hinweis: Performance increases when the size of the result, preserve, and failure folders are small.
Include File Pattern:
A pattern that matches the names of files that are used as input to the process. The value is case-sensitive. The default value of * includes all files. To specify multiple patterns, separate them with a semicolon (;). The following examples illustrate valid values:
  • *.pdf includes all PDF files.

  • *.pdf;*.doc includes all PDF and DOC files.

  • data includes all files named data.

  • *.[dD][aA][Tt] includes all files with the file name extension .dat regardless of letter case. For example, the pattern includes both of the files named file1.Dat and file2.dAt.

Exclude File Pattern:
A pattern that matches the names of files that the watched folder ignores. The value is case-sensitive. This property is useful when a folder that contains multiple files is copied to the watched folder and some of the files must be ignored.

To specify multiple patterns, separate them with a semicolon (;). The following examples illustrate valid values:

  • *.bak excludes all files with the file name extension .bak.

  • *.pdf;*.doc excludes all PDF and DOC files.

  • data excludes all files named data.

  • *.[bB][aA][kK] excludes all files with the file name extension .bak regardless of letter case. For example, both of the files named file1.Bak and file2.BAK are excluded.

Result Folder:
The folder where process output values are saved as files. This path can be an absolute path or a path that is relative to the watched folder. You can include the following characters, which are expanded at run time:
%Y:
The current year

%M:
The current month

%D:
The current day of the month

These characters are useful for minimizing folder size. The default value of result/%Y/%M/%D stores creates a new folder every day to minimize folder size. If the current date is October 23, 2010, results are saved in the [watched folder] /results/2010/10/23 folder.

If process results do not appear in this folder, look in the failure folder.

Preserve Folder:
The folder where input files are archived when processes that use them are successfully invoked. This path can be an absolute path or a path that is relative to the watched folder. You can include the following characters, which are expanded at run time:
%Y:
The current year

%M:
The current month

%D:
The current day of the month

These characters are useful for minimizing folder size. The default value of preserve/%Y/%M/%D creates a new folder every day to minimize folder size. If the current date is October 23, 2010, files are archived in the [watched folder] /preserve/2010/10/23 folder. To prevent archiving of input files, specify no value.

Failure Folder:
The folder where input files are copied when processes that use them are unsuccessfully invoked. These files are saved only when Preserve On Failure is selected.

This path must be relative to the watched folder. You can include the following characters, which are expanded at run time:

%Y:
The current year

%M:
The current month

%D:
The current day of the month

These characters are useful for minimizing folder size. The default value of failure/%Y/%M/%D creates a new folder every day to minimize folder size. If the current date is October 23, 2010, failed files are saved in the [watched folder] /failure/2010/10/23 folder.

Preserve On Failure:
Select to save input files in the failure folder when they are used as input for processes that fail to be invoked.

Overwrite Duplicate Filenames:
Select this option to overwrite existing files in the results and the preserve folders when new files with the same name are saved. When this option is not selected, a numeric index is added to file and folder names to distinguish them. This option is selected by default.

Scheduling

Properties that specify how often the AEM forms Server scans for new files in the watched folder. You can also specify the maximum number of files the server processes for each scan.

The configuration of Scheduling properties can affect the productivity of the AEM forms Server. The values you provide depend on the expected frequency of new files. For example if you expect to receive 10 files every 30 seconds, server resources are wasted if the folder is scanned every second.

Cron Expression:
A cron expression that determines when the AEM forms Server scans the watched folder for new files. The server you are using determines whether to use a cron expression. This property has no value by default.

When this setting is configured, the value for the Repeat Interval property is ignored. For information about formulating cron expressions, see http://quartz.sourceforge.net/javadoc/org/quartz/CronTrigger.html .

Repeat Interval:
The time interval at which the AEM forms Server scans for new files. This value is in seconds. The default value of 5 causes the server to scan for new files every 5 seconds.

Unless the Throttle setting is enabled, specify a value greater than the time to process an average job. Otherwise, the system can become overloaded.

Repeat Count:
The number of times the AEM forms Server scans the watched folder. A value of -1 causes indefinite scanning. The default value is -1.

Batch Size:
The maximum number of files or folders to process each time the AEM forms Server scans the watched folder. This value can prevent overloading system resources. Using too many files in one scan can cause the server to crash. The default value is 2.

Wait Time:
The time, in milliseconds, to wait before the AEM forms Server scans a folder or file after it begins to be copied to the watched folder. For example, the wait time is 36,000,000 milliseconds (one hour) and the file was created 1 minute ago. The file is picked up after 59 or more minutes have passed. The default value is 0 .

This setting is useful for large files or folders. Higher wait times ensure that the copying of files and folders is complete before they are used as a process input value. For example, a large file that requires ten minutes to copy requires a wait time of 10*60 *1000 milliseconds.

Throttle:
Select this option to ensure that the AEM forms Server limits the number of files used per scan according to the value of the Batch Size property.

Purge Duration:
The number of days that files and folders are kept in the results folder before they are deleted. This property is useful for managing available space in the file system. A value of -1 causes files to remain in the results folder indefinitely. The default value is -1 .

Inputs/Outputs

Properties for specifying process input values and for storing process output values.

Input

Specify a value for each input variable of the process. The type of variable determines how you express the value.

Simple data types:
Provide literal values for the input value of simple data types such as string, number-based types, xml, and date and time-based types. For example, the text SomeText is provided as a string value of SomeText.

document, list of documents, and map of documents:
Specify a pattern that is matched with the file name of a file that is copied to the watched folder. A file with a name that matches the pattern is used as the value for the input variable. For example, a value of *.pdf causes PDF files to be used as input. Patterns are useful when multiple attachments must be mapped to different input variables. For example, a process requires a PDF file and a DDX file as input. The *.pdf and *.ddx patterns are used for the values of the input variables.
Hinweis: Complex variable types and list or map values that do not contain document values do no appear in the Input area. You cannot specify values for these variable types.

Output

Specify values for output variables. The type of variable determines how you express the value.

Document variables:
Specify how to name files that the process returns. When processes provide document values as output, they are converted to files and saved to the results folder. When the process returns a list or a map of documents, each document is converted.

To name the attached files, you can include literal text, use the attributes of the returned document value, or both:

  • Use literal text to use the same name for all attached files of every process instance. For example, the value output.pdf causes the names of all file attachments to be output.pdf.

  • Use attributes of the returned document value to name the returned file based on the name of the file that the document value was created from:

    • %F: The name of the file (not including the file name extension)

    • %E: The file name extension

    Document attributes are assigned values when the document is created from a file. The file can be retrieved from a file system, a URL, or an email attachment. Attributes of the document value are based on the original file name.

    Often, a process takes a document as input, manipulates the document, and returns it as output. For example, a file that is copied to the watched folder is used as the input value. The pattern %F.%E is used as the output file name. The returned file has the same name as the input file.

    If the attributes of an output document value do not have values, the %F and %E characters cause errors to occur on the server. If your process does not return an email when it completes, check the server log for error messages.

  • You can use a mixture of literal text and %F and %E characters.

If the values of the Output properties result in files with the same name, the AEM forms Server appends an index number to the file name. For example, a process returns three documents in a list. The Output property is out.pdf. The files that are returned are out.pdf, out_1.pdf and out_2.pdf.

Simple data types:
Provide literal values for the input value of simple data types such as string, number-based types, xml, and date and time-based types. For example, the text SomeText is provided as a string value of SomeText.
Hinweis: Complex variable types and list or map values that do not contain document values do no appear in the Output area. You cannot specify values for these variable types.