Advanced conditions to control Interpret and Transfer instances run as services: Overview

Advanced conditions are not available in the program interface by default. To enable their use, the flag, AdvancedJobCondition=1, must be set in the [InvoiceServices] section of eilocal.ini. When they are enabled, a section for Advanced conditions is added to the bottom of the dialog used to configure service jobs.

Use the information in this topic as inspiration for setting up advanced conditions when configuring service jobs to control the use of Kofax ReadSoft Invoices services.

Advanced conditions provide a very powerful and flexible way to control service jobs in connection with Interpret and Transfer instances used as services. Consequently, they must be carefully thought through, configured correctly, and tested to ensure they work properly.

Two types of advanced conditions are available:

  • Start conditions
  • Stop conditions

Start conditions

Only one advanced start condition (that is, a set of parameters required to start the job) is allowed for each service job, and the job only starts if all of the parameters configured for the condition are met. This means that care must be taken when using them.

Start conditions can be used to optimize CPU usage, for example, if that is an issue.

  • If start conditions are not used, CPU power is required to start each job, check if there are any invoices to process for it, and stop it, even if there are no invoices to process. Consequently, if an instance of Interpret or Transfer contains a large number of service jobs that do not contain any invoices to process, a considerable amount of computer power may be lost to the opening and closing of these jobs. This is also multiplied by the number of Interpret or Transfer instances running on the computer.
  • If a specific set of parameters is required to start a job, the job only starts if all of those conditions are met. Therefore, the application does not need to start or stop the job if there is nothing to process. That is, it automatically goes to the next job in the list saving computer power as a result. However, care must be taken here to ensure that incorrect settings do not keep jobs that need to run from running.

Stop conditions

Multiple advanced stop conditions (that is, sets of parameters required to stop a job), are allowed for each service job, and they are independent from each other. That is, all advanced conditions do not need to be met to stop a job. As a result, a service job can be stopped for any number of separate reasons.

Advanced stop conditions are normally used to control job priority.

How to use advanced conditions

One or more advanced conditions can be configured to start or stop service jobs based on criteria specific to the following scenarios:

  • Invoices enter the system through the scanning of paper documents using the Scan module. The resulting invoices are considered to be internal. This scenario is valid for instances of both Interpret and Transfer.
  • External invoice images are captured from a file folder or from email using Collector. Since these invoice images have not yet entered the Kofax ReadSoft Invoices system, this scenario only applies to instances of Interpret.

Advanced conditions for invoices scanned into the system

Invoices scanned into the system using the Scan module are found in the Kofax ReadSoft Invoices database, and advanced conditions to start or stop jobs for this invoice type can be based on any combination of multiple parameters. Note that advanced conditions are configured using the following parameters for both Interpret and Transfer instances except where otherwise noted.

  • Invoice profiles
  • Invoice status
    • Approved
    • Adjusted
    • Rejected
    • Scanned - This is the only invoice status that can be used in connection with advanced conditions for instances of Interpret.
    • Complete
  • User defined variables
    • Variable name
    • Variable value
  • Queues

Advanced conditions for invoice images captured from a file system or using an external plugin like ReadSoft Collector

One or more advanced conditions can be used to start or stop instances of Interpret for this invoice type based on the location of certain file types in specific folders. For example, if an Interpret job is running and a stop condition has been set to run if a file of a certain format becomes available in the specified folder, the job stops.

Examples of conditions in connection with Interpret service jobs

For this example, one instance of Interpret has been set up with four service jobs to process invoices from different job descriptions:

  • Job A handles scanned invoices found in the Kofax ReadSoft Invoices database. This job only handles a minor portion of the invoices processed, but they have highest priority.
  • Job B handles faxed invoice images put in folder X. These are only a few invoices, but they have high priority.
  • Job C handles invoices based on image files captured to folder Y from email using Collector. A majority of invoices come this way, and they have normal priority.
  • Job D handles invoices based on XML files imported from folder Z. Not as many as the image files collected by Collector, but these have higher priority.

Sample scenario

The service jobs are listed and run in the order A, B, D, C, and Restart first job after processing is selected for the Interpret instance to which they belong. This means job A runs first until all invoices are processed, and it closes. Then job B and D run the same way. Job C normally has a large number of invoices to process, so 100 is specified as the maximum number of invoices or batches to process before closing. The job handles 100 invoices or batches, the job closes, the first job restarts automatically, and the process begins again.

Since the invoices for jobs A, B, and D all have higher priority than those of job C, three advanced stop conditions could be specified for job C such that, instead of waiting until 100 invoices are processed before closing, the job would close as soon as the parameters for one of the stop conditions is met.

Potential advanced stop conditions to configure in job C:

Start by expanding the jobs under the instance of Interpret and double-click job C to open it. Then, click Advanced conditions and configure an advanced condition to stop this job if invoices from the other service jobs become available. This involves configuring three separate stop conditions in the following way:

To stop job C if invoices become available for job A, complete the following steps:

  1. Right-click the pane under Advanced conditions and click Add condition > Invoice available stop.
  2. Click the invoice profile to which the job description service job A belongs.
  3. Under Status, click Scanned.
  4. Click a queue if one applies. Note that separate jobs could be set up with advanced conditions for individual queues.
  5. Click OK.

To stop job C if invoices become available for job B, complete the following steps:

  1. Right-click the pane under Advanced conditions and click Add condition > File available stop.
  2. Click the browse button to navigate to folder X.
  3. Enter the image file type(s) to look for in the Filename extension box.
  4. Click Check subfolders for files if files are also put there.
  5. Click OK.

To stop job C if invoices become available for job D, complete the following steps:

  1. Right-click the pane under Advanced conditions and click Add condition > File available stop.
  2. Type in the path or click the browse button to navigate to folder Z.
  3. Enter *.XML as the file type to look for in the Filename extension box.
  4. Click Check subfolders for files if files are also put there.
  5. Click OK.

Since Restart first job after processing is selected for the instance in this scenario, job A would automatically restart after job C closes, and the jobs would continue to run in their normal order. To ensure that jobs are run according to the correct priority, an advanced condition would need to be configured to stop jobs B and D if invoices became available for job A, since job A has the highest priority. An additional advanced condition would also be needed to stop job B if invoices became available for job D, since it also has a higher priority.

Alternative sample scenario

Service jobs could also be set up differently for the instance to achieve the same results without using Restart first job after processing. See the following:

  • The jobs could be listed and consequently run in the order C, A, D, B.
  • It would not be necessary to specify a maximum number of invoices or batches to stop job C.
  • Three separate advanced conditions would be configured to stop job C in the same way as the scenario above.
  • An advanced condition would also be configured to stop jobs B and D if invoices become available in job A, since job A has the highest priority.
  • An additional advanced condition would also be configured to stop job B if invoices become available for job D, since job D has a higher priority than job B.

In this way, job C processes invoices until an advanced condition for one of the other service jobs stops it. When it closes, the remaining jobs automatically run in the correct priority order.

Conclusion

Advanced conditions provide a powerful way to control services, and there is no one correct way to set them up. Since the possibilities are endless, great care must be taken when configuring them.