FlowManager

appmixer.ui.FlowManager

The appmixer.ui.FlowManager is a UI widget that displays a list of flows the user created.

Flow Manager Events

Example

var flowManager = appmixer.ui.FlowManager({
    el: '#your-flow-manager-div',
    options: {
        menu: [
            { label: 'Edit', event: 'flow:open' },
            { label: 'Clone', event: 'flow:clone' },
            { label: 'Share', event: 'flow:share' },
            { label: 'Insights', event: 'flow:insights' },
            { label: 'Delete', event: 'flow:remove' }
        ]
    }
});
flowManager.on('flow:start', function(flowId) {
    flowManager.state('loader', true);
    appmixer.api.startFlow(flowId).then(function() {
        flowManager.state('loader', false);
        flowManager.reload();
    }).catch(function(error) {
        flowManager.state('error', 'Starting flow failed.');
    });
});
flowManager.on('flow:create', function() {
    flowManager.state('loader', true);
    appmixer.api.createFlow('New flow').then(function(flowId) {
        flowManager.state('loader', false);
        designer.set('flowId', flowId);
        designer.open();
    }).catch(function(error) {
        flowManager.state('error', 'Creating flow failed.');
    });
});
flowManager.open();

Last updated