Skip to content

Commit

Permalink
feat: add flow
Browse files Browse the repository at this point in the history
  • Loading branch information
Szandor72 committed Jan 16, 2024
1 parent 4c5ebd6 commit 42fb2c3
Showing 1 changed file with 194 additions and 0 deletions.
194 changes: 194 additions & 0 deletions force-app/main/default/flows/UpdateVIPStatus.flow-meta.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,194 @@
<?xml version="1.0" encoding="UTF-8" ?>
<Flow xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>57.0</apiVersion>
<assignments>
<name>Account_is_VIP</name>

Check failure on line 5 in force-app/main/default/flows/UpdateVIPStatus.flow-meta.xml

View workflow job for this annotation

GitHub Actions / Validate Metadata / PMD for Flows

RequireAssignmentSuffix

_ASSIGN Suffix missing for Assign Element
<label>Account is VIP</label>
<locationX>50</locationX>
<locationY>815</locationY>
<assignmentItems>
<assignToReference>GetAccount.IsVIP__c</assignToReference>
<operator>Assign</operator>
<value>
<booleanValue>true</booleanValue>
</value>
</assignmentItems>
<connector>
<targetReference>UpdateAccountCheckbox</targetReference>
</connector>
</assignments>
<assignments>
<name>ContactCountAssignment</name>

Check failure on line 21 in force-app/main/default/flows/UpdateVIPStatus.flow-meta.xml

View workflow job for this annotation

GitHub Actions / Validate Metadata / PMD for Flows

RequireAssignmentSuffix

_ASSIGN Suffix missing for Assign Element
<label>ContactCountAssignment</label>
<locationX>314</locationX>
<locationY>575</locationY>
<assignmentItems>
<assignToReference>NumberOfVIPContacts</assignToReference>
<operator>AssignCount</operator>
<value>
<elementReference>GetContacts</elementReference>
</value>
</assignmentItems>
<connector>
<targetReference
>Account_needs_update_if_VIP_Contacts</targetReference>
</connector>
</assignments>
<assignments>
<name>IsNoVIP</name>

Check failure on line 38 in force-app/main/default/flows/UpdateVIPStatus.flow-meta.xml

View workflow job for this annotation

GitHub Actions / Validate Metadata / PMD for Flows

RequireAssignmentSuffix

_ASSIGN Suffix missing for Assign Element
<label>Is No VIP</label>
<locationX>314</locationX>
<locationY>815</locationY>
<assignmentItems>
<assignToReference>GetAccount.IsVIP__c</assignToReference>
<operator>Assign</operator>
<value>
<booleanValue>false</booleanValue>
</value>
</assignmentItems>
<connector>
<targetReference>UpdateAccountCheckbox</targetReference>
</connector>
</assignments>
<decisions>
<name>Account_needs_update_if_VIP_Contacts</name>

Check failure on line 54 in force-app/main/default/flows/UpdateVIPStatus.flow-meta.xml

View workflow job for this annotation

GitHub Actions / Validate Metadata / PMD for Flows

RequireDecisionSuffix

_DECISION Suffix missing for Decision Element
<label>Account needs update if VIP Contacts</label>
<locationX>314</locationX>
<locationY>695</locationY>
<defaultConnectorLabel>Default Outcome</defaultConnectorLabel>
<rules>
<name>AccountHasVIPContacts</name>
<conditionLogic>and</conditionLogic>
<conditions>
<leftValueReference>NumberOfVIPContacts</leftValueReference>
<operator>GreaterThan</operator>
<rightValue>
<numberValue>0.0</numberValue>
</rightValue>
</conditions>
<connector>
<targetReference>Account_is_VIP</targetReference>
</connector>
<label>AccountHasVIPContacts</label>
</rules>
<rules>
<name>AccountHasNoVIPContacts</name>
<conditionLogic>and</conditionLogic>
<conditions>
<leftValueReference>NumberOfVIPContacts</leftValueReference>
<operator>EqualTo</operator>
<rightValue>
<numberValue>0.0</numberValue>
</rightValue>
</conditions>
<connector>
<targetReference>IsNoVIP</targetReference>
</connector>
<label>AccountHasNoVIPContacts</label>
</rules>
</decisions>
<environments>Default</environments>
<interviewLabel>UpdateVIPStatus {!$Flow.CurrentDateTime}</interviewLabel>
<label>UpdateVIPStatus</label>
<processMetadataValues>
<name>BuilderType</name>
<value>
<stringValue>LightningFlowBuilder</stringValue>
</value>
</processMetadataValues>
<processMetadataValues>
<name>CanvasMode</name>
<value>
<stringValue>AUTO_LAYOUT_CANVAS</stringValue>
</value>
</processMetadataValues>
<processMetadataValues>
<name>OriginBuilderType</name>
<value>
<stringValue>LightningFlowBuilder</stringValue>
</value>
</processMetadataValues>
<processType>AutoLaunchedFlow</processType>

Check failure on line 111 in force-app/main/default/flows/UpdateVIPStatus.flow-meta.xml

View workflow job for this annotation

GitHub Actions / Validate Metadata / PMD for Flows

PrefixSubflowApiName

A Subflows API Name should start with Util
<recordLookups>
<name>GetAccount</name>

Check failure on line 113 in force-app/main/default/flows/UpdateVIPStatus.flow-meta.xml

View workflow job for this annotation

GitHub Actions / Validate Metadata / PMD for Flows

RequireGetRecordSuffix

_RECORD Suffix missing for Get Record Action
<label>GetAccount</label>
<locationX>314</locationX>
<locationY>455</locationY>
<assignNullValuesIfNoRecordsFound
>false</assignNullValuesIfNoRecordsFound>
<connector>
<targetReference>ContactCountAssignment</targetReference>
</connector>
<filterLogic>and</filterLogic>
<filters>
<field>Id</field>
<operator>EqualTo</operator>
<value>
<elementReference>$Record.AccountId</elementReference>
</value>
</filters>
<getFirstRecordOnly>true</getFirstRecordOnly>
<object>Account</object>
<storeOutputAutomatically>true</storeOutputAutomatically>
</recordLookups>
<recordLookups>
<name>GetContacts</name>

Check failure on line 135 in force-app/main/default/flows/UpdateVIPStatus.flow-meta.xml

View workflow job for this annotation

GitHub Actions / Validate Metadata / PMD for Flows

RequireGetRecordSuffix

_RECORD Suffix missing for Get Record Action
<label>GetContacts</label>
<locationX>314</locationX>
<locationY>335</locationY>
<assignNullValuesIfNoRecordsFound
>false</assignNullValuesIfNoRecordsFound>
<connector>
<targetReference>GetAccount</targetReference>
</connector>
<filterLogic>and</filterLogic>
<filters>
<field>IsVIP__c</field>
<operator>EqualTo</operator>
<value>
<booleanValue>true</booleanValue>
</value>
</filters>
<filters>
<field>AccountId</field>
<operator>EqualTo</operator>
<value>
<elementReference>$Record.Account.Id</elementReference>
</value>
</filters>
<getFirstRecordOnly>false</getFirstRecordOnly>
<object>Contact</object>
<storeOutputAutomatically>true</storeOutputAutomatically>
</recordLookups>
<recordUpdates>
<name>UpdateAccountCheckbox</name>

Check failure on line 164 in force-app/main/default/flows/UpdateVIPStatus.flow-meta.xml

View workflow job for this annotation

GitHub Actions / Validate Metadata / PMD for Flows

RequireUpdateRecordSuffix

_UPDATE Suffix missing for Get Record Action
<label>UpdateAccountCheckbox</label>
<locationX>314</locationX>
<locationY>1031</locationY>
<inputReference>GetAccount</inputReference>
</recordUpdates>
<start>
<locationX>188</locationX>
<locationY>0</locationY>
<connector>
<targetReference>GetContacts</targetReference>
</connector>
<filterFormula>ISNEW() || ISCHANGED({!$Record.IsVIP__c})</filterFormula>
<object>Contact</object>
<recordTriggerType>CreateAndUpdate</recordTriggerType>
<triggerType>RecordAfterSave</triggerType>
</start>
<status>Active</status>
<variables>
<description>NumberOfVIPContacts</description>
<name>NumberOfVIPContacts</name>

Check failure on line 184 in force-app/main/default/flows/UpdateVIPStatus.flow-meta.xml

View workflow job for this annotation

GitHub Actions / Validate Metadata / PMD for Flows

RequireFlowVariableSuffix

_VAR Suffix missing for Flow Variable
<dataType>Number</dataType>
<isCollection>false</isCollection>
<isInput>false</isInput>
<isOutput>false</isOutput>
<scale>0</scale>
<value>
<numberValue>0.0</numberValue>
</value>
</variables>
</Flow>

0 comments on commit 42fb2c3

Please sign in to comment.