Applies to version: 2020.1.x and above; author: Wojciech Kołodziej
When building business processes in WEBCON BPS and designing workflows – big or small – you may find that you need to pass information between two workflows. One of the simplest ways to pass information from the current form to one in another workflow is by using the Hyperlink action. Hyperlinks allow you to go through to the linked form, open it in the new tab, and pass a set of parameters to the other workflow.
The Hyperlink action (in the WEBCON BPS 8.x.x version) was described in the following articles:
As WEBCON BPS software developed, both the configuration (graphic interface) and function (range of abilities) changed.
The following article serves to refresh the topic of Hyperlinks for version 2020.1.x.
Two simple workflows were created.
1.Register department – a workflow allows you to register a department in the company
Fig. 1. The Register department workflow
2. Employee registration – a workflow allows you to register an employee to the newly created department.
Fig. 2. The Employee registration workflow
The created hyperlink actions allow:
Configuration of the hyperlink action
The hyperlink action can be created on entry, on the exit, on browser opening, menu button, on path or upon instance saving. We will create the action on the menu button for the purpose of the article. Go to the action configuration on the Department implementation step in the Register a department process. Add a new button type action in the menu and then, open their configuration.
Fig. 3. Adding the Hyperlink action
Fig. 4. The configuration of the Hyperlink action
Next go to the Hyperlink (URL) configuration – from the available function select the Start Element (…) option.
Fig. 5. The configuration of the Hyperlink action – select a function
Then right click on the function to go to the parameter mapping.
Fig. 6. The configuration of the Hyperlink action – StartElement
In the configuration window fill in the workflow ID and form type ID fields. These indetifiers correspond to the workflow and form type for which the new workflow instance will be started. For obvious reasons, the indicated form type must be associated with the indicated workflow (workflow configuration: associated form types).
The Business entity ID allows you to specify the business entity for which the instance will be launched.. When the field will not be checked, the business entity will be set to the default value.
The instance ID from the parent workflow allows you to pass the instance ID of the origin workflow – creating a parent-child relation between the old and new workflow instance.
Below is an example of the configuration of values which will be passed to the new form.
Fig. 7. The configuration of the Hyperlink action – StartElement, parameters mapping
Click on the plus button to add the parameters to the configuration. The values and parameters are searched from the available list on the right.
The value is a variable that refers to the contents of a form field that will be passed to the new form that is launched. The value can also be plain text (in this case do not use the apostrophes).
The parameter is the target field that will be initialized with values from the form of the original workflow instance.. The parameter name should contain a variable that relates to the form field into which the value will be inserted.
Fig. 8. The configuration of the Hyperlink action – OpenElement
Another function – Open Element (…) allows you to open the existing instance.
Fig. 9. The configuration of the Hyperlink action
Their configuration is similar to the Start Element (…) function except that you only need to complete the instance ID for which the form will be displayed.
Fig. 10. The configuration of the Hyperlink action – OpenElement hyperlink
Despite updating WEBCON BPS to the version 2020.1.x. it is still possible to pass parameters via URL (for more information see -> https://howto.webcon.com/process-start-from-hyperlinks-top-link-bar-action-with-automatic-form-field-initialization/ ).
Verification of the StartElement Hyperlink action – Add an employee
Register a department by filling out the form and then, go through the Register path to the Department implementation step. In the Department implementation step add an employee to the department – select the “Add employee” option.
Fig. 11. The Register a department form
After clicking in the hyperlink, the form of the selected workflow along with filled in form fields (Department name, Department director, Mobile phone required) will open. In the following form the “Department name” choice field uses the values registered in the workflow with the departments and the ID it is a (WFD_ID) identifier.
Fig. 12. The Register an employee form
Verification on the OpenElement Hyperlink action – Back to the department registration
Add the OpenElement Hyperlink action working as a menu button in the Employee registration workflow.
Fig. 13. The Register an employee form
Selecting the “Back to department registration” option will open the “Department registration” form. With this solution there is the ability to return to the basic workflow at any time.
Fig. 14. The Register department form
Hyperlink actions triggered by menu buttons allow us to seamlessly connect and pass info between two separate workflows. From the perspective of the end user, navigation between forms is carried out via buttons at the top of the page. They remain blissfully unaware of any underlying configuration or of the fact that they are in fact working with two separate workflows.