Task Tab

This tab defines what the component does when it activates.

Each component contains one or more tasks. This ResponseGen component has four tasks, plus the ComponentEnd marker.

When you click a task, the rest of the Task tab updates to show information about it.

When the component activates, its tasks execute sequentially.

To set up a new task:

  1. Click the button if the fields are not available.

  2. Fill out the fields as described in the table below.

  3. Save.

  4. Repeat for the other tasks in the component.

    Fields on the Task tab

Type

Description

ID

Required. Type the name for the set of tasks.

Parameter:

The task name shows up in the task list:

Type

Executable

Run an executable, batch file, or command prompt.

Parameters:

  1. The first line is the path and filename of the executable.

  2. Each additional line is one command line parameter. You can include variables surrounded by %, as described in Variables_for_Workflows.pdf.

    See the Instream component’s HVInStream task for an example.

 

Copy

Copy a file or files from one directory to another.

Note: This will overwrite any files with the same name in the target directory.

You can include variables surrounded by %, as described in Variables_for_Workflows.pdf.

Any existing tracking files are copied as well, before their source file is copied.

Parameters:

  1. The directory from which one or more files are to be copied OR the specific file to be copied

  2. If a directory is specified, the second parameter line is the file extension to match (e.g. EDI, TXT). The * wildcard character is supported for “all”.

    If copying an individual file, this line is left blank or set to a dummy value.

  3. Frequency. Set the schedule for checking the directory, in seconds.

  4. Count. The number of files to be moved or copied.
    Default: -1 to move all files.

    Note: Because file processing cannot be completely halted, a count of 0 behaves the same as a count of -1.
  1. SortByAge. Sort files by age. Values are OLDEST, NEWEST, or DO_NOT_CARE. If both SortByAge and SortBySize are set, SortByAge takes priority.

  2. SortBySize. Sort by size. Values are LARGEST, SMALLEST, or DO_NOT_CARE. If both SortByAge and SortBySize are set, SortByAge takes priority.

    Example 1:

    Copy all files with a .edi extension from the specified directory to the target directory.

    c:\PickupDir

    EDI

    %FSDPROCDIR%

    Example 2:

    Copy a specific file from the specified directory to the target directory.

    c:\PickupDir\filename.edi

    <blank>

    %FSDPROCDIR%

    Example 3:

    Copy all files from the specified directory to the target directory.

    c:\PickupDir

    *

    %FSDPROCDIR%

Type

Description

 

Move

Move a file or files from one directory to another.

Note: This will overwrite any files with the same name in the target directory.

You can include variables surrounded by %, as described in Variables_for_Workflows.pdf.

Any existing tracking files are moved as well, before their source file is copied.

Parameters:

The parameters are the same as for Copy.

Clean

Delete all zero-byte files in the specified directory.

Parameter:

1 The only parameter line is the directory.

Examples:

%PROCDIR% or c:\docsplitter\out

ONRETURNCODE

If the return code of the task matches a given value, branch to another task. Otherwise, execute the next task in the list.

Parameters:

  1. The first parameter line is the ID of the task to check.

  2. The second parameter line is the return code number

  3. The third parameter line is the ID of the task to go to.

    This example checks the ResponseGen task’s return code. If it is 100, then processing goes to the DeleteDTLFiles task:

Type

Description

 

JAVA

Load and run a class written in Java. This can be a user-written class. It must support an Automator Java Task interface.

Parameters:

  1. The first parameter line is classname,method.

  2. The second parameter line is the class path

  3. The third is the parameter string

GOTO

Unconditionally jump to another task.

Parameters:

The first parameter line is the task ID to go to.

Example:

 

DELETETRACKFILES

If track files have been retained to this point, delete them.

Parameters:

None

Example:

End

Marks the end of processing for this component. Similar to an END statement in other programming languages.

Parameters:

None

Success Code

Type the return code that the application uses for success. Typically, this is 0. Most Instream components use 100 for success.

Success codes 1000 and 1001 override the normal error handling for this task. See Error Handling Behavior on page 50.

Parameters

These are described under each type above.

Task Tab Example: Simple Component to Delete Files

The component below does two things:

  1. Opens a command window.

  2. Deletes all files from the directory specified by the workflow, without displaying a confirmation message before each file is deleted.