Websydian v6.1 online documentationOnline documentation - WebsydianExpress v3.0

Process Parameters

Introduction

In some cases it is useful to transfer parameters to a business process at runtime in order to control the behavior of the business process.

Parameters can be transferred using either menu services or deep linking. It is not possible to transfer parameters to a business process when it is activated from a menu item in a menu bar.

Adding parameters to a business process

The entry point to a business process is the ProcessEntryPoint function found in the WSYAPI group model.

Fields you would like to transfer as parameters should be added to the WebInput variable. The fields will be populated and can be used before you call the first page generator function in the edit point 'Call to first page generator'.

If no parameters are transferred to the business process the fields in WebInput will just be empty.

If for some reason you want to exclude a parameter from the signature protection, then the field must also be present in the variable ExcludeFromSign.

Please read the following sections for information on how parameters are transferred to fields in the WebInput variable.

When using parameters in deep-links, you must also add the fields to the variable ExcludeFromSign - see more below.

Menu service parameters

Before you can add parameters to a menu service link the following you must create a business process that can process the parameters as described in Adding parameters to a business process.

Please note that all parameters transferred to the ProcessEntryPoint function will be signed, thus it will not be possible for a user to tamper with the parameters added to the menu service.

Depending on whether the menu service is inserted in the details or grid region the behavior is a little different (the grid regions is the part of the template between the grid replacement markers; if any).

Details region

In the template add parameters to a menu service using the following syntax:

/(MENU-AliasText?parameterlist)

AliasText is the name of the alias referencing the business process and parameterlist is a list of parameters separated by ampersands where each parameter has the following syntax:

name
The field in WsyDetails which have the implementation name name will be transferred to the same field in the WebInput variable.
name1=/[name2]
The field in WsyDetails with the implementation name name2 will be transferred to the field in WebInput with the implementation name name1.
name1=const
The const value const will be transferred to the field in WebInput with the implementation name name1.
Please note that the constant value may not begin with the character sequence /[ or contain an ampersand.

For more information and examples please read Menu Services.

Grid region

In the template add parameters to a menu service using the following syntax:

/(MENU-AliasText?parameterlist)

AliasText is the name of the alias referencing the business process and parameterlist is a list of parameters separated by ampersands where each parameter has the following syntax:

name
The field in WsyGrid which have the implementation name name will be transferred to the same field in the WebInput variable.
name1=/[name2]
The field in WsyGrid with the implementation name name2 will be transferred to the field in WebInput with the implementation name name1.
name1=const
The const value const will be transferred to the field in WebInput with the implementation name name1.
Please note that the constant value may not begin with the character sequence /[ or contain an ampersand.

For more information and examples please read Menu Services.

Deep-link parameters

Before you can add parameters to a menu service link the following you must create a business process that can process the parameters as described in Adding parameters to a business process.

As parameters that come from an external link is not signed, all parameter fields must be present both in the WebInput variable and in the ExcludeFromSign variable.

An URL that access the business process has the following syntax:

URL?WSLOAD=AliasText&WSCONTEXT=(Y|N)&parameterlist&WSPARMLIST=parameternamelist

URL
The URL to the WebsydianExpress site; e.g. http://mydomain.com/express/site/basicsite.
AliasText
The name of the alias referencing the business process that will be loaded.
WSCONTEXT
Determines whether the business process should be loaded in a single browser window, or if the business process should be loaded in the context defined by the site structure tree with framesets, menus, etc.
Legal values are Y for loading with context and N for loading in a single browser window.
parameterlist
A list of name-value pairs separated by ampersands. Each name-value pair has the syntax

name=value

name is the implementation name of the field in the WebInput variable and value is the value you want to transfer.
parameternamelist
A list of the parameter names used in the parameterlist above separated by %26.

An example of a deep-link URL could be:

http://mydomain/express/mysite?WSLOAD=ShowProd&WSCONTEXT=Y&ProdID=1234&WSPARMLIST=ProdID

For more information and example please look in Deep Linking.

As the parameters transferred from a deep link are not signed, it is very important that the values in the WebInput variable are validated before use.