Resource actions
Introduction to resource actions in ConSol CM
Resource actions allow execute scripts for resources. In addition, it is possible to display a form on the resource page or above the detail search in scope of a resource action. They are assigned to resource types.
Concepts, terms and definitions
Concept |
Other terms |
Definition |
---|---|---|
resource |
|
Asset used in the business process; always belongs to a resource type |
resource type |
|
Lower hierarchical level of the resource model; defines the data model used for its resources; basis for assigning permissions and determining the available activities and relations |
resource category |
resource group |
Upper hierarchical level of the resource model; can contain several resource types |
resource model |
|
Hierarchical data model for resource objects, which contains resource categories on the upper hierarchical level and resource types on the lower hierarchical level |
resource form |
|
Form which is displayed on the top of the page when executing a manual or search action |
action script |
|
Script of the type Resource action or Search action for resources which implements the logic to be executed |
Purpose and usage
Resource actions can be either automatically executed when a certain event occurs or be executed manually by a user in the Web Client.
The following types of actions are available:
-
Automatic actions: Action executed automatically when a resource is created, modified or deleted, or when a resource relation is created or deleted.
-
Manual actions: Action available on the resource or detail search page for manual execution. It is shown in the Activities box in the upper right corner of the Web Client. Manual actions on the resource page apply to the current resource. Search actions apply to the checked results of the open detail search results tab.
Manual actions can include a form, which is displayed at the top of the page and needs to be filled out to perform the action.
The availability of the action can be determined by script. If the condition script returns “true”, automatic actions are executed and manual actions are shown in the Web Client.
Users need the permission “Act” for the resource type in order to perform manual and search actions.
Examples for resource actions are actions to update resource data from an external system, or to create a case based on certain parameters which are entered in the action form.
Settings for resource actions
The following settings are available for resource actions in the Basic tab.
-
Internal name: Mandatory. The technical name of the resource action.
-
Type: Mandatory. The usage of the resource action. Possible values are:
-
Creation action: Executed automatically when a resource is created.
-
Update action: Executed automatically when a resource is updated, i.e. its data is modified, or comments or attachments are added or removed.
-
Deletion action: Executed automatically when a resource is deleted.
-
Relation action: Executed automatically when a relation to the resource is created or deleted.
-
Manual action: Executed manually on the resource page of the Web Client.
-
Search action: Executed manually for detail search results in the Web Client. The resource action is available when the tab of the resource type which has the action assigned is selected.
-
-
Condition script: Optional. The script of the type Resource condition or Search condition for resources which is executed to determine if the action is performed or not. For automatic actions, the action script is only executed if the condition script returns “true”. Manual and search actions are only displayed if the condition script returns “true”.
-
Action script: Mandatory except for manual actions with form. The script of the type Resource action or Search action for resources which is executed.
-
Used in resource types : Read-only. Shows the resource types which have the action assigned.
-
Localized name: Mandatory. The localized name of the resource action. Displayed in the Web Client for manual and search actions.
-
Localized description: Optional. The localized description of the resource action. Displayed as tooltip in the Web Client for manual actions and search actions.
Settings for actions forms
For manual and search actions, the Form tab is available. It allows to select a form which should be displayed when executing the action (optional). The following settings are available:
-
Action form: Optional. The action form which is displayed when the user clicks the action. The action script is executed after saving the form.
-
Form condition script: Optional. Script of the type Action form condition, which determines if the form is shown.
-
Form prefill script: Optional. Script of the type Action form prefill, which prefills form fields with certain values.
-
Required fields: Optional. Select the fields which should be required in the form.
Basic tasks
Using resource actions
Please perform the following steps to use a resource action:
-
Create a script of the type Resource action or Search action for resources, see Action scripts. This can be done either on the Scripts page or by entering the desired name in the Action script selector and choosing the create option.
-
If needed, create a script of the type Resource condition or Search condition for resources, see Action scripts. This can be done either on the Scripts page or by entering the desired name in the Condition script selector and choosing the create option.
-
Create a resource action on the Resource actions page.
-
Assign the resource action to a resource type on the Resource models page, see Managing resource types
Managing resource actions
Resource actions are managed on the Resource actions page of the Web Admin Suite. The following actions are available:
-
Create a new resource action
Click the New action button above the list of resource actions or duplicate an existing resource action by clicking the Duplicate icon of an action. Provide the required settings in the Basic tab (see Settings for resource actions), and define an action form in the Form tab if needed (only manual or search actions, see Settings for actions forms). -
Edit a resource action
Click the Edit icon or resource action’s row and update the desired data in the Basic tab (see Settings for resource actions) and Form tab (see Settings for actions forms). -
Deactivate a resource action
You can deactivate resource actions by clicking the Deactivate icon.If you deactivate a resource action, you cannot assign it to resource types anymore. If the action is already assigned to a resource type, it is ignored, i.e. an automatic action is not executed, and a manual or search action is not shown in the Web Client.
-
Activate a resource action
You can activate resource actions which are deactivated by clicking the Activate icon. -
Delete a resource action
You can delete a resource action which is not assigned to any resource type by clicking the Delete icon.
Advanced tasks
Working with resource action scripts
The following scripts are relevant for resource actions:
-
Resource action: Main script executed when a manual and automatic action is performed.
-
Search action for resources: Main script executed when a search action is performed.
-
Resource condition: Script which determines if a manual action is shown in the Web Client, or if an automatic action is executed. Must return true or false.
-
Search condition for resources: Script which determines if a search action is show in the Web Client. Must return true or false.
-
Action form condition: Script which determines if an action form is displayed for a manual or search action. Must return true or false.
-
Action form prefill: Script which prefills the action form with certain values.
You can find details about programming action scripts in Action scripts.