LogoLogo
5.2
  • Docs
  • Connector Configuration
  • Knowledge Base
  • Changelog
5.2
  • Introduction
  • Migration from 5.1
  • Overview
    • Introduction
    • Component
    • Flow
    • End User Guide
  • Component Definition
    • Basic Structure
    • Manifest
      • name
      • label
      • icon
      • marker
      • author
      • description
      • auth
      • authConfig
      • quota
      • properties
      • inPorts
      • outPorts
      • firePatterns
      • tick
      • private
      • webhook
      • state
      • localization
    • Behaviour
    • Dependencies
    • Authentication
    • Quotas & Limits
    • Configuration
    • Example Component
  • Customizing UI
    • Custom Inspector Fields
    • Custom Theme
    • Custom Strings
    • Custom API
    • Custom Component Strings
    • Custom Component Shapes
    • Custom Auth Popups
  • Appmixer hosted
    • Getting started
    • Creating Custom Components
    • Using Appmixer SDK
    • Using Appmixer API
    • Using Oauth applications
  • Appmixer Self-Managed
    • Installation
    • Getting Started
    • Custom Component: HelloAppmixer
    • Using Appmixer SDK
    • Using Appmixer API
    • Using OAuth applications
    • Installation GCP
    • System Webhooks
    • Configuration
    • Appmixer Architecture
    • Appmixer Deployment Models
    • System Plugins
  • API
    • ACL
    • Accounts
    • Apps
    • Authentication
    • Charts
    • Config
    • Data Stores
    • Files
    • Flows
    • Insights
    • Modifiers
    • People Task
    • Public Files
    • Service Configuration
    • Unprocessed Messages
    • User
    • Variables
  • Appmixer SDK
    • Introduction
    • Installation
    • Quick Start
    • Constructor
    • API Module
    • UI & Widgets
      • Flow Manager
      • Designer
      • Insights Logs
      • Insights Chart Editor
      • Insights Dashboard
      • Accounts
      • Storage
      • People Tasks
      • Connectors
      • Integrations
      • Wizard
    • Developer mode
  • Appmixer Backoffice
    • Getting Started
    • Services
    • Quotas
    • Public Files
    • System Configuration
    • Modules
  • Tutorials
    • Managing Authentication
    • Sharing Flows
    • Flows Metadata & Filtering
    • People Tasks
    • Customizing modifiers
    • Setting ACL
    • Integration Templates
    • Installing and updating modules
    • Custom Webhook Trigger
    • Appmixer Virtual Users
    • Working with outport schemas
  • Appmixer CLI
    • Appmixer CLI
    • Appmixer OpenAPI Generator
      • Getting started
      • Open API Extensions
      • Examples
  • App Registration
    • Airtable
    • Azure Cognitive Services
    • Blackboard
    • DeepAI
    • DocuSign
    • Google
    • Highrise
    • Hubspot
    • Microsoft
    • Microsoft Dynamics 365 CRM
    • Quickbooks
    • Redmine
    • Salesforce
    • Schoology
    • Screenshot API
    • ServiceNow
    • Slack
    • Trello
    • Typeform
    • Utilities
      • Email
      • Language
      • Tasks
      • Test
      • Weather
    • Xero
    • Zendesk Tickets
    • Zoho
  • Connectors
    • Connector Request
Powered by GitBook
On this page
  • Setting Custom Metadata
  • Setting Custom Metadata using the REST API
  • Setting Custom Metadata using the Appmixer SDK
  • Search Flows Based on Custom Metadata
  • Filter Flows using the REST API
  • Filter Flows using the Appmixer SDK
  • Appmixer UI SDK FlowManager with Custom Metadata
  • Filter Flows with FlowManager

Was this helpful?

Export as PDF
  1. Tutorials

Flows Metadata & Filtering

Appmixer flows can contain custom metadata specific to your application. This is especially useful for filtering flows and displaying different Flow Managers for different kinds of flows.

Setting Custom Metadata

Each flow can have assigned a custom metadata object. This metadata object is called customFields throughout the documentation and can be any JSON object. In the examples below, we show how to define custom metadata on a flow using each of the available Appmixer interfaces (REST API, Appmixer SDK).

Setting Custom Metadata using the REST API

Use the customFields object when creating new flows:

$ curl -XPOST "https://api.appmixer.com/flows" -H "Content-Type: application/json" -d '{ "flow": FLOW_DESCRIPTOR, "name": "My Flow #1", "customFields": { "category": "healthcare" } }'

... or when updating existing flows:

$ curl -XPUT "https://api.appmixer.com/flows/9089f275-f5a5-4796-ba23-365412c5666e" -H "Content-Type: application/json" -d '{ "customFields": { "category": "healthcare" } }'

Setting Custom Metadata using the Appmixer SDK

Create new flows with customFields:

appmixer.api.createFlow('myFlow', FLOW_DESCRIPTOR, {
    "customFields": { "category": "healthcare" }
});

... or update existing flows with:

appmixer.api.updateFlow('9089f275-f5a5-4796-ba23-365412c5666e', {
    "customFields": { "category": "healthcare" }
});

Search Flows Based on Custom Metadata

Now when you have flows with your own custom metadata defined, you can use the filters to search for flows based on values of your metadata.

Filter Flows using the REST API

$ curl "https://api.appmixer.com/flows?filter=customFields.category:healthcare" -H "Authorization: Bearer [ACCESS_TOKEN]"

Moreover, you can use the following operators in your filter queries: ['!', '^', '$', '~', '>', '<', '$in']. For example, to filter flows that do not fall into our "healthcare" category, we can use:

$ curl "https://api.appmixer.com/flows?filter=customFields.category:!healthcare" -H "Authorization: Bearer [ACCESS_TOKEN]"

Filter Flows using the Appmixer SDK

appmixer.api.getFlows({
    limit: 20,
    offset: 0,
    projection: "-thumbnail",
    sort: "mtime:-1",
    filter: "customFields.category:healthcare"
})

Appmixer UI SDK FlowManager with Custom Metadata

The main power of custom metadata is that you can display multiple FlowManager UI instances on your pages for different categories of flows. A typical example is to have a custom field "template" and split all flows in Appmixer to "template" flows and actual flow instances. You can achieve that by having two list of flows in your UI displayed with the FlowManager UI widget, one for flow templates and one for actual flow runs. The flow templates would only display flows with "template:true" filter and the other list flows with "template:!true" filter. Now based on where the user actually created the new flow, you would assign either template:true or template:false custom field to the flow object.

Filter Flows with FlowManager

Use the customFilter option when creating an instance of your flow manager. The FlowManager widget will then use this filter whenever requesting list of flows to display from the API:

const flowManagerTemplates = new appmixer.ui.FlowManager({
    el: '#your-flow-manager-templates-div',
    options: {
        customFilter: {
            'customFields.template': 'true'
        }
    }
});
flowManagerTemplates.open();

You can have another instance of FlowManager with non-template flows:

const flowManagerFlows = new appmixer.ui.FlowManager({
    el: '#your-flow-manager-flows-div',
    options: {
        customFilter: {
            'customFields.template': '!true'
        }
    }
});
flowManagerFlows.open();
PreviousSharing FlowsNextPeople Tasks

Last updated 1 year ago

Was this helpful?