How to use URL parameters in WEBCON BPS to fill form field. Automatic path transition using URL parameters and quick paths.
Basic use of URL parameters – workflow registration
WEBCON BPS allows you to use URL parameters to automatically complete the fields on the form. To achieve this, in the URL you should add parameters with database column names without the prefix WFD_. This allows you to pass values to the form fields. With this solution, you can pass values to any field that can be in edit mode and is storing the value in the database. In this case if you using the choice form field, you only need to provide the ID or display value for that field.
Examples of the configuration of form fields and the use of basic functionalities of URL parameters are shown below.
Thanks to this you can use the URL parameters if you want to automatically complete part of the form. For example, a given part of employees mainly always fill up a group of attributes with specific values. In this case, you can prepare for them a process starter that will contain these values in the URL parameters.
URL parameters – behavior on other steps
Using URL parameters, you can also complete attributes on intermediate steps. The condition is that the given attribute cannot be marked on the matrix as read-only. To set a form field with the URL parameter, it must be in editable mode (simple or using javascript).
Below is an example of a field matrix with information on whether a given field of the form will be possible to set using URL parameters.
Keep workflow instance relations using URL parameters
When creating links, you can also use constants and variables which are present on the form. For example, you can maintain relationships between workflow instances. For this purpose, you can use a dedicated form field where will you store WFD_ID of a parent element, or use the standard WEBCON functionality – parent-child relationship. To register an element as a sub-workflow, you must provide the WFD_ID of the current workflow element in the URL parameter named PARENT_WFDID.
An example of this case is shown below:
Usage of the {R:URL_Param_Name} variable in SQL queries
WEBCON BPS has an undocumented function related to URL parameters. When you use the {R:URL_Param_Name} variable in SQL queries, the given URL parameter with the same name will be substituted in the SQL query. The above solution does not work for business rules. Below is an example of the usage of this feature.
Warning! As I mentioned before, the function I described is not officially documented by WEBCON. When using this functionality, you must be aware that it can be withdrawn at any time, which may result in incorrect operation of the process in the future WEBCON BPS versions.
Use of the PATH_ID URL parameter
You can use transition paths with the URL parameters. All you need to do is pass the transition ID in the URL parameter named PATH_ID. Additionally, to allow such a transition, the indicated transition path must be configured as a quick path.
Below is an example of path configuration and its practical use.
Quick paths may be used not only to fast registration workflow instances. For example, you can use quick paths for quick acceptance. Instead of configuring mail approval, you can send to a user an email that will contain two big buttons – a nice green YES, and a bad red NO one. Clicking on the button from the email will redirect the user to the WEBCON workflow form, along with the appropriate URL parameter, thanks to which the system will automatically follow the selected path.