### Start Rule Tests (All) Smart Service Example
Source: https://docs.appian.com/suite/help/26.3/Start_Rule_Tests_All_Smart_Service.html
This example demonstrates a process model workflow that initiates a test run using the Start Rule Tests (All) smart service. It then periodically checks the test run's status and retrieves the results once completed.
```Appian Process Model
Start Rule Tests (All) smart service
Get Test Status script task (calls a!testRunStatusForId())
Get Test Results script task (calls a!testRunResultForId())
```
--------------------------------
### Start Process with Decision Output
Source: https://docs.appian.com/suite/help/26.3/Decisions.html
This example shows how to use the Start Process smart service to dynamically start a process and pass parameters based on the output of a decision. The decision's result is passed directly into the smart service.
```Appian Process Model
a!startProcess(
{
processModel: fn!getClaimsProcessModel(pv!decisionResult),
processParameters: {
"claimDetails": pv!claimDetails,
"agentToAssign": fn!getAgentForRegion(pv!decisionResult)
}
}
)
```
--------------------------------
### Example for Prompt Builder
Source: https://docs.appian.com/suite/help/26.3/json-responses.html
Provide examples of input and expected output to guide the model's response format. Ensure outputs match the desired JSON structure for consistency.
```text
Human: "The team gathered around the newly arrived shipment, a collection of specialized sensors critical for the ongoing environmental monitoring project. Upon careful inspection, it was confirmed that all twenty units were present and undamaged, aligning perfectly with the details outlined in purchase order number PO-2025-0411-Alpha. After accounting for the unit price, expedited shipping, and a small handling fee, the totalCost for this essential equipment came to $7,850.00."
Assistant: {"totalCost": "7850.00", "purchaseOrderNumber": "PO-2025-0411-Alpha"}
Human: "The accounting department finalized the invoice for the bulk order of office supplies placed last week. Reviewing the documentation, they noted that purchase order number 10-Delta-77 covered items ranging from stationery to new ergonomic chairs for the marketing team. After applying the negotiated corporate discount and factoring in the delivery charges, the totalCost billed to the department amounted to $1,245.75."
Assistant: {"totalCost": "1245.75", "purchaseOrderNumber": "10-Delta-77"}
```
--------------------------------
### Start Rule Tests (Applications) Smart Service Workflow Example
Source: https://docs.appian.com/suite/help/26.3/Start_Rule_Tests_Applications_Smart_Service.html
This workflow demonstrates starting a test run, checking its status until completion, and then retrieving the results. The status check is scheduled to run every minute.
```Process Model
Start Rule Tests (Applications) Smart Service -> Get Test Status (Script Task, calls a!testRunStatusForId()) -> Loop until COMPLETE -> Get Test Results (Script Task, calls a!testRunResultForId())
```
--------------------------------
### Upload File and Start Process
Source: https://docs.appian.com/suite/help/26.3/fnc_system_a_submituploadedfiles.html
This example demonstrates uploading a file and initiating a process simultaneously. The file is saved to the target folder only if the process completes successfully. Configure `cons!PROCESS_MODEL_CONSTANT` with your process model and ensure the `cons!FOLDER_CONSTANT` is set up.
```Appian SAIL
a!localVariables(
local!data: 'recordType!{aa4ce38f-1a9d-4827-af51-e2ccb80a2c8b}AS Vehicle'(
'recordType!{aa4ce38f-1a9d-4827-af51-e2ccb80a2c8b}AS Vehicle.fields.{8b9b140f-deaf-4ca3-8066-1c4624cda5ea}vehicleImage': null
),
local!submissionSuccessful,
{
a!fileUploadField(
label: "Vehicle Image",
labelPosition: "ABOVE",
value: local!data['recordType!{aa4ce38f-1a9d-4827-af51-e2ccb80a2c8b}AS Vehicle.fields.{8b9b140f-deaf-4ca3-8066-1c4624cda5ea}vehicleImage'],
saveInto: local!data['recordType!{aa4ce38f-1a9d-4827-af51-e2ccb80a2c8b}AS Vehicle.fields.{8b9b140f-deaf-4ca3-8066-1c4624cda5ea}vehicleImage'],
/* Replace this with a constant of type Folder in your environment */
target: cons!FOLDER_CONSTANT
),
a!buttonArrayLayout(
buttons: {
a!buttonWidget(
label: "Submit",
style: "SOLID",
saveInto: a!startProcess(
/* Replace this with a constant of type Process Model that writes the image ID */
processModel: cons!PROCESS_MODEL_CONSTANT,
processParameters: {
vehicle: local!data
},
/* Only upload the files if the process completes successfully */
onSuccess: a!submitUploadedFiles(
onSuccess: a!save(local!submissionSuccessful, true),
onError: a!save(local!submissionSuccessful, false)
),
onError: a!save(local!submissionSuccessful, false)
)
)
},
align: "START"
)
}
)
```
--------------------------------
### Example Response for Get Credential Details
Source: https://docs.appian.com/suite/help/26.3/rpa-9.22/api-credential-management.html
Example JSON response body when successfully retrieving credential details.
```JSON
{
"invocationResult": "OK",
"result": {
"uuid": "69c1c62dd6765634c8a95f6e",
"application": "SAP_PROD",
"username": "svc_robot_01"
},
"exceptionThrownText": null
}
```
--------------------------------
### Batch Size and Start Index
Source: https://docs.appian.com/suite/help/26.3/api/com/appiancorp/suiteapi/process/analytics2/ReportData.html
Methods for getting and setting the batch size and start index for report data retrieval.
```APIDOC
## GET /api/reports/{reportId}/batchSize
### Description
Get the batch size for report data retrieval.
### Method
GET
### Endpoint
/api/reports/{reportId}/batchSize
### Response
#### Success Response (200)
- **batchSize** (integer) - The batch size.
#### Response Example
```json
{
"batchSize": 100
}
```
```
```APIDOC
## PUT /api/reports/{reportId}/batchSize
### Description
Set the batch size for report data retrieval.
### Method
PUT
### Endpoint
/api/reports/{reportId}/batchSize
### Parameters
#### Request Body
- **batchSize_** (integer) - Required - The batch size to set.
### Response
#### Success Response (200)
- **status** (string) - Indicates success.
#### Response Example
```json
{
"status": "success"
}
```
```
```APIDOC
## GET /api/reports/{reportId}/startIndex
### Description
Get the start index for report data retrieval.
### Method
GET
### Endpoint
/api/reports/{reportId}/startIndex
### Response
#### Success Response (200)
- **startIndex** (integer) - The start index.
#### Response Example
```json
{
"startIndex": 0
}
```
```
```APIDOC
## PUT /api/reports/{reportId}/startIndex
### Description
Set the start index for report data retrieval.
### Method
PUT
### Endpoint
/api/reports/{reportId}/startIndex
### Parameters
#### Request Body
- **startIndex_** (integer) - Required - The start index to set.
### Response
#### Success Response (200)
- **status** (string) - Indicates success.
#### Response Example
```json
{
"status": "success"
}
```
```
--------------------------------
### Deployment Steps Generation Example
Source: https://docs.appian.com/suite/help/26.3/wsr-14/sol-custom-suite-user-guide.html
This example shows the dynamically generated deployment steps based on answers to a series of questions. Follow these steps to deploy your solution to a higher environment.
```Text
1. Navigate to the DEPLOYMENT tab under the solution you want to deploy.
2. Answer the series of questions to dynamically generate the required deployment steps on-screen.
3. Follow the steps shown to deploy your solution to a higher environment.
```
--------------------------------
### Signature Upload in a Start Form or Task
Source: https://docs.appian.com/suite/help/26.3/Signature_Component.html
Use this example in a start form or task. If not used in a start form or task, replace `submit: true` with `saveInto: a!submitUploadedFiles()` on the submit button.
```Appian Expression Language
a!localVariables(
local!signature,
a!formLayout(
titleBar: a!headerTemplateSimple(
title: "Signature Form",
secondaryText: "Use this example in a start form or task"
),
contents: {
a!signatureField(
label: "Signature",
labelPosition: "ABOVE",
/* The file name and description are used for the uploaded signature file */
fileName: loggedInUser() & "_signature_" & today(),
fileDescription: loggedInUser() & "'s signature on " & today(),
/* Replace this with a constant of type Folder in your environment */
target: cons!FOLDER_CONSTANT,
value: local!signature,
saveInto: local!signature
)
},
buttons: a!buttonLayout(
primaryButtons: {
a!buttonWidget(
label: "Submit",
style: "SOLID",
loadingIndicator: true,
/* If you don't set the submit parameter to true, the signature will not be uploaded */
submit: true
)
},
secondaryButtons: {
a!buttonWidget(
label: "Cancel",
value: true,
saveInto: {},
submit: true,
style: "OUTLINE",
validate: false
)
}
)
)
)
```
--------------------------------
### Appian Site Running Status Example
Source: https://docs.appian.com/suite/help/26.3/Starting_and_Stopping_Appian.html
Example output showing all Appian component pods in a 'Running' state with READY status '1/1', indicating a successful site startup.
```bash
NAME READY STATUS RESTARTS AGE
appian-data-server-0 1/1 Running 0 25m
appian-httpd-8658f7fdb7-k9f6j 1/1 Running 0 25m
appian-httpd-bf56974d4-crv4g 1/1 Running 0 25m
appian-kafka-0 1/1 Running 0 25m
appian-search-server-0 1/1 Running 0 25m
appian-service-manager-analytics00-0 1/1 Running 0 25m
appian-service-manager-analytics01-0 1/1 Running 0 25m
appian-service-manager-analytics02-0 1/1 Running 0 25m
appian-service-manager-channels-0 1/1 Running 0 25m
appian-service-manager-content-0 1/1 Running 0 25m
appian-service-manager-download-stats-0 1/1 Running 0 25m
appian-service-manager-execution00-0 1/1 Running 0 25m
appian-service-manager-execution01-0 1/1 Running 0 25m
appian-service-manager-execution02-0 1/1 Running 0 25m
appian-service-manager-forums-0 1/1 Running 0 25m
appian-service-manager-groups-0 1/1 Running 0 25m
appian-service-manager-notifications-0 1/1 Running 0 25m
appian-service-manager-notifications-email-0 1/1 Running 0 25m
appian-service-manager-portal-0 1/1 Running 0 25m
appian-service-manager-process-design-0 1/1 Running 0 25m
appian-webapp-0 1/1 Running 0 25m
appian-zookeeper-0 1/1 Running 0 25m
```
--------------------------------
### Deployment Steps Generation Example
Source: https://docs.appian.com/suite/help/26.3/kyc-23.3.1.6/sol-custom-suite-user-guide.html
This example shows the dynamically generated deployment steps after answering a series of questions related to deploying customizations to a higher environment.
```text
1. Backup your current environment.
2. Export the customizations from the source environment.
3. Import the customizations into the target environment.
4. Perform a smoke test to verify the deployment.
5. If issues arise, restore the backup and investigate.
```
--------------------------------
### Example Customization: Adding a Training Link
Source: https://docs.appian.com/suite/help/26.3/kyc-23.3.1.6/sol-custom-suite-user-guide.html
This example demonstrates how to add a new 'Training' link to a solution's landing page. The code is commented to provide step-by-step instructions for performing the customization.
```java
/*
* Customization: Add a "Training" link to the landing page.
*
* Steps:
* 1. Locate the existing landing page component.
* 2. Add a new link element with the desired URL and text.
* 3. Save the changes.
*
* Example:
* // Original landing page code (simplified)
* //
* //
Welcome!
* //
This is the main content.
* //
*
* // Modified landing page code with "Training" link
*
*
Welcome!
*
This is the main content.
*
Training
*
*/
```
--------------------------------
### Search Substring Example
Source: https://docs.appian.com/suite/help/26.3/Appian_Functions.html
Find the starting index of a substring within a larger string using search(). Specify the starting search position.
```Appian Process Modeler
search("to","Boston",1)
```
--------------------------------
### Find Substring Example
Source: https://docs.appian.com/suite/help/26.3/Appian_Functions.html
Find the starting index of a substring within a larger string using find(). Specify the starting search position.
```Appian Process Modeler
find( "to", "Boston", 1 )
```
--------------------------------
### Example Interface for Action Configuration
Source: https://docs.appian.com/suite/help/26.3/cms-configure-automation-rules.html
Create an interface to handle user input fields for configuring a new action in the Control Panel.
```text
CMGT_WFL_AutomationRule_Configure_AssignmentLogic
```
--------------------------------
### a!latestHealthCheck() Function Result Example
Source: https://docs.appian.com/suite/help/26.3/fnc_system_a_latesthealthcheck.html
This is an example of the output returned by the a!latestHealthCheck() function, showing the start date/time, run status, and document IDs for the zip file and report.
```Text
[startDateTime=04/25/2020 16:18:38 GMT+00:00,
runStatus=COMPLETED,
zip=[Document:1408],
report=[Document:1409]]
```
--------------------------------
### Example Customization: Adding a Training Link
Source: https://docs.appian.com/suite/help/26.3/am-25.3.2.4/sol-custom-suite-user-guide.html
This example demonstrates how to add a 'Training' link to a solution's landing page. The code is commented to provide step-by-step instructions for customization.
```html
Training
```
--------------------------------
### Get Runtime Type of User Value
Source: https://docs.appian.com/suite/help/26.3/fnc_informational_runtimetypeof.html
Returns the string name of the system data type for a value. This example demonstrates how to get the type of a user value.
```Appian SAIL
typename(runtimetypeof(topeople(123)))
```
--------------------------------
### Format currency with indicator alignment at START
Source: https://docs.appian.com/suite/help/26.3/fnc_text_currency.html
Align the currency indicator at the 'START' of the value by setting the _indicatorAlignment_ parameter. This example uses the default locale for separators and format.
```Appian SAIL
a!currency(
isoCode: "USD",
value: 1234.56,
indicatorAlignment: "START"
)
```
--------------------------------
### Example Customization: Adding a Training Link
Source: https://docs.appian.com/suite/help/26.3/cu-26.2.1.8/sol-custom-suite-user-guide.html
This example demonstrates how to add a new 'Training' link to a solution's landing page. It shows the commented-out code block where the customization is implemented, including the URL redirection.
```Appian Process Modeler
// Example: Add a 'Training' link to the landing page.
// This customization adds a new link to the existing landing page.
// When the user clicks the link, they are redirected to the specified URL.
//
// To implement this customization:
// 1. Navigate to the landing page in your solution.
// 2. Add a new link component.
// 3. Configure the link text to 'Training'.
// 4. Set the link URL to the desired destination (e.g., 'https://www.example.com/training').
// 5. Save the changes.
//
// Example code (commented out in the template):
// a!linkField {
// label: "Training Link",
// links: {
// a!dynamicLink {
// label: "Training",
// saveInto: {
// a!save(value, "https://www.example.com/training")
// }
// }
// }
// }
```
--------------------------------
### Create and Initialize Excel with New File
Source: https://docs.appian.com/suite/help/26.3/rpa-9.22/java-module-data-provider.html
Example demonstrating how to create a new Excel file with a unique name in the robot's working directory and then initialize the Excel instance.
```Java
// Get the robotic task's working directory
String robotDir = server.getCurrentDir();
// Create a unique name for the Excel file
String name = String.valueOf(new Date().getTime()) + ".xlsx";
// Final path of the file
File file = Paths.get(robotDir, name).toFile();
excelPath = file.getAbsolutePath();// Inicializar la instancia de IEx-cel
try(IExcel excel = IExcel.getExcelInstance(this)) {
// Create the file and initialize Excel
excel.create(excelPath, EExcelType.XLSX);
// Perform tasks with Excel here
} catch(Exception e) {
// Manage exceptions here
}
```
--------------------------------
### ProcessStartConfig Methods
Source: https://docs.appian.com/suite/help/26.3/api/com/appiancorp/suiteapi/process/ProcessStartConfig.html
Methods for retrieving and setting configurations for starting a process.
```APIDOC
## ProcessStartConfig Methods
### Description
Methods to get and set various configurations that control the behavior when starting a process.
### Methods
#### Getters
- `int getDepth()`
Gets the depth of the current process.
- `Long getPriorityId()`
Gets the priority ID to use when starting the process.
- `String getProcessModelVersion()`
Gets the process model version to use when starting the process.
- `ProcessVariable[] getProcessParameters()`
Gets the process parameters that will be used when starting the process.
#### Setters
- `void setDepth(int depth)`
Sets the current process depth.
- `void setPriorityId(Long priorityId)`
Sets the priority ID to use when starting the process.
- `void setProcessModelVersion(String processModelVersion)`
Sets the process model version to use when starting the process.
- `void setProcessParameters(ProcessVariable[] processParameters)`
Sets the process parameters to be used when starting the process.
```
--------------------------------
### Get Parents To Root
Source: https://docs.appian.com/suite/help/26.3/api/com/appiancorp/suiteapi/content/ContentService.html
Retrieves all direct ancestors of a node, starting from its parent up to the root.
```APIDOC
## GET /api/content/parentsToRoot
### Description
This returns all of direct ancestors of a node, starting with the node's parent and tracing up to the root.
### Method
GET
### Endpoint
/api/content/parentsToRoot
### Parameters
#### Query Parameters
- **id** (Long) - Required - The ID of the content node.
- **typemask** (Integer) - Optional - The type mask for filtering ancestors.
### Response
#### Success Response (200)
- **Content[]** - An array of content items representing the ancestors from parent to root.
```
--------------------------------
### Get Parents From Root
Source: https://docs.appian.com/suite/help/26.3/api/com/appiancorp/suiteapi/content/ContentService.html
Retrieves all direct ancestors of a node, starting from the root down to its parent.
```APIDOC
## GET /api/content/parentsFromRoot
### Description
This returns all of direct ancestors of a node, starting with the root and tracing down to the node's parent.
### Method
GET
### Endpoint
/api/content/parentsFromRoot
### Parameters
#### Query Parameters
- **id** (Long) - Required - The ID of the content node.
- **typemask** (Integer) - Optional - The type mask for filtering ancestors.
### Response
#### Success Response (200)
- **Content[]** - An array of content items representing the ancestors from root to parent.
```
--------------------------------
### Get Process Parameters
Source: https://docs.appian.com/suite/help/26.3/api/com/appiancorp/suiteapi/process/ProcessModelFacade.html
Retrieves the process parameters used to start a process model.
```APIDOC
## getProcessParameters
### Description
Retrieve the process parameters used to start of the process model of the given ID.
### Method
`public static ProcessVariable[] getProcessParameters(Long pmId, ServiceContext sc)`
### Parameters
#### Path Parameters
- **pmId** (Long) - process model id to retrieve variables for.
- **sc** (ServiceContext) - the service context of the user making this call.
### Returns
- ProcessVariable[] - All process parameters entered when starting the process model with the given ID.
### Throws
- `ServiceException` - if anything goes wrong.
```
```APIDOC
## getProcessParameters (Deprecated)
### Description
Retrieve the process parameters used to start of the process model of the given ID.
### Method
`@Deprecated public static ProcessVariable[] getProcessParameters(Long pmId_, com.appiancorp.asl3.servicefw.connect.ServiceContext sc_)`
### Parameters
#### Path Parameters
- **pmId_** (Long) - process model id to retrieve variables for.
- **sc_** (com.appiancorp.asl3.servicefw.connect.ServiceContext) - the service context of the user making this call.
### Returns
- ProcessVariable[] - All process parameters entered when starting the process model with the given ID.
### Throws
- `ServiceException` - if anything goes wrong.
```
--------------------------------
### Get Form Configuration
Source: https://docs.appian.com/suite/help/26.3/api/com/appiancorp/suiteapi/process/ProcessDetails.html
Retrieves the configuration of the form shown to the user starting the process.
```APIDOC
## GET /process/details/formConfig
### Description
Gets the configuration of the form that is shown to the user who starts the process.
### Method
GET
### Endpoint
`/process/details/formConfig`
### Parameters
None
### Response
#### Success Response (200)
- **formConfig** (FormConfig) - The form configuration.
#### Response Example
```json
{
"formConfig": { ... }
}
```
```
--------------------------------
### Initialize and Verify Robot Task Readiness with startUp()
Source: https://docs.appian.com/suite/help/26.3/rpa-9.22/java-module-client.html
Use the `startUp()` method to initialize robotic task components and verify if the robot is allowed to run. This method is called at the beginning of execution.
```java
@Override
public boolean startUp() throws Exception {
// Initialization of the robotic task components
server = JidokaFactory.getServer();
windows = IJidokaRobot.getInstance(this);
String robotName = server.getExecution(0).getRobotName();
boolean robotAllowedNow = server.getExecution(0).isRobotAllowedNow(robotName);
server.info(String.format("Is this robotic task allowed now?: %s", robotAllowedNow));
return robotAllowedNow;
}
```
--------------------------------
### Teleport Configuration File Example
Source: https://docs.appian.com/suite/help/26.3/cloud-secure-link-setup.html
This is an example of the `teleport.yaml` configuration file. Ensure the `auth_token` and `proxy_server` are correctly set. The `app_service.apps` section should be pre-configured by Appian.
```yaml
version: v3
teleport:
log:
output: /var/lib/teleport/teleport.log
severity: INFO
format:
output: text
auth_token: "/tmp/token"
proxy_server: csl-00000000-0000-0000-0000-000000000000.appiancloud.com:443
auth_service:
enabled: false
ssh_service:
enabled: false
proxy_service:
enabled: false
app_service:
enabled: true
apps:
- name: "my-csl-resource"
uri: tcp://csl-resource.company.com:1234
labels:
resource: my-csl-resource
site_id_12345: allow
```
--------------------------------
### Set Up Filter with URL Parameters
Source: https://docs.appian.com/suite/help/26.3/url-parameters.html
This example demonstrates setting up a grid filter that uses a rule input to dynamically set filter values. It's useful for creating shareable links with pre-selected filters and for remembering user selections.
```Appian Process Modeler
a!localVariables(
local!subcategory: a!queryRecordType(
recordType: recordType!Product Subcategory,
fields: recordType!Product Subcategory.fields.name,
pagingInfo: a!pagingInfo(startIndex: 1, batchSize: 30)
).data,
/* Create a rule input in your interface of type Number (Integer) */
/* Using the rule input as the value of the local variable allows you */
/* to pass a value into the interface */
local!selectedCategory: ri!category,
{
/* Use a dropdown instead of a user filter to filter the grid */
a!dropdownField(
choiceLabels: local!subcategory[recordType!Product Subcategory.fields.name],
choiceValues: local!subcategory[recordType!Product Subcategory.fields.productSubcategoryId],
label: "SUBCATEGORY",
placeholder: "Select a county",
value: local!selectedCategory,
saveInto: local!selectedCategory
),
a!gridField(
labelPosition: "COLLAPSED",
data: a!recordData(
recordType: recordType!Product,
filters: a!queryLogicalExpression(
operator: "AND",
filters: {
/*The query filter is used with the dropdown field to update
the data in the grid based on the value of local!selectedCategory*/
a!queryFilter(
field: recordType!Product.relationships.productSubcategory.fields.productSubcategoryId,
operator: "=",
value: local!selectedCategory
)
},
ignoreFiltersWithEmptyValues: true
)
),
columns: {
a!gridColumn(
label: "Product Name",
sortField: recordType!Product.fields.name,
value: fv!row[recordType!Product.fields.name]
),
a!gridColumn(
label: "Product Subcategory",
sortField: recordType!Product.relationships.productSubcategory.fields.name,
value: fv!row[recordType!Product.relationships.productSubcategory.fields.name],
align: "START"
)
}
)
}
)
```
--------------------------------
### cURL GET Deployment Request Example
Source: https://docs.appian.com/suite/help/26.3/Get_Deployment_Results_API.html
Use this cURL command to make a GET request to the Appian API for deployment details. Ensure you replace `` with your valid authentication token.
```bash
curl --location --request \
GET 'https://mysite.appiancloud.com/suite/deployment-management/v1/deployments/d243b14c-3ba5-41c3-9f51-76da51beb8f5/' \
--header 'Authorization: Bearer '
```
--------------------------------
### Appian Site Information Example
Source: https://docs.appian.com/suite/help/26.3/Starting_and_Stopping_Appian.html
Example output showing the name, URL, status, and age of an Appian site.
```bash
NAME URL STATUS AGE
appian http://myappiansite.com Ready 25m
```
--------------------------------
### GET /inspections/ Request Example
Source: https://docs.appian.com/suite/help/26.3/Get_Inspection_Results_API.html
This shows the basic structure of a GET request to retrieve inspection results using the deployment API. Replace with the actual inspection UUID.
```http
GET /inspections/
```
--------------------------------
### Start Process Link with Parameters
Source: https://docs.appian.com/suite/help/26.3/Start_Process_Link_Component.html
Use this to create a link that starts a process model and passes specific parameters. Ensure the process model and parameters are correctly configured.
```Appian SAIL
a!linkField(
links: {
a!startProcessLink(
label: "Update Customer Details",
processModel: cons!UPDATE_CUSTOMER_DETAILS_PM,
processParameters: {
customerId: ri!customer.id
},
bannerMessage: "Updated details for " & ri!customer.name
)
}
)
```
--------------------------------
### Get Parents to Root
Source: https://docs.appian.com/suite/help/26.3/api/com/appiancorp/suiteapi/content/ContentService.html
Retrieves the direct ancestors of a node, starting from its parent and tracing up to the root.
```APIDOC
## GET /getParentsToRoot
### Description
This returns all of direct ancestors of a node, starting with the node's parent and tracing up to the root.
### Method
GET
### Endpoint
/getParentsToRoot
### Parameters
#### Query Parameters
- **id** (Long) - Required - content id
- **typemask** (Integer) - Required - specifies which content types to return
### Response
#### Success Response (200)
- **content[]** (Content[]) - A list of parent content objects in the path to the root. Only matching types are included. This goes from parent to parent, ending in the root.
#### Response Example
```json
[
{
"id": 101,
"name": "Parent Content",
"type": "FOLDER"
},
{
"id": 1,
"name": "Root Content",
"type": "ROOT"
}
]
```
### Throws
- `InvalidContentException` - if an invalid content item is referenced
- `InvalidTypeMaskException` - if an invalid typemask was passed in
- `PrivilegeException` - if the user does not have permission to take this action
```
--------------------------------
### Start Appian Services
Source: https://docs.appian.com/suite/help/26.3/Service_Manager_Scripts.html
Use this script to start Appian services. Specify the admin password and the services to start. 'all' starts all available services.
```bash
./start.sh -p -s all
```
--------------------------------
### String Length Example
Source: https://docs.appian.com/suite/help/26.3/Appian_Functions.html
Get the number of characters in a string using len().
```Appian Process Modeler
len("Boston")
```
--------------------------------
### Complete SAP Initialization and Interaction
Source: https://docs.appian.com/suite/help/26.3/rpa-9.22/java-module-sap.html
Opens the SAP GUI, connects to a specified SAP system, initializes the Appian RPA SAP module, and then maximizes the SAP window. Includes error handling for the opening process.
```java
/** The Appian RPA SAP module. */
private IGuiApplication sap;
/**
* SAP open action.
*
* @throws JidokaException the jidoka exception
*/
public void sapOpen() throws JidokaException {
Path sapPath = Paths.get(SapConstants.App.SAP_EXECUTABLE_PATH, SapConstants.App.SAP_EXECUTABLE);
// open SAP logon window
ProcessBuilder pb = new ProcessBuilder(sapPath.toString());
try {
pb.start();
// Wait for the initial window title (For example 'SAP Logon 750')
waitFor.window(30, true, true, SapConstants.Titles.SAP_LOGON_WINDOW_TITLE);
server.info("SAP application opened");
// Type the SAP connection name and press the key "Enter". In this example we use 'SAP Demo'
keyboard.type(SAP_CONNECTION).pause(1000).enter();
waitFor.window(SapConstants.Timeouts.MEDIUM_WAIT, true, SapConstants.Titles.SAP_LOGON_WINDOW_TITLE_FIRST);
server.info("Connected to: " + SAP_CONNECTION);
// Instantiate the SAP module if it wasn't done before
if (sap == null) {
sap = ISap.getInstance(this);
}
// Appian RPA SAP Module initialization
if (!sap.isInitialized()) {
sap.init();
}
GuiMainWindow win = (GuiMainWindow) sap.getCurrentSession().getActiveWindow();
win.iconify();
win.maximize();
windows.pause(2000);
server.info("Initializing Appian RPA SAP module");
} catch (IOException | JidokaUnsatisfiedConditionException e) {
throw new JidokaException("SAP could not be opened: " + e.getMessage(), e);
}
}
```
--------------------------------
### Get List Type for Integer - Appian SAIL
Source: https://docs.appian.com/suite/help/26.3/fnc_informational_a_listtype.html
Use a!listType with type!Integer to get the corresponding list type number. This example returns '101' for List of Number (Integer).
```Appian SAIL
a!listType(type!Integer)
```
--------------------------------
### Starting Multiple Processes
Source: https://docs.appian.com/suite/help/26.3/Start_Process_Smart_Service.html
Guidance on starting multiple processes using the Start Process smart service, with different approaches for autoscale-enabled and non-autoscale-enabled process models.
```APIDOC
## Starting Multiple Processes
### Description
Use the Start Process smart service to initiate multiple processes. The method depends on whether the process model has autoscale enabled.
### Non-Autoscaled Process Models
- Use the **Multiple Node Instances (MNI)** option on the Start Process smart service.
### Autoscaled Process Models
- Build a looping flow to start multiple asynchronous processes using the Start Process smart service.
```
--------------------------------
### Get Queue List Request Body Example
Source: https://docs.appian.com/suite/help/26.3/rpa-9.22/api-get-queue-list.html
This example demonstrates the JSON structure for the request body when calling the `/queue/list` method. It specifies a date range using UNIX epoch time in milliseconds.
```json
{
"dateRange": {
"start" : 1622505600000,
"end" : 1625097599000
}
}
```