Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
})).then(componentEntities => {
//
// if an entity is an FSM, then use it, rather the elaboration rather than the invokeable entity
//
for (let idx = 0; idx < componentEntities.length; idx++) {
const fsm = getFSM(componentEntities[idx])
if (fsm) {
components[idx] = fsm
}
}
//
// now use the composer to construct the FSM
//
const fsm = composer.sequence(...components)
//
// finally, construct an invokeable entity around the FSM
//
return create({ name, fsm, annotations, parameters, wsk, commandTree, execOptions, type: badges.sequence })
})
}))
function(args) {
let metrics_aggregator = composer_utils.MetricsAggregator();
return composer_utils.TimeOutPromise(
Promise.resolve(
composer.sequence(
composer_utils.addMetricAggregator(metrics_aggregator, authentication),
composer_utils.addMetricAggregator(metrics_aggregator, configuration),
composer_utils.addMetricAggregator(metrics_aggregator, start_session),
composer_utils.addMetricAggregator(metrics_aggregator, post_processing)
),
args.origin,
metrics_aggregator,
args.max_seconds * 1000
)
);
}
);