Skip to content

Commit

Permalink
updates to Build section in v2 docs - new pages and videos
Browse files Browse the repository at this point in the history
  • Loading branch information
aleksa-krolls committed Feb 12, 2024
1 parent 21819eb commit fd9ad17
Show file tree
Hide file tree
Showing 22 changed files with 777 additions and 1,083 deletions.
39 changes: 21 additions & 18 deletions docs/build/credentials.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,33 @@ title: Credentials
## Credentials

Credentials are used to authorize connections to destination systems. In the
future, our adaptors will use credentials to fetch meta-data from source and
future, our Adaptors will use credentials to fetch meta-data from source and
destination applications and make the job writing process easier.

Some systems (Salesforce, OpenMRS, DHIS2) require an instanceUrl, host, or
ApiUrl. Leave off the final "/" in these Urls: `https://login.salesforce.com` or
`http://demo.openmrs.org/openmrs` or `https://play.dhis2.org`.

Credentials can only be viewed, or edited by a single user — their "owner" (or
the person that created that credential). All the collaborators on a particular
project can choose those credentials for use when defining a job.
Project can choose those credentials for use when defining a job.

![Credentials Page](/img/settings_credentials.png)

There are two special types of credentials, in addition to the myriad standard
application-specific and authentication protocol-specific credentials.
### Create a new Credential

### Raw Credentials
You can create a new Credential while configuring a new Step in your Workflow,
or via the Settings > Credentials page.
[Read this](/documentation/next/manage-projects/manage-credentials) for more on
managing credentials.

Raw credentials are valid JSON documents which are passed into a job's runtime
state. Note that owners of these credentials will be able to view them, in their
entirety, in the clear.
### Understand the app-specific credentials

### Keychain Credentials
Check out the dedicated [Adaptor docs](/adaptors) page for your app to inspect
the `configuration schema` and see what credential details will be required to
authenticate with your app (e.g., `username`, `api_key`).

Keychain credentials allow for a single job to make use of multiple credentials.
They work by inspecting the data in the job's runtime state (i.e., `state.data`)
and checking for the value of a predetermined identifier. Based on that value,
present in the data for a given source message, for example, _another_
credential will be selected and applied for that particular job run.
If your app is not listed in the Adaptors section, then inspect your app's API
documentation to see what is required for "authentication". You can then create
a `Raw JSON` Credential in OpenFn to define whatever credential inputs are
require (e.g., `{"api_key": "ADD-your-let", "url": "add-url"}`).

Some systems (Salesforce, OpenMRS, DHIS2) require an instanceUrl, host, or
ApiUrl. Leave off the final "/" in these Urls: `https://login.salesforce.com` or
`http://demo.openmrs.org/openmrs` or `https://play.dhis2.org`.
42 changes: 42 additions & 0 deletions docs/build/paths.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
title: Paths & Path Conditions
sidebar_label: Paths
---

A Path is both a visual and functional indication defining the sequence of Steps
the Workflow follows when executed. Read on more on the different types of Paths
and configuration tips.

## Path Conditions

There are 4 types of Path Conditions that define whether the Workflow will
proceed to the next Step when executed:

1. Always (the next Step will always run after the execution of the prior Step
is completed)
2. On Success (the next Step will run only if the execution of the prior Step
_succeeded_)
3. On Failure (the next Step will run only if the execution of the prior Step
_failed_)
4. Matches a JavaScript Expression (the next Step will only run if the condition
or custom expression evaluates to be true)

![Path Conditions](/img/path_conditions.png)

## Writing JavaScript Expressions for Custom Path Conditions

Write your own JavaScript expression if you want to define a **custom
condition** that evaluates the initial state of the step.

The workflow will only continue to the next step if if the JavaScript expression
evaluates to be true.

![Custom Conditions](/img/path_js_expression.png)

## Disable Paths to deactivate

To "deactivate" part of your Workflow and the Steps that follow a specific Path
sequence:

1. Click on the `Path` you want to deactive
2. Select the `Disable this path` checkbox
Loading

0 comments on commit fd9ad17

Please sign in to comment.