Closed BrettMN closed 9 months ago
Thanks @BrettMN . I cannot see the flow XML, maybe I'm missing something. Could you please paste it here?
Hello @toddhalfpenny - I have seen a similar error in Auto-launched Flows with Scheduled Paths (many thanks for this work):
<?xml version="1.0" encoding="UTF-8"?>
<Flow xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>58.0</apiVersion>
<environments>Default</environments>
<interviewLabel>Sample Flow Scheduled Path {!$Flow.CurrentDateTime}</interviewLabel>
<label>Sample Flow Scheduled Path</label>
<processMetadataValues>
<name>BuilderType</name>
<value>
<stringValue>LightningFlowBuilder</stringValue>
</value>
</processMetadataValues>
<processMetadataValues>
<name>CanvasMode</name>
<value>
<stringValue>FREE_FORM_CANVAS</stringValue>
</value>
</processMetadataValues>
<processMetadataValues>
<name>OriginBuilderType</name>
<value>
<stringValue>LightningFlowBuilder</stringValue>
</value>
</processMetadataValues>
<processType>AutoLaunchedFlow</processType>
<recordLookups>
<name>Get_Account</name>
<label>Get Account</label>
<locationX>964</locationX>
<locationY>324</locationY>
<assignNullValuesIfNoRecordsFound>false</assignNullValuesIfNoRecordsFound>
<filterLogic>and</filterLogic>
<filters>
<field>Name</field>
<operator>EqualTo</operator>
<value>
<stringValue>Acme</stringValue>
</value>
</filters>
<getFirstRecordOnly>true</getFirstRecordOnly>
<object>Account</object>
<storeOutputAutomatically>true</storeOutputAutomatically>
</recordLookups>
<start>
<locationX>970</locationX>
<locationY>48</locationY>
<object>Case</object>
<scheduledPaths>
<connector>
<targetReference>Get_Account</targetReference>
</connector>
<pathType>AsyncAfterCommit</pathType>
</scheduledPaths>
</start>
<status>Active</status>
</Flow>
So, leaving as regular flow without scheduled path then it works:
<?xml version="1.0" encoding="UTF-8"?>
<Flow xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>58.0</apiVersion>
<environments>Default</environments>
<interviewLabel>Sample Flow Scheduled Path {!$Flow.CurrentDateTime}</interviewLabel>
<label>Sample Flow Scheduled Path</label>
<processMetadataValues>
<name>BuilderType</name>
<value>
<stringValue>LightningFlowBuilder</stringValue>
</value>
</processMetadataValues>
<processMetadataValues>
<name>CanvasMode</name>
<value>
<stringValue>FREE_FORM_CANVAS</stringValue>
</value>
</processMetadataValues>
<processMetadataValues>
<name>OriginBuilderType</name>
<value>
<stringValue>LightningFlowBuilder</stringValue>
</value>
</processMetadataValues>
<processType>AutoLaunchedFlow</processType>
<recordLookups>
<name>Get_Account</name>
<label>Get Account</label>
<locationX>964</locationX>
<locationY>324</locationY>
<assignNullValuesIfNoRecordsFound>false</assignNullValuesIfNoRecordsFound>
<filterLogic>and</filterLogic>
<filters>
<field>Name</field>
<operator>EqualTo</operator>
<value>
<stringValue>Acme</stringValue>
</value>
</filters>
<getFirstRecordOnly>true</getFirstRecordOnly>
<object>Account</object>
<storeOutputAutomatically>true</storeOutputAutomatically>
</recordLookups>
<start>
<locationX>970</locationX>
<locationY>48</locationY>
<object>Case</object>
<recordTriggerType>Update</recordTriggerType>
<connector>
<targetReference>Get_Account</targetReference>
</connector>
<triggerType>RecordAfterSave</triggerType>
</start>
<status>Active</status>
</Flow>
The difference is that the 'regular' connector on this case is empty but there is one under scheduledPaths
:
<start>
<locationX>970</locationX>
<locationY>48</locationY>
<object>Case</object>
<scheduledPaths>
<connector>
<targetReference>Get_Account</targetReference>
</connector>
<pathType>AsyncAfterCommit</pathType>
</scheduledPaths>
</start>
Thanks @jefersonchaves - so it seems I may be mis-handling this scenario. Cheers so much for the extra XML examples.
Fixed as part of v.0.2.2
I have a simple flow that looks like this:
It gives the following error in the Extension Host after selecting the file in the Explorer and running Flow Visualizer: Mermaid from the command palette.
I have attached the flow xml.