|
| 1 | +.. Licensed to the Apache Software Foundation (ASF) under one |
| 2 | + or more contributor license agreements. See the NOTICE file |
| 3 | + distributed with this work for additional information# |
| 4 | + regarding copyright ownership. The ASF licenses this file |
| 5 | + to you under the Apache License, Version 2.0 (the |
| 6 | + "License"); you may not use this file except in compliance |
| 7 | + with the License. You may obtain a copy of the License at |
| 8 | + http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | + Unless required by applicable law or agreed to in writing, |
| 10 | + software distributed under the License is distributed on an |
| 11 | + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 12 | + KIND, either express or implied. See the License for the |
| 13 | + specific language governing permissions and limitations |
| 14 | + under the License. |
| 15 | + |
| 16 | +
|
| 17 | +Custom Actions |
| 18 | +~~~~~~~~~~~~~~ |
| 19 | + |
| 20 | +In addition to standard instance operations, extensions support custom actions. These can be configured via UI in the extension details view or the addCustomAction API. The extension entry-point must implement handlers for these action names and process any provided parameters. |
| 21 | + |
| 22 | + |add-custom-action.png| |
| 23 | + |
| 24 | +Description, allowed role types, parameters, success/error messages, configuration details, timeout can be defined during creation or update. |
| 25 | +Alowed role types can be one or more of Admin, Resource Admin, Domain Admin, User. |
| 26 | +Success and error messages will be used and returned during action execution. They allow string expansion and the following can be used to customise messages: |
| 27 | + |
| 28 | + - {{actionName}} for showing name of the action |
| 29 | + - {{extensionName}} for showing name of the extension |
| 30 | + - {{resourceName}} for showing name of the resource |
| 31 | + |
| 32 | +An example usage can be - "Successfully completed {{actionName}} for {{resourceName}} using {{extensionName}}". |
| 33 | +Configuration details can be key-value pairs which will be passed to the extension entry-point during action execution. |
| 34 | +Timeout value can be configured to adjust wait time for action completion. |
| 35 | + |
| 36 | +A single parameter can have the following details: |
| 37 | + |
| 38 | + - **name**: Name of the parameter. |
| 39 | + |
| 40 | + - **type**: Type of the parameter. It can be one of the following: BOOLEAN, DATE, NUMBER, STRING |
| 41 | + |
| 42 | + - **validationformat**: Validation format for the parameter value. Supported only for NUMBER and STRING type. For NUMBER, it can be NONE or DECIMAL. For STRING, it can be NONE, EMAIL, PASSWORD, URL, UUID. |
| 43 | + |
| 44 | + - **valueoptions**: Options for the value of the parameter. This is allowed only for NUMBER and STRING type. |
| 45 | + |
| 46 | +Running Custom Action |
| 47 | +--------------------- |
| 48 | + |
| 49 | +All enabled custom actions can then be triggered for a resource of the type the action is defined for or provided while running, using the **Run Action** view or runCustomAction API. |
| 50 | + |
| 51 | + |run-custom-action.png| |
| 52 | + |
| 53 | + |
| 54 | +.. Images |
| 55 | +
|
| 56 | +
|
| 57 | +.. |add-custom-action.png| image:: /_static/images/add-custom-action.png |
| 58 | +.. |run-custom-action.png| image:: /_static/images/run-custom-action.png |
| 59 | +.. |run-custom-action-instance.png| image:: /_static/images/run-custom-action-instance.png |
0 commit comments