From input form menu

From input form menu

If you want to use a web form in InterformNG2 to input fields for a selection templates and run the templates to generate e.g. print or PDF files, then you can use the workflow input type, From input form menu. This can be useful if, for example, you are unable to generate input XML files for processing and want to output ad hoc labels or documents with manually typed data.

This workflow type will prompt the user for which template (with editable workflow variables) that the user wants to use. After selecting the template the workflow will then prompt the user for the values of the editable workflow variables of the selected template. After that normal output can be generated, the job log can be shown and you can even setup the workflow to restart and prompt for a new template.

After prompting the user for the template to use the full path will be saved to the predefined variable, com.interform400.xml.Template. That variable should normally be used for identifying the template in subsequent merge into e.g. print or PDF.

A prerequisite for using this is, that you have prepared workflow variables in the selected templates to be editable and here setup the settings for each.



The workflow input type, From input form menu has these parameters:
  1. Menu unique ID
    This is a unique ID for this workflow. This is to be referenced as a part of the URL when a user wants to run the workflow. The last part of the URL is: /forms/menu/?id=<MenuIdFromWorkflow>. This means, that if the URL for InterformNG2 is e.g. https://127.0.0.1:8086, and the Menu unique Id is 'Standard1' like above, then the URL to access the menu for the workflow is: https://127.0.0.1:8086/forms/menu/?id=Standard1
  2. Input type
    Use XML. This is the payload type setup in the workflow.
  3. Template and template title
    This is a list of the templates, that the user of the form can select between. The template title is shown above a preview of the template result.
  4. Instructions for the menu
    This is a header text shown above a list of the available templates. This could explain what the user is expected to do and/or what the available templates do.
  5. Sample XML file
    Here you can refer to a sample XML file for making it easier to refer to data from an XML file.
  6. On error workflow
    Here you can setup a workflow to be called if the workflow should end in error.
After the user has selected the template (which is the first thing, that happens) you should normally insert the workflow component, Edit document text, which prompts for the values for the editable workflow variables, that are setup in the selected template.

Next the workflow should normally merge the entered data with the selected template and finally there are two additional workflow components, that can be added:
This component will cause the job log of the current workflow to be displayed on the users screen. This can be used for validating if all went OK and e.g. to verify where the result was printed.
The component will cause the workflow to run again from the start so that the user can select another template for processing.


Example of use

Here is an example of this can be used. In this example we want to print out labels. The labels can be printed with two different templates: Labels4x2.ift and Labels5x2.ift
The first template outputs labels in a pattern with 4 label rows and 2 columns on each page and the other outputs 5 rows per page.
The output looks like this:


The two templates have multiple, editable workflow variables, which are:
The name and address lines and the number of copies to print of these identical labels:


The workflow header is setup like this:



These elements of the workflow:


The first component is the Edit document text, which has this setup:

Edit flow unique name
This parameter sets a unique name for the user prompt, where the value for each editable workflow variable is requested. This will be used as a part of the URL used when presenting user screens.

Template
The obvious setting is like above, where the user a prompted for the values for a specific template. We simply refer to the variable, which contains the template selected in the input for the workflow.

The second workflow component is here Create PDF file, but it could e.g. also be Print. It refers to the template, that was previously selected:

The final components has no parameters:
Forms workflow end screen and Back to forms menu

How the sample workflow is used:

We start with the URL, that selects the workflow:
https://127.0.0.1:8086/forms/menu/?id=Standard1
When this is selected the user will see this screen:

When the user has clicked on a template, the value for the editable workflow variables are shown:

The user is expected to enter the name and address for the labels and state the number of labels to output and press 'Submit Form', when the values are setup.

Now the Create PDF file is run and then the job log is shown:


When the user clicks 'Continue' in the lower right corner the workflow is rerun and the template is requested again.

    • Related Articles

    • Back to forms menu

      The advanced, special workflow component, Back to forms menu can be used together with the workflow input type, From input form menu. This component will make the workflow rerun from the start and request the user to select a template. The component ...
    • The IFormNG2 menu overview

      The IformNG2 main menu (Spool2XML) is shown with this command: IFORMNG2/IFORMNG2 This menu is shown: IFORMNG2 InterForm NG2 Main Menu Select one of the following: System . . . : PMK250 User . . . . : KSE Version . . : 1.6.0b Administration 1. Work ...
    • Enrich by input form

      The advanced, special workflow component, Enrich by input form is a workflow component, that can help to modify the XML payload of a workflow with a webform. Please notice, that an alternative webform solution is covered in the section, Webforms. ...
    • Form field element

      You can create a fillable PDF form with InterformNG2. This means, that a user can open the PDF and type in text and answer questions and save the filled out PDF form. The fillable fields are defined as form fields in the designer. To insert a form ...
    • Input forms

      An important part of the module, Webforms are the input forms. The input forms are used by the Enrich by input form workflow component to change the contents of an XML file via an interactive form. The input forms is a special kind of template in ...