LogoLogo
v4.4
  • Docs
  • Connector Configuration
  • Knowledge Base
  • Changelog
v4.4
  • Introduction
  • Migration from 4.3
  • 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
  • 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
  • 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
  • Appmixer CLI
    • Appmixer CLI
  • App Registration
    • Azure Cognitive Services
    • DeepAI
    • Google
    • Highrise
    • Hubspot
    • Microsoft
    • Salesforce
    • Schoology
    • Screenshot API
    • Slack
    • Trello
    • Typeform
    • Utilities
      • Email
      • Language
      • Tasks
      • Test
      • Weather
    • Zoho
  • Connectors
    • Connector Request
Powered by GitBook
On this page
  • Configuration
  • Instance
  • State
  • Events
  • Sharing
  • Example

Was this helpful?

Export as PDF
  1. Appmixer SDK
  2. UI & Widgets

Flow Manager

Browse and manipulate flows that are accessible to the current user.

PreviousUI & WidgetsNextDesigner

Last updated 2 years ago

Was this helpful?

Configuration

Set up a new instance with config parameters and set/get methods:

const flowManager = appmixer.ui.FlowManager(config)

flowManager.set(key, value)
flowManager.get(key)

config.el ...

config.options

Type: Object | Default: DefaultOptions

config.options.menu

Type: Object[] | Default: []

Add a dropdown menu input to each flows to trigger built-in and custom events:

appmixer.ui.FlowManager({
  /* ... */
  options: {
      menu: [
        { event: 'flow:open', label: 'Open', icon: 'data:image/svg+xml;base64,...' },
        { event: 'flow:rename', label: 'Rename', icon: 'https://www.example.com/images/image.jpg' },
        { event: 'flow:insights', label: 'Insights' },
        { event: 'flow:clone', label: 'Clone' },
        { event: 'flow:share', label: 'Share' },
        { event: 'flow:remove', label: 'Remove' },
        { event: 'my-custom-event', label: 'Custom Event' }
    ]
  }
}

The optional icon property is a URL of an image or a base64 string.

config.options.shareTypes

Type: Object | Default: DefaultShareTypes

Override default sharing dialog types.

config.options.sharePermissions

Type: Object[] | Default: DefaultSharePermissions

Override default sharing dialog permissions.

config.options.filters

Type: Object[] | Default: []

Create dropdown inputs with built-in query filters:

appmixer.ui.FlowManager({
  /* ... */
  options: {
    filters: [
      { property: 'stage', value: 'running', label: 'Running flows' },
      { property: 'stage', value: 'stopped', label: 'Stopped flows' },
      { property: 'sharedWith', value: 'myFlows', label: 'My flows' },
      { property: 'sharedWith', value: 'sharedWithOthers', label: 'Shared with others' },
      { property: 'sharedWith', value: 'sharedWithMe', label: 'Shared with me' }
    ]
  }
}

config.options.customFilter

Type: Object | Default: {}

Filter the flows with additional parameters:

appmixer.ui.FlowManager({
  /* ... */
  options: {
    customFilter: {
      stage: 'running'
    }
  }
}

This is especially useful in connection with customFields metadata to display multiple different Flow Managers each listing a different category of flows:

appmixer.ui.FlowManager({
  /* ... */
  options: {
    customFilter: {
      'customFields.category': 'healthcare',
      'customFields.template': true
    }
  }
}

config.options.sorting

Type: Object[] | Default: []

Create dropdown inputs with built-in sorting:

appmixer.ui.FlowManager({
  /* ... */
  options: {
    sorting: [
      { label: 'Last Modified', property: 'mtime', value: -1 },
      { label: 'Last Created', property: 'btime', value: -1 }
    ]
  }
}

Instance

State

flowManager.state(name, value)

loader

Type: Boolean | Default: null

Toggle a custom loading state.

error

Type: String | Default: null

Toggle a custom error message.

layout

Type: String | Default: grid

Change layout of the widget.

query

Type: Object | Default: DefaultQuery

Set custom query parameters.

Events

flowManager.on(event, handler)

flow:open

flowManager.on('flow:open', flowId => {/* ... */})

Select a flow to open in Designer widget.

flow:create

flowManager.on('flow:create', () => {/* ... */})

Click Create Flow button.

flow:start

flowManager.on('flow:start', flowId => {/* ... */})

Toggle flow stage button.

flow:stop

flowManager.on('flow:stop', flowId => {/* ... */})

Toggle flow stage button.

flow:clone

flowManager.on('flow:clone', flowId => {/* ... */})

Click menu item to clone a flow.

flow:share

flowManager.on('flow:share', flowId => {/* ... */})

Click menu item to open sharing of a flow.

flow:rename

flowManager.on('flow:rename', flowId => {/* ... */})

Click menu item to rename flow.

flow:remove

flowManager.on('flow:remove', flowId => {/* ... */})

Click menu item to remove a flow.

Sharing

Add menu item with flow:share event for a configurable flow sharing dialog:

appmixer.ui.FlowManager({
  /* ... */
  options: {
    menu: [{ event: 'flow:share', label: 'Share' }],
    // specify custom types and scopes
    shareTypes: [
      { value: 'email', label: 'Email', placeholder: 'Enter an email' },
      { value: 'scope', label: 'Scope', placeholder: 'Enter a scope' },
      { value: 'domain', label: 'Domain', placeholder: 'Enter a domain' }
    ],
    // override default permissions
    sharePermissions: [
      { label: 'Read', value: 'read' },
      { label: 'Start', value: 'start' },
      { label: 'Stop', value: 'stop' }
    ]
  }
}

Example

// create a new widget
const flowManager = appmixer.ui.FlowManager({
  el: '#flow-manager',
  options: {
    menu: [
      { event: 'flow:open', label: 'Open' },
      { event: 'custom-event', label: 'Custom' },
      { event: 'flow:rename', label: 'Rename' },
      { event: 'flow:insights', label: 'Insights' },
      { event: 'flow:clone', label: 'Clone' },
      { event: 'flow:share', label: 'Share' },
      { event: 'flow:remove', label: 'Remove' }
    ],
    filters: [
      { property: 'stage', value: 'running', label: 'Running flows' },
      { property: 'stage', value: 'stopped', label: 'Stopped flows' },
      { property: 'sharedWith', value: 'myFlows', label: 'My flows' },
      { property: 'sharedWith', value: 'sharedWithOthers', label: 'Shared with others' },
      { property: 'sharedWith', value: 'sharedWithMe', label: 'Shared with me' }
    ],
    sorting: [
      { label: 'Last Modified', property: 'mtime', value: -1 },
      { label: 'Last Created', property: 'btime', value: -1 }
    ]
  }
})

// change default layout
flowManager.state('layout', 'list')

// override a built-in event
flowManager.on('flow:create', () => {
  flowManager.state('error', 'Creating a new flow overridden by a custom event handler.')
})

// load flow details with a custom event
flowManager.on('custom-event', async flowId => {
  try {
    flowManager.state('loader', true)
    const flow = await appmixer.api.getFlow(flowId)
    alert(`Flow ${flow.name} has ${Object.keys(flow.flow).length} component(s).`)
  } catch (error) {
    flowManager.state('error', 'Loading flow failed.')
  } finally {
    flowManager.state('loader', false)
  }
})

// open the widget
flowManager.open()

Learn about widget config .

Learn about widget instance .

here
here
Flow Manager
Flow Manager Menu
Flow Manager Filters
Flow Manager Sorting
Flow Manager Sharing