The Action Launcher control presents as buttons all Actions defined for a specific entity. The control will only display the available Actions for the Stakeholder defined to access them. These actions are visible depending the visibility rules configured for them. For more information about how to configure an action and set the visibility rule for them, refer to Actions.
To use an Action Launcher Control:
•You should have defined Actions related to the Entity.
•Take into account the visibility defined for each Action: if it is enabled to be shown in Processes, if it is enabled for the Stakeholder accessing the activity, if the visibility rule of the Action is met.
•Action Launcher is not supported for Add forms in Tables.
•A new process will launch ONLY if the Stakeholder executing it has permissions to create such process, from the Bizagi Studio - Security - New case definition. If the Stakeholder is not enabled to create such process the Action will not display.
Every control has a properties that allow to customize its behavior in the Work Portal. However, some properties are exclusive to a specific control. The following are properties exclusive to the Action Launcher control:
Entity from where the actions are taken to create each button. Only the actions defined in this entity will be rendered.
If the data source is a related entity, Bizagi will show actions if the related entity is filled-in, that is, if it has a value defined. In the related entity is null, no buttons will be shown.
Define the data of the current process that has to be injected in each of the forms, expressions or process entities launched, as end users activate Actions, from the Actions launcher.
The Xpaths sent will be mapped automatically when the target entities have a direct relationship with them. Otherwise, the relationship to be mapped has to be created as a Hint.
Allows to hide/show actions related to one or more categories. Click on to display the list of tags available for the selected Data source.
This property is only visible when one or more actions have Categories defined.
The categories for the actions are defined in Step 4 of the advanced configuration wizard.
Select a template
Expand the Select property property's drop-down list and select one of the four options.
•None: Select this value when it is not necessary to display an Entity template for the control.
•Default: Select the value when you want to display the default template of the chosen Entity. Bear in mind that Bizagi uses a basic template that chooses random attributes of the entity to which a record belongs to.
•New Template: this will open the Template wizard. For more information about the creation of templates, refer to Data Templates.
•Select a Form: choose from a list of templates previously defined for the Entity.
Defines the maximum number of actions to be rendered. When the number of actions available exceeds this number, the extra number of actions will be grouped in an expandable list.
Defines whether the actions will be displayed horizontally or vertical. Default value is true (horizontal).
Allow to Search
Displays a Search box in order to find the required action. This property is enabled when the Horizontal property is false
Defines whether the selection of the actions will be multiple (true) or single (false). Default value is true. When false, the user may select one Action or none at all, but no more than one.
This property is available when the Multiple selection property is false. When this property is true (exclusive) The user must select one action. Otherwise (not exclusive), the user can select one or any option at all.
Default value is false.
Max items example
In the next example we will use our Bizagi Hospital project. In the Take blood sample activity, a doctor can launch several actions according to the Patient information during the completion of this task.
The situation mentioned above can be comply using the Action Launcher control.
1. Define the actions in the Doctor experience, theses actions must be executed in the entity Patient. Define the visibility rules as your convenience. For example, in the image below, the pregnancy checkups and the Breast and Cervical Cancer Early Detection will be available when the patient is a woman.
2. Go to the Blood Test process and open the related form of the Take blood sample activity. Go to Controls tab and expand Bizagi controls.
Drag and drop the Action Launcher control.
3. Open the control's properties and set the Data source. As we mentioned before, the actions will be executed in the Entity patient, so the XPath to set will be BloodTest.Patient.
4. The Entities of the actions defined in Step 1 have a relation with Patient, so it is required to send the information of the current patient to the actions. Select the XPath BloodTest.Patient in the Additional xpaths property.
Click on the button per each additional XPath you want to add.
5. As this activity already has a template for the patient, it is not necessary to select a template. In order to improve the space of the form, the maximum items to be displayed will be 3 and the actions will be displayed horizontal. Remember that the doctor may order one or more exams at this point so keep the Multiple selection property in true.
6. Save the changes and go to the Work Portal to test the results.
Note that when the patient is a woman, the Pregnancy checkup and the Breast and Cervical Cancer Early Detection are displayed:
However, when the patient is a man, these exams will no be displayed in the Action Launcher control:
Click the action in order to add it to the list of actions to execute when the activity is completed.
When the constructor of the selected action uses a process with a Start Form, a modal window will be displayed and when the user saves the information of the start form, the control will list the action.