Skyone
Skyone
English
English
  • Home
  • Data
    • Getting Started
      • Create an account
      • Recover Password
      • Quick Platform Guide
      • How to test the platform for free
      • Workspace
        • Creating a new Workspace
        • Find a Workspace
        • Sending an invitation to a Workspace
        • Editing a Workspace
      • Organizations
        • Creating an Organization
        • Organization Overview
        • Organization Management
        • Organization Monitoring
      • Settings and Preferences
        • Profile
        • Notifications
        • Usage and Billing
        • Users and Permissions
    • Modules
      • Module management
        • Creating a Module
        • Importing a Module
          • IAC Files - Integration as Code
        • Editing a module
        • Module Options
      • Settings and Operations
        • Module settings
          • Connectivity: Database
          • Connectivity: Email
          • Connectivity: REST
          • Connectivity: SOAP
          • Connectivity: File
          • Connectivity: RFC
          • Connected Account Management
        • Operations
          • Importing operations into REST Modules
          • Operation Management
        • Flows Using This Module
    • Monitoring
    • API Gateway
    • Terminals & Agent
      • Agent
        • Versions supported by Agent
        • How to Update the Agent Version
        • How to back up Agent files
      • Terminals
    • Data
      • Data Stack
        • Process Control
        • Data Stack Upload
        • File Actions
        • File Jobs
        • Data Job Parameters
        • Data Store
        • Data Share Features
        • ODBC
        • How to use the Data Engine Proxy
    • Integrations
      • Integration Management
        • Create integration
        • Import Integration
        • Edit Integration
        • Integration Options
        • Flows of this integration
      • Flows
        • Flow management
          • Creating a flow
          • Flow options
          • Flow Canva: configuring and editing the flow
            • Flow Canva: overview
            • Exception Handler
              • Exception Handler - Configuration
              • Exception Handler - Cases
            • Multicontext Flows
              • Example: Multicontext with an API Gateway
              • Example: Multicontext with a Time Trigger
            • Flow Settings
        • Triggers of a flow
          • API Gateway Triggers: Adding and Setting
          • AS2 Triggers: Adding and Setting
          • Queue Triggers: Adding and Setting
          • Flow Triggers: Adding and Setting
          • Time Triggers: Adding and Setting
          • Webhook Triggers: Adding and Setting
        • Tool Modules
          • AS2 Module
          • CSV Module
          • Data Transform Module
          • Data Balancer Module
          • EDI Module
          • Flow Call Module
          • IF Module
          • JavaScript Module
          • Log Module
          • Loop Do While Module
          • Loop For Module
          • Return Module
          • XML Module
          • Other Tool Modules
        • Module Header
        • Connecting components of a flow
        • Editing triggers and modules
        • Data Operations
          • Object Handling
            • Practical example: Handling variables
          • SMOP (Small Operations)
          • Parameterization rules
    • How to
      • Insert JSON into databases
      • Flattening: Data transformation using JSONata
      • How to use Form Data
      • Understanding recursion in JSONata
      • REST Module Output Consolidation
      • Isolated in execution: concept and application in variables
      • URL Parameters in API Gateway
      • Use case: API Gateway trigger parameters
      • Use case: Exception Handler in financial transactions
      • Use case: using Groups to manage access to flows
      • How to create a download endpoint and integrate with Power BI
      • Is it possible to use two triggers in a single flow?
      • How to set up WhatsApp in Skyone Studio
    • FAQ
    • GIGS: The complete guide
    • Glossary
  • Support
    • How do I request support?
    • Case Severity Levels
    • SLAs
    • Help & Resources
Powered by GitBook
On this page
  • Definitions
  • Set up a multicontext flow
  1. Data
  2. Integrations
  3. Flows
  4. Flow management
  5. Flow Canva: configuring and editing the flow

Multicontext Flows

PreviousException Handler - CasesNextExample: Multicontext with an API Gateway

Last updated 6 months ago

"Multicontext Flows" allow to use the same flows for several contexts. Each content has its own flow variable values and its own accounts. Through the multicontex flows you can activate the same flow for different partners, clients or users, and specify their own account. It’s a simple way to use the same integration for different entities under the control of a single account.


Definitions

It’s easier to explain the "Multicontext Flow" by exemplifying a scenario in which we need to execute the same flow for two different accounts. You can imagine that an integration runs periodically and updates the database of a certain customer. Now think that another client would like to use the same integration, but we need to save the information in the database of this other customer.

Using "Multicontext Flow" we can use the same flow to execute the function for both companies. Of course, we will need to indicate to the flow:

  • Context: In this case, we have a context for each cliente.

  • Context Key: It’s the variable that allows to identify the context. It can be a client identifier information. With this key we can identify all variables and accounts in the context.

  • Context Variable: We can create flow variables that are configured by context. In other words, the values of these flow variables are specified for each client individually.

  • Context Accounts: We can create access accounts (Database, REST API , etc) for each context. In this way, the flow will use the specific accounts of a client when running in that client’s context.

A "Multicontext Flow" has at least one "Context Finder". During the execution of the flow we call the "Context Finder" by passing a context identification key. The "Context Finder" has the goal of locating the context from the provided key. Once found, "Context Finder" returns all parameter and account values specific to that context. Subsequent modules can use the context-specific variables and accounts.

Set up a multicontext flow

Building a multicontext flow must follow exactly the same steps as a conventional flow. Once tested, the conventional flow can be converted into a multicontext flow.


Step by Step

Step 01: Build the conventional monocontext flow

Build your flow in the conventional way using the flow variables and accounts as if this flow were to serve only one context.

You can define a default context. As a suggestion, create the conventional flow with the variables and accounts that will be used by the default context.

Step 02: Introduce Context Finder into the flow

The Context Finder receives a key to find the context. The context contains the set of flow variables and connected accounts that should be used when executing the flow.

Typically the "Context Finder" is at the beginning of the flow execution, but it can be located at any position within the flow. It must however be located before the modules that use the context dependent flow variables and connected accounts.

The "Context Finder" module requires the operator to supply only the key that will be used to find the context. Specify the variable that will be used as the key in the Parameter field.

Step 03: Select the variables that should change according to the context

You must define which variables change according to the context.

To indicate that a flow variable is also a context variable, simply edit the variable in Contexts → Variables → Add variables.

Observe that all flow variables created in Context are moved to a new tab exclusively for this type of variable, if you view it in Settings .

Step 04: Select the accounts that should change according to the context

You need to specify the variables that change according to the context. All the accounts of the modules that are executed after the Context Finder can be specified.

Make sure you have inserted "Context Finder" in your flow, or you won’t be able to specify context dependent accounts.

Revisit the flow you created and open the configuration for modules that require connected accounts, such as Database or REST API modules that need context specific accounts.

Observe that these modules now allow you to specify an account associated with a context. Select the option to use context account.

Once you have made your selection, the Configure context connected account option will appear on the screen:

The platform uses the original account you created in STEP 01 and assigns it to the Default context.

Note that at this point you can create other context accounts, but we'll do that later in this process. You can click "Next" to proceed to the module's test page.

Take note that you can now select the context account to run the test on. Since we have not configured any context so far, only the Default account is available.

Step 05: Set up the accounts for each context

Access accounts are still set up the same way. You must set up one account for each context. These accounts will later be referenced when editing the context.

All types of accounts available in the platform can be accessed by the contexts.

Step 06: Create the contexts and their keys

There's a specific area for configuring contexts. Each context corresponds to a different entity that has its specific accounts and variables. For example, each context might correspond to a different client with its database access accounts and specific flow variables. In this step, you must create the contexts and define a key that allows you to identify each context, such as a customer identifier.

Select the "Context" option in the main flow editing screen.

In Context edit mode you can create, edit and remove contexts. The first time you log in, only the default context (Default) is available. You can click "Add context" to enter a new context.

When creating a new context you can define a name and a key for your context. The name is just a reference for the operator to locate the context. The key is the information that will be used to locate this context. It works as an indexer and must be unique for that flow.

When you save this context, you will see it in the list of available contexts.

Step 07: Configure the flow variables for each context and assign the accounts

In this step you set up the flow variables and accounts for each context.

Click on the editing pencil for the context you want to edit.

Notice that you will now be able to edit the connected variables and accounts of the selected context. All flow variables that were converted to Context Parameter for context variables in STEP 02 will automatically appear so that you can setup their values.

In the same way, Connected Accounts can also be defined in this step. Click "Connected Accounts".

You can define which account will be used for each of the components that require context-connected accounts. You will have to execute this function for each of the contexts you create.

Step 08: Multicontext flow execution logs

Execute the flow in the same way that you run a conventional flow. Just make sure the key information is correctly provided to "Context Finder".

The logs of the multicontext flows have additional information about the context and the values obtained in each execution.

It's also important to make sure that the context key information is already available so that it can be passed to "Context Finder". Usually this key comes from a or an API call from the API Gateway, but it can come from any module, including a flow variable.

[ Step 01 ] Build the conventional monocontext flow
[ Step 02 ] Introduce Context Finder into the flow
[ Step 03 ] Select the variables that should change according to the context
[ Step 04 ] Select the accounts that should change according to the context
[ Step 05 ] Set up the accounts for each context
[ Step 06 ] Create the contexts and their keys
[ Step 07 ] Configure the flow variables for each context and assign the accounts
[ Step 08 ] Multicontext flow execution logs
Webhook Trigger
Conventional Monocontext Flow
Context Finder Module
Context Finder Module - key
New variable configuration screen
Settings > Variables > Context tab
Option to use context in this component
Configure context connected account
Regular configuration of accounts
Context Creation - Name and Key Definition
Editing context
Editing context parameters and accounts
Context Editing - Connected Accounts