Skip to content

Commit

Permalink
docs: update docs wrt engine updates #7064
Browse files Browse the repository at this point in the history
Signed-off-by: jgomer2001 <bonustrack310@gmail.com>
  • Loading branch information
jgomer2001 committed Dec 19, 2023
1 parent 5b83bc8 commit d57b085
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/admin/developer/agama/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ This can be configured in the project's [metadata file](../../../agama/gama-form

### Updates in a flow's code are not reflected in its execution

When a project is re-deployed, a flow remains unchanged if it comes with errors in the provided `.gama` file. The response obtained by the deployment API will let you know which flows have errors and their descriptions.
When a project is re-deployed, a flow remains unchanged if it comes with errors in the provided `.gama` file. The tool used for deployment will let you know which flows have errors and their descriptions.

### Why are the contents of a list or map logged partially?

Expand Down
9 changes: 4 additions & 5 deletions docs/admin/developer/agama/jans-agama-engine.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,9 +232,11 @@ The usage of a hash sign (or spaces) before a method name helps disambiguate whe

Any method that meets the conditions mentioned (public or interface static) and that is reachable in the JVM [classpath](#classpath) can be called; developers are not restricted solely to `java.*` packages.

When using `Call`, the method to execute is picked based on the name (e.g. after the `#` sign) and the number of arguments supplied. If a class/interface exhibits several methods with the same name and arity (number of parameters), there is **no way to know** which of the available variants will be called. The `java.util.Arrays` class has several methods of this kind for instance.
When using `Call`, the method to execute is picked based on the name (e.g. after the `#` sign) and the number of arguments supplied. If a class/interface exhibits several methods with the same name and arity (number of parameters), the method that best matches the dataypes of the arguments with respect to its signature is selected. Sometimes this requires to perform arguments [conversions](#arguments-conversion) and they may fail. In such case, the second best suited method is tried and so on.

For non-static method invocations, i.e. no hash sign, the class used for method lookup is that of the instance passed (the first parameter in the `Call` directive). When the instance does not hold a Java but an Agama value, the following is used to pick a class:
When all attempts fail or there are no candidate methods to choose from, the `Call` simply throws a `NoSuchMethodException`.

For non-static method invocations, i.e. no hash sign, the class used for method lookup is that of the instance passed (the first parameter in the `Call` directive). This includes all associated superclasses too, as expected. When the instance does not hold a Java but an Agama value, the following is used to pick a class:

|Agama type|Java class for method lookup|
|-|-|
Expand All @@ -244,9 +246,6 @@ For non-static method invocations, i.e. no hash sign, the class used for method
|`list`|`java.util.List`|
|`map`|`java.util.Map`|

Once a concrete method is selected, a best effort is made to convert (if required) the values passed as arguments so that they match the expected parameter types in the method signature. If a conversion fails, this will degenerate in an `IllegalArgumentException`. More on conversions [here](#arguments-conversion).


**Limitations:**

- _list_ and _map_ literals cannot be passed as arguments to method calls directly. This means the following is illegal: `Call co.Utils#myMethod { key: [ 1, 2 , 3] } [ "Yeeha!" ]`. To achieve the same effect assign the literal value to a variable and pass that instead
Expand Down

0 comments on commit d57b085

Please sign in to comment.