Input Statement

Input statements allow you to invite the current participant to enter information that is required by the method's logic.

The following types are available:


Basic input and BPM Object input can be implemented with screenflows. This is strongly recommended. See Screenflow's documentation for detailed information.
Note: If you use the input statement in a BP-Method in a task, when the design is checked, a warning is thrown. It is recommended to use a screenflow or the relay to option, as the input statement is not applicable if you run the process in an EJB based Engine.

Syntax

Basic input

 
	input "field label" basicReference
	          [({option}[={value}], ...)] 
	          [ in [{valid values}] ] [, ...]
	    [using
	        title = "{title}",
	        buttons = [{button labels}],
	        cancelButton = "{button label}"
	    ]
	    [returning
	        {selected button} = selection
	    ]
	

Interceptor input

	 
	input "field label" basicReference
	           [ in [{valid values}] ] [, ...]
	    [using
	        title = "{title}",
	        buttons = [{button labels}]
	        htmlForm = "{intitial URL}",
	        until = "{stop condition}",
	        links = "{ intercept | popup | clear }",
	        userControl = { true | false },
	        cookies = [ { cookies } ]
	    ]
	    [returning
	        {selected button} = selection,
	        {cookie map} = cookies
	    ]
	

The main functionality of the Web Interceptor can be simplified in these 3 topics:


How does the Web Interceptor work?

Web Interceptor basically works over HTTP(S), FTP and FILE resources.

The referenced URL (htmlForm) can be:


BPM Object input

	input basicReference
	    [using
	        selectedPresentation = "{presentation name}"
	    ]
	    [returning
	        {selected button} = selection
	    ]
	

Arguments

Attribute: title

Type: String

Description: The input form's title.

Attribute: buttons

Type: String[]

Description: An array containing the labels of the buttons you want to be displayed on the form.

Attribute: cancelButton

Type: String

Description: button that acts ignoring all changes and avoiding the input of required fields.

Attribute: htmlForm

Type: String

Description: Full or relative URL to the initial page to be intercepted.

For relative files as .html, .jsp or .asp to be intercepted have to be copied into the installation directory, in studio/webapps/portal/dirname.

The htmlForm attribute is composed by: http://host:port/projectname/dirname/file.[html/jsp/asp]", where:

host:port is the host and port in which you run the WorkSpace.

projectname is the name of your project,

dirname is the name of the directory you created in studio/webapps/portal/

For example:

htmlForm = "http://localhost:9595/InterceptorCase01/TestInterceptor/classRegister.html",

InterceptorCase01 is the name of the project,

TestInterceptor is the directory in studio/webapps/portal, and

classRegsiter.html is the html page to be intercepted.

Attribute: until

Type: String

Description: Stop condition that indicates the interceptor when to stop intercepting pages. It is of the form: pattern@location

Where location is a full or partial url that marks the end of interceptions and pattern is a string that is sought for when location is reached. (pattern@URL or pattern@file name)

If not found, interception continues.

Some examples for stop conditions are:


Attribute: links

Type: String

Description: This parameter determines what happens when the intercepted page contains links and the user clicks on one. It takes one of the following values:


It will continue to intercept until the specified criteria has been met or the user hits "Stop" in the navigational control (see: userControl attribute.)

Attribute: userControl

Type: Bool

Description: If true, the navigational control will be displayed in the intercepted page.

One of the purposes of using Web interceptor is to set and get information from the pages you are intercepting or navigating. This basically implies that you are able to go through a sequence of HTML, JSP or ASP pages intercepting and collecting information that will later be used in the BP-Method logic. The navigational tool allows the end user go back and forward through the pages until the stop criteria is reached.

In order to show the navigational tool in the intercepted pages you need to set “userControl” to true. If you set true to links, then userControl takes the value true automatically and the navigational toolbar is displayed.

The buttons showed in the navigational panel are:


Attribute: cookies

Type: java.Object[java.Object]

Description: Associative array that contains a collection of cookies used during interception. The keys and values are of String type.

Attribute: selection

Type: String

Description: Returns the label of the button that caused the form to be dismissed.

Attribute: selectedPresentation

Type: String

Description: The name of the desired presentation for the Object, if this attribute is not specified, the default presentation will be used

Field options

The following table contains a list of the options that can be passed to an input field:

Option Required Type Description
date Time displays a Time as date-only.
time Time displays a Time as time-only.
readonly Any the field is displayed, but cannot be modified.
password String the field is displayed as a password field.
required Any The field cannot be null.
textarea String displays an area to enter a text.

Remarks

For the BPM Object input, the selectedPresentation attribute is only valid if the basicReference is a BPM Object. If it is not, a field label will be synthesized and the input will behave as a basic input.

If the selectedPresentation attribute is missing, the default presentation of the BPM Object will be displayed.

When you specify a partial URL in any of the fields that take one, the URL is relative to the portal in which the input statement is displayed.

For an Interceptor input, the field name must match the name of a field in the form being intercepted. If it does not match, the variable will be left empty.

Input Examples

Basic Input

	creditCardNo = ""
	acceptedTypes = ["visa" : "Visa", "master" : "Mastercard", 
	      "amex" : "American Express"]
	creditCardType = "visa"
	firstName = ""
	lastName = ""
	expiration = 'now'
	comments = ""
	input "First Name:"  firstName (required),
	      "Last Name:" lastName (required),
	      "Credit card type:" creditCardType (required)
	               in acceptedTypes,
	      "Credit card No.:" creditCardNo,
	      "Expiration Date:" expiration,
	      "Additional Comments:" comments (textarea)
	    using
	        title = "Enter payment info",
	        buttons = ["Ok", "Cancel"]
	

Interceptor Input

	googleQuery = ""
	input "q" googleQuery
	    using
	        htmlForm = "http://www.google.com",
	        links = "clear"       
	

Refer to Web Interceptor for more examples.

BPM Object Input

	//Order is a BPM Object with a presentation called 
	//'auditView'
	input order 
	   using
	      selectedPresentation="auditView"
	

Display Statement

The display statement, as its name implies, allows you to display information to the user and to get feedback based on the choice of buttons the user selected.

The Display can be implemented with screenflows. This is strongly recommended. See Screenflow's documentation for detailed information.

Note: If you use the display statement in a BP-Method in a task, when the design is checked, a warning is thrown. It is recommended to use a screenflow, as the display statement is not applicable if you run the process in an EJB based Engine.

Syntax

Basic Display

	display {object}
	 [ using 
	   [title = "{title}", ]
	   [type = "{error | question | warning | info | plain}",]
	   [options = {options}, ] 
	   [default = {default button}]
	 ]
	 [ returning {selected button} = selection ]
	

BPM Object Display

	display {fuego object}
	    [ using selectedPresentation = "{presentation name" ]
	

This form of display shows a BPM Object presentation as read-only.

Arguments

The following is the list of the arguments that can be passed to a display statement:

Argument: title

Type: String

Description: Title of the display window/page.

Argument: type

Type: String

Description: Kind of display. The icon will be chosen based on this argument. The default value is "plain".

Argument: otions

Type: String[]

Description: Array of strings containing the labels of the buttons you want to display.

Argument: default

Type: String

Description: Which of the buttons is returned in case the display is canceled.

Argument: selectedPresentation

Type: String

Description: Name of the presentation used to display a BPM Object. If left unspecified, the default presentation will be used.

Display Examples

Basic Display

	selectedButton as String
	display "Should we try again?"
	    using title = "Confirm",
	        type = "question",
	        buttons = ["Yes", "No"],
	        default = "No"
	    returning selectedButton = selection   
	    
	if selectedButton = "Yes" then
	    //Retry
	end   
	

BPM Object Display

	//Order is a BPM Object with a presentation 
	//called 'auditView'
	input order 
	   using
	      selectedPresentation="auditView"