This article explains how to create a new action in the GXflow Client. Also, for the sake of the example, it will explain how to create an action that calls a Web Panel and displays the parameters received.
It is important to understand that more useful actions than those explained below can be achieved with this functionality, but for simplicity purposes, this article is focused on explaining how to create an action and not what an action does -in other words, its code.
Create a new Web Panel object called "ActionReceiveParms".
Parm(in:&char);
char (Type: Character)
Add a Textblock with the "Received:" caption and the "char" variable to the layout.
First, open your GXflow Standard Client application. To do so, right-click on one of your Business Process Diagram object and select Run:
Log in with a user that has the role GXflow Backend Administrator—see GXflow Management Console for details on how to manage users and roles.
Note: when using GeneXus Access Manager (GAM) the GAM Backoffice must be used in order to manage users, roles and permissions.
Open the Actions component by selecting it—it is located under the GXflow Backend node.
The GXflow Actions dialog will be opened.
Press the button, and set the properties as follows:
It is important to set the ClassName property to "ActionReceiveParms"—the name of the Web Panel created in step 1— and to disable the "Is Batch?" property so the Web Panel is called as a popup.
Then, the properties "Apply on selection" and "MultipleSelection" are used to use the IDs of the selected rows as parameters.
Therefore:
- Apply on selection: if this property is enabled, a string containing the ID of the selected row is used as a parameter.
- Multiple Selection: if this property is enabled, a string containing the set of IDs separated by commas of the selected rows is used as a parameter.
Next, in order to use the newly created GXflow Actions you must add them to a Component. For simplicity purposes, add them to an existing Component.
To do so, open the "Components" component by selecting it—it is located under the GXflow Backend node:
Select the "Inbox" component and press the button; a dialog will be displayed where you can select the actions you want to add or remove from the component.
Add the "ActionReceiveParms" action by selecting it from the "Actions" grid and then using the . Press OK.
Note: when using GAM a permission will be created once the action is added to a component. The permission will be created with name "{COMPONENT_ID}_{ACTION_ID}"; in this case it will be: "INBOX_ActionReceiveParms".
Lastly, test your action. To do so, log in with a user that has permissions to use the "Desktop" menu— for example WFADMINISTRATOR.
Next, open the GXflow Inbox, select a Process Instance and click on "More Actions". Then click on "ActionReceiveParms".
The following will be displayed:
Where "8" is the ID of the selected Process Instance.
If two Process Instances are selected, the following will be displayed:
GXflow Backend
GXflow Menus
GXflow Components
GXflow Actions