Condition workflow on spooled file attributes

Condition workflow on spooled file attributes

When you build a workflow tree structure to handle all the different types of spooled files, then you normally need to look at the spooled file attributes (e.g. spooled file name) apart from the spooled file contents to identify the spooled file type and e.g. be able to match the spooled file with a template.

A list of all retrieved spooled file attributes are listed here.

This video shows an example of how to do this:



One way to condition your workflow is to e.g. use the name of the input spooled file to decide, what should happen.

Here is an example:

    NG2ConditionSplfWorkflow0001

 

In the example above we either create a PDF file, print or do nothing depending on the spooled file name, which is checked in the Choice component:

    NG2ConditionSplfWorkflow0002

 

From the settings above you can see, that if the name of the input spooled file is QPRINT, then InterFormNG2 is choosing the first sub-tree (to create a PDF file), if the name is EDTPRT, then the second sub-tree is triggered, which will print out on the PRT01 printer.

 

Normally it is recommended to also include a spooled file action like delete, hold or move to another output queue, but this was not done above to keep the size of the workflow as small and simple as possible.


    • Related Articles

    • Change attributes of spooled file

      As a part of spooled file processing in InterFormNG2 on the IBM i platform, you might want to change one or more spooled file attributes of the input spooled file to let the end user know, that the specific spooled file has been successfully ...
    • Spooled file actions

      As part of spooled file processing in InterFormNG2 on the IBM i platform, you may need to delete, hold, or move the input spooled file to notify the end user that the specific spooled file has been successfully processed. You can also change a ...
    • Spooled file support

      InterFormNG2 is able to process spooled files, if you install InterFormNG2 on the IBM i platform. Please notice, that spooled file support, as well as Spool2XML, are modules for InterFormNG2, that are purchased separately. You can also use the ...
    • Post-process spooled file

      As a part of spooled file processing in InterFormNG2 on the IBM i platform, you might want to delete, hold or move the input spooled file to let the end user know, that the specific spooled file has been successfully processed. You can also change a ...
    • Spooled file split

      You might want to split up spooled files during InterFormNG2 processing. The reason might be, that the input spooled file may contain multiple documents (e.g. invoices), and that you want to create one PDF file (or email) for each invoice. There are ...