Functions are discrete operations that can be associated with a Resource Model and are run on specific nodes or nodegroups whenever a user clicks creates or modify's a Resource. Here in the Function Manager you will associate Functions with this Resource Model and configure them appropriately.
To add a Function to this Resource Model, click on it in Function Library, and notice that it is added to the list of Selected Functions. To delete a Function, use the symbol in the upper right corner.
Arches comes with three default functions (see below). However, functions are envisioned as the hook through which developers can easily customize Arches capabilities, because new Functions can be added to your individual Arches installation. Learn more here.
This function will generate one or more descriptors for Resources that are created with this Resource Model. These descriptors are used throughout the database interface, but are not saved as part of the resource. This gives you control over the way Resources are identified and described in search results and elsewhere.
Once added to the Resource Model, use the appropriate tab to configure a descriptor template. Choose a nodegroup, and variables corresponding to each node in that node group will be added to the template, demarcated with < >
. You can rearrange these variables and add text to customize the descriptor.
Note that if there are multiple instances of a given nodegroup in a Resource, the first one added will be used to create these descriptors. To manually change this, edit the Resource in question and drag the desired tile to the top of the list.
Consider a Resource where the Appellation node value is Folsom School and Appellation Type node value is Primary.
Selecting the Appellation nodegroup will populate the template with <Appellation Type>, <Appellation>
. The resulting descriptor would read Primary, Folsom School. Changing the template to Building Name: <Appellation>
would yield Building Name: Folsom School.
By defining required nodes within your Resource Model, you can enforce that specific nodes within the same nodegroup are collected concurrently. For example, you may want to disallow users from saving an Appellation without adding an Appellation Type at the same time. To do this, you would add the Define Required Nodes fuction, and configure it by selecting the Appellation and Appellation Type nodes.
You can add more than one enforcement rule to this function. Just go down the list of node groups and select any nodes that should be collected together. Remember, these rules are only enforced within nodegroups, not across the entire graph of the Resource Model.
This function performs the actual file upload that must occur in order to upload a digital file, like an image, to your database. In Triggering Nodegroups you must select the nodegroup that contains the file-list node. Select multiple nodegroups if there are multiple file-upload nodes this Resource Model's graph.