Skip to main content

Apps

Apps are custom scripts used to automate tasks and integrations in Farseer. You can view their info, edit settings, configure arguments, schedule them with cron, run them manually, and review detailed logs for each execution.

Updated over a week ago

What Are Apps?

Apps in Farseer

Apps in Farseer are custom scripts that extend the platform's functionality. They are commonly used to automate tasks, build integrations, process data, or execute custom logic that interacts with your Farseer model. Apps can be triggered manually or scheduled to run automatically, making them a flexible tool for advanced workflows.

Each App needs to access a script file within the Files section of the sidebar and can be fully customized to fit your business logic or integration needs.

Accessing and Running Apps

The Apps interface

To run an App:

  1. Open Apps from the left navigation sidebar.

  2. Select the App you want to execute.

  3. The App interface will appear, showing:

    • General information

    • Logs

    • Settings

To execute the App, click Run Job in the upper-right corner.

After triggering a run, monitor the Logs section to follow the job’s progress.

  • Finished: The App ran successfully.

  • Error: Expand the log using the + icon and review the detailed error message.

For unresolved issues, contact your workspace admin or customer support.

App General Overview

The General tab provides essential information about the App:

  • Description: A short explanation of what the App does.

  • Last run: Shows the most recent execution, including the user and timestamp.

  • Files: Displays the script file linked to the App.

Below this, the Logs section lists all past executions. Each log entry shows whether the App ran successfully, failed, or is still in progress. Expanding a log reveals full details of that run. Apps that are currently running can also be terminated.

App Settings

The Settings tab allows you to configure how the App behaves. Settings are divided into two sections: Basic settings and Other settings.

Basic Settings

Here you can customize:

  • App icon

  • App name

  • Description

Below these options, you can select the script file the App should use. All script files are stored in the Files section above the Apps module.

Files are fully editable, allowing you to adjust the App’s behavior at any time.

Other Settings

Arguments

Arguments define the inputs shown when running the App. They allow you to make the script interactive.

For example: A copy-version App may include an argument asking:
“Which version do you want to copy from?”

Arguments let you parameterize your script without modifying the code.

Scheduling

Apps can be scheduled to run automatically at specific times using a cron expression.

Common use cases include:

  • Nightly data processing

  • Refreshing integrations outside working hours

  • Automating recurring model tasks

The schedule input follows standard cron syntax. For help building cron expressions, visit crontab.guru.

Examples:

Schedule Description

Cron Expression

Every Saturday at 10:00

0 10 * * 6

Every Sunday at 10:00

0 10 * * 0

Weekends at 10:00

0 10 * * 0,6

Every month on the 8th at 05:00

0 5 8 * *

How to Run an App

To execute an App:

  1. Click Run Job

  2. Review the activity in the Logs section

If the App encounters an error:

  • Expand the log entry

  • Review the description for debugging details

  • If needed, contact your admin or Farseer support

Examples of Apps in Farseer

1. Copy Cells

Copies all cells from one dimension member (e.g., version Plan) to another (e.g., version Simulation).

Useful for:

  • Resetting a simulation version

  • Cloning data across dimensional members

import * as farseer from "farseer-client"

async function main() {
const farseerClient = new farseer.FarseerClient()

const fromVersion = await farseerClient.getDimensionMember("Versions", "Plan")
const toVersion = await farseerClient.getDimensionMember("Versions", "Simulation")

await farseerClient.cells.copyAllCells({
dimensionMappings: [{ from: fromVersion.id, to: toVersion.id }],
clearCells: true
});

console.log("Job done!")
}

main().catch(err => {
console.error("Error happened", err)
process.exit(1)
})

2. Restore to Initial State

Automatically restores a predefined backup.

Useful for:

  • Training and demo environments

  • Resetting the model after user testing

  • Quickly restoring a clean starting point

import * as farseer from "farseer-client"

async function main() {
const farseerClient = new farseer.FarseerClient();
await farseerClient.overseer.tenantRestore(
'education/2024-04-10-12-57-47-release-v6-5.tar'
);

console.log("Job done!")
}

main().catch(err => {
console.error("Error happened", err)
process.exit(1)
})
Did this answer your question?