Skip to content

Instantly share code, notes, and snippets.

@keirbowden
Created October 29, 2019 10:44
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
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