Skip to content

Instantly share code, notes, and snippets.

@keirbowden
Created October 29, 2019 10:44
Show Gist options
  • Save keirbowden/d0aacd840d9015a13d3ec45c5432223a to your computer and use it in GitHub Desktop.
Save keirbowden/d0aacd840d9015a13d3ec45c5432223a to your computer and use it in GitHub Desktop.
Aura component controller to handle flow navigation.
({
handleCaptured : function(component, event, helper)
{
console.log('Captured signature')
let flowAction=null;
let availableActions=component.get('v.availableActions');
console.log('Available actions = ' + availableActions);
for (let idx=0; idx<availableActions.length && null==flowAction; idx++) {
let availAction=availableActions[idx];
if ('NEXT'==availAction) {
flowAction=availAction;
}
else if ('FINISH'==availAction) {
flowAction=availAction
}
}
console.log('Flow action = ' + flowAction);
if (null!=flowAction) {
let navigate=component.get("v.navigateFlow");
navigate(flowAction);
}
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment