- Created by Jesper Gjedde, last modified on Apr 23, 2024
You are viewing an old version of this page. View the current version.
Compare with Current View Page History
« Previous Version 11 Next »
Introduction
Actions is a very powerful toolbox i Perfion. You can build actions that import, export and transform data in endless ways, and you can set up actions to be executed manually by users, automated by the Perfion scheduler or triggered by various events.
This article describes how you create and maintain actions in the web client. The article does not explain how to build specific actions. This is explained in the Action User Guide.
In the web client, actions are managed via Actions in the main menu:
Access to Actions in the main menu of the web client is controlled via the role “Can manage actions in web client”.
Action library
In the left pane you see a list of existing all actions.
Add new action / organize actions
If you want to add a new action to the library or reorganize existing actions, choose Manage Action from the 3-dot menu:
This opens the Actions library in a grid overlay. In this grid you can add new actions and organize existing actions using normal Perfion grid operations:
Edit action (metadata)
Actions have a predefined metadata structure. You can edit this metadata for all actions in the Manage Actions overlay grid shown above, or you can right-click a single action in the library and choose Open Item:
This opens the action in an item editor where you can manage its metadata:
Each field has a specific purpose:
Base value | Name of the action |
Description | For documentation purposes. Not used by the system. |
Appearance | This field controls if the action can be executed by users. If a value is selected in the field, the action is shown in a folder with the same name in the Tools → Execute Actions menu: Apperance (ActionAppearance) is a normal selectable feature. You must create values yourself in Feature Data. |
Job execution | This field controls how the action is executed when users execute it manually in the windows client. Options are:
This option has no effect in the web client. Actions are always executed by the application server. |
Context feature | This field controls if the action can be executed in context of one or more features. Actions must be built with a specific struture and logic to work in context of items. If you select Product in the field, the action can be executed by users in context of Product items: Context Features (ActionsContextFeatures) is a normal selectable feature. You must create values yourself in Feature Data. Values must have identical names to the unique names of the features. |
Delete action
To delete an action, simply choose Delete Action from the right-click menu. This will delete the action and all its elements.
If you delete a virtual folder, all actions in the folder will be deleted.
Copy action
To copy an action, simply choose Copy Action from the right-click menu. This will create an exact copy of the action with the postfix (copy) under the same parent.
Export actions
Actions can be exported to an Excel file. This enables you to import actions under different names or migrate actions between environments.
To export individual actions, choose Export Action(s) from the right-click menu.
To export all actions, choose Export All Actions from the 3-dot menu.
Both options will open the Export Action(s) dialogue:
File name | Type in the name you want for the exported Excel file |
Export with | This option controls which key to use in the Excel file |
Names | Action names will be used as keys in the Excel file. This allows you to create new actions in Perfion when reimporting the file. This option is required if you want to migrate actions. |
Ids | Action Ids will be used as keys in the Excel file. This only allows you to update elements of existing actions when importing the file. |
The exported file looks like this. For details about the file, please refer to article Import / Export Actions.
Import actions
To import actions from an Excel file, simply choose Import Actions from the 3-dot menu.
This will open the Import Actions dialogue:
Select the file you want to import | Click the folder icon and locate the Excel file you want to import |
If one or more actions exists in advance | This option controls how the importer behaves if the import file contains actions that exist in advance. |
Stop import | Importer will stop if the Excel file contains one or more existing actions. NOTE: This option only works when Names are used as keys in the Excel file. |
Skip existing actions but import new | Importer will ignore existing actions in the Excel file but import new actions. NOTE: This option only works when Names are used as keys in the Excel file. |
Replace existing actions and import new | Importer will import all actions in the Excel file. New actions will be created, and existing actions will be replaced by actions in Excel file. IMPORTANT: The importer does not “update” existing actions with changes in the Excel file. If the Excel file contains a single row with reference to an existing action, the importer will first delete the existing action and then create it with rows from Excel file. |
Action elements
When you click an action in the library, you will see the structure and the elements of the action in the right pane.
Groups
A group is a collection of action commands and/or other groups. Groups exist only to provide structure and overview. Groups have no technical function when actions are executed.
Add a group
Click + Group the the toolbar to add a group.
The new group will be added as the last element in the action. Click the pencil icon to write a descriptive name for the group:
Add a group in context
Right-click any existing element and choose Add Group to add a group in context.
If an existing group was right-clicked, the new group will be added as a child to the clicked group.
If an existing command was right-clicked, the new group will be added as a sibling to the clicked command.
Organize groups
You can organize groups by dragging them by the 6-dot handle and dropping them to new positions:
Drop group between existing groups to reorder groups at the same level
Drop group inside another expanded group between existing elements to make group a subgroup (specific order)
Drop group on top of another collapsed group to make group a subgroup (last element in group)
Copy group
Choose Copy from the right-click menu to copy a group. All elements inside the group will be copied with the group.
Move group to other action
Choose Move to other Action from the right-click menu to move a group and all its elements to another action.
This opens a selector where you choose the target action. The moved group will be placed as the first element in the target action.
Ignore group
Click the Ignore checkbox if you want the action to ignore the group and all its elements.
When a group is ignored, all elements inside the group will be ignored when the action is executed regardless of their individual “Ignore status”. The Ignore checkbox at group level takes presedence.
Delete group
Choose Delete from the right-click menu to delete a group. All elements inside the group will be deleted with the group.
Commands
Commands are the actual building blocks of the action. When an actions is executed, all commands are executed in the order they appear in the action.
For detailed information about commands, please refer to the article Action Commands.
Add a command
Click + Command in the toolbar to add a group.
This opens a new window where you select the command you need:
The new command will be added as the last element in the action.
Customize command properties
Click the arrow button to expand the command. You can now customize the command properties found in the top section.
Pencil icon | Write a short description that explains what the command does |
Ignore checkbox | Check this box if you want the action to ignore the command |
Settings icon | This icon opens a windows where you can choose what happens if the command fails |
Stop (default) | The action will stop if the command throws an error. |
Proceed | The action will proceed if the command throws an error. |
Execute action and proceed | Select an error handling action in the selector to be executed if the command throws an error. After the error handling action is executed, the action will proceed with next command. |
Execute action and stop | Select an error handling action in the selector to be executed if the command throws an error. After the error handling action is executed, the action will stop. |
Action to execute | This option is only available for commands EXECUTE.ACTION and EXECUTE.ACTION.LOOP. When one of these commands are selected, you can choose an action the command must execute: |
From | Name of the Input Data Source. |
To | Name of the Output Data Source. |
Script | Script code that may be executed by the Command. Not all commands use scripts. |
Note | You can use this to supporting information and to document the command. |
Customize parameters
Parameters are sub-ordinates to the command. Parameters controls the specific behaviour of the command. Each command has a different set of parameters.
Add parameter | Click the green + icon to add a parameter. A new row will be added where the first available parameter is selected. Change to the parameter you need. |
Remove parameter | Check this red x icon to remove a parameter. |
Sort parameters | Drag a parameter by the 6-dot handle to move it to a different position (relative to other parameters for the same command). |
Value | The content of the Value field relates to the selected parameter. |
Script | Script code that may be used by the parameter. Most parameters don’t use scripts. |
Note | You can use this to supporting information and to document the parameter. |
Ignore | Check this box of you want individual parameters to be ignored when the action is executed. |
Customize mappings
Mappings (also known as Value Mappings) are sub-ordinates to the command. With mappings you can convert input header names to output specific header names and transform values.
Add mapping | Click the green + icon to add a mapping. |
Remove mapping | Check this red x icon to remove a mapping. |
Sort mappings | Drag a mapping by the 6-dot handle to move it to a different position (relative to other mappings for the same command). |
From | Name of Header, as it is named from Input-source. |
To | Name of the Header as it should be called in the Output-source. |
Script | Any Script code to execute for this header |
Note | You can use this to supporting information and to document the mapping. |
Ignore | Check this box of you want individual mapping to be ignored when the action is executed. |
Organize commands
You can organize commands by dragging them by the 6-dot handle and dropping them to new positions:
Drop group between existing groups to reorder groups at the same level
Drop group inside another expanded group between existing elements to make group a subgroup (specific order)
Drop group on top of another collapsed group to make group a subgroup (last element in group)
Copy group
Choose Copy from the right-click menu to copy a group. All elements inside the group will be copied with the group.
Move group to other action
Choose Move to other Action from the right-click menu to move a group and all its elements to another action.
This opens a selector where you choose the target action. The moved group will be placed as the first element in the target action.
Ignore group
Click the Ignore checkbox if you want the action to ignore the group and all its elements.
When a group is ignored, all elements inside the group will be ignored when the action is executed regardless of their individual “Ignore status”. The Ignore checkbox at group level takes presedence.
Delete group
Choose Delete from the right-click menu to delete a group. All elements inside the group will be deleted with the group.
- No labels