-
Notifications
You must be signed in to change notification settings - Fork 93
FlowWrapper
James Hou edited this page Jan 24, 2021
·
2 revisions
This component is designed to help launch flows dynamically, from any LWC click event.
This powers configurable flow actions (table and row) on soqlDatatable
by being dynamically created inside a dialog.
The component itself is very simple, as it's meant to be called via DialogService
which creates an instance of it:
// DialogService.executeDialogService()
...
if (payload.method.startsWith('flow')) {
flowModalConfig = {
auraId: 'flow-wizard-container',
headerLabel: payload.config.flowHeaderLabel,
component: 'c:FlowWrapper',
componentParams: {
flowApiName: payload.config.componentParams.flowApiName,
inputVariables: payload.config.componentParams.inputVariables
}
};
}
...
<aura:component>
<c:messageService aura:id="messageService" />
<aura:attribute name="flowApiName" type="String" access="PUBLIC" />
<aura:attribute name="inputVariables" type="Object[]" access="PUBLIC" />
<aura:handler name="init" value="{! this }" action="{! c.doInit }" />
<div class="slds-is-relative">
<lightning:flow aura:id="flow" onstatuschange="{! c.handleStatusChange }" />
</div>
</aura:component>
Attributes
name | type | access | required | default | description |
---|---|---|---|---|---|
flowApiName | String | public | yes | Developer Name of the flow to be dynamically created by lightning:flow
|
|
inputVariables | Object[] | public | yes | Array of inputs in flow's [{ name: 'flowVarName', type: 'String', value: 'my cool string value!' }]
|
Public Methods
None