ar - nodecontexts Function

This function is controlled by content in a JSON file which is included in the function as opposed to a configuration parameter. This is done because of the amount of content that it contains. In the function’s src directory, there's a file called node_contexts.json which you must edit based on the configuration of your AR model. Example node details are supplied in the file by default. =The file determines specifications and other table sections, procedures, IoT sensor placement, and so on.

Once you edit the file and indlude the configuration information from you own AR model, you can deploy the function in the same way you deployed other functions.

fn deploy --app ar-accelerator 

This time, for this example, we removed the –no-bump flag since we made a code change to the function. OCI F(n) will deploy the latest version with your updates in this scenario.

Next, test to make sure that your deployment was successful by querying for one of the nodes that you defined in the JSON file.
echo -n '{"name":"FrontLeftFoot"}' | fn invoke ar-accelerator ar-nodecontexts
The expected returned result is a JSON object with the node details for the node name that you passed into the function. If no results are returned, then there's a problem with the mapping the name of the node that you passed into the function to your JSON file.
{"items":[{"name":"FrontLeftFoot","tableSections":[{"name":"Specifications","rows":[{"title":"Foot","subtitle":"Case Component"}]}]}]}