
This blog focuses on the concept and usability of the Static Parameter within an Action of the Action Project.
Actions Editor – Feature List, Usage and Maintenance of Actions Project | SAP Blogs
A Static assignment to a parameter helps to default a value for an input parameter that is implicit to the Action Designer and will not be overridden for subsequent cross consumption. An Action designer may have a need to enforce a technical parameter with a Static assignment and define a value that gets enforced throughout the execution of the Action and its cross consumption while invoking an API call. This value could be defaulted or fixed for some of the input parameters to reduce the scope of the Action, make it more Business feature relevant or have very direct inputs while getting consumed by the Citizen Developer.
Example – An Action Designer could assign a Static value to an input parameter Country = DE to restrict the scope of the API output by only returning the records that are relevant with the Country = “Germany”
Assigning a parameter with a Static value would enforce that the consuming application will not allow a change of values for such parameters.
An Action Designer can click on the row which opens edit pane to enforce static assignment. Let us try to understand this with an example.
Marking an Input Parameter as static in Actions Editor.
Static parameter can be assigned using the edit pane opened after clicking the row in table for each parameter in Actions Editor as shown in figure 1.
Figure 1: static parameter assignment
When static parameter is assigned as Yes, it is mandatory to provide a static value else the Actions Editor will show an error and the user will not be able to save or release the changes as shown in figure 2.
Figure 2: static parameter assigned without value
To proceed with the changes either value should be provided, or static parameter should be set to No.
An Action Designer can use the value field to provide a default value for the parameter, if no input is given for the parameter, then the default value provided will be considered as input. Let us try to understand this with an example.
Providing a default value for a parameter in Actions Editor.
The default value for a parameter is assigned using the edit pane opened after clicking the row in table for each parameter parameter in Actions Editor as shown in figure 3.
Figure 3: default value assignment
Support for Additional Parameters for Static Definition:
Few parameters such as $select and $expand are not supported for cross consumption and are kept as deleted by default. Let us try to understand this with an example.
Consuming $expand parameter.
If an Action Designer wants to use these parameters, he/she needs to add them using the Add button present above the table.
Figure 4: adding $expand to consume
The capability to undo the static assignment for unsupported definitions is not possible as shown in figure 5. When $expand is introduced in the definition of action will require a mandatory static parameter assignment or they have to be removed from the definition.
Figure 5: after addition of $expand
Thanks for reading and I hope it helped to understand the concept of maintaining the Parameters within the Actions Editor. Please feel free to leave a comment if there are any questions and I would be happy to receive any feedback.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
24 | |
20 | |
19 | |
19 | |
14 | |
12 | |
10 | |
9 | |
7 | |
7 |