Skip to content

Commit

Permalink
Merge pull request #28 from SFDO-Community/feature-base-flows
Browse files Browse the repository at this point in the history
#118 Feature Two Screen Flow and One List View Button independent fro…
  • Loading branch information
kdveverka authored Dec 19, 2023
2 parents cc80f10 + 5c1b110 commit 5b9b72f
Show file tree
Hide file tree
Showing 5 changed files with 629 additions and 0 deletions.
10 changes: 10 additions & 0 deletions cumulusci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ tasks:
class_path: cumulusci.tasks.salesforce.Deploy
options:
path: unpackaged/config/sample_surveys
deploy_base_flows:
description: GRMS - Base Flows
group: Salesforce Metadata
class_path: cumulusci.tasks.salesforce.Deploy
options:
path: unpackaged-base-flows/config/base-samples

flows:
config_apextest:
Expand All @@ -51,6 +57,10 @@ flows:
task: deploy_sample_surveys
ui_options:
is_required: False
3:
task: deploy_base_flows
ui_options:
is_required: False

plans:
install:
Expand Down
3 changes: 3 additions & 0 deletions sfdx-project.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
},
{
"path": "unpackaged/config/sample_surveys"
},
{
"path": "unpackaged-base-flows/config/base-samples"
}
],
"namespace": "",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,341 @@
<?xml version="1.0" encoding="UTF-8"?>
<Flow xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>57.0</apiVersion>
<assignments>
<name>Clone_Relationships_To_Update</name>
<label>Clone Relationships To Update</label>
<locationX>490</locationX>
<locationY>674</locationY>
<assignmentItems>
<assignToReference>RelationshipsToCopy</assignToReference>
<operator>Add</operator>
<value>
<elementReference>NewRelationship</elementReference>
</value>
</assignmentItems>
<connector>
<targetReference>Create_New_Relationships</targetReference>
</connector>
</assignments>
<assignments>
<name>Create_Relationship</name>
<label>Create Relationship</label>
<locationX>490</locationX>
<locationY>566</locationY>
<assignmentItems>
<assignToReference>NewRelationship.GRMS__Client__c</assignToReference>
<operator>Assign</operator>
<value>
<elementReference>Create_New_Relationships.GRMS__Client__r.Id</elementReference>
</value>
</assignmentItems>
<assignmentItems>
<assignToReference>NewRelationship.GRMS__FieldWorker__c</assignToReference>
<operator>Assign</operator>
<value>
<elementReference>Which_field_worker_do_you_want_to_move_the_case_load_to</elementReference>
</value>
</assignmentItems>
<assignmentItems>
<assignToReference>NewRelationship.GRMS__Type__c</assignToReference>
<operator>Assign</operator>
<value>
<elementReference>Create_New_Relationships.GRMS__Type__c</elementReference>
</value>
</assignmentItems>
<connector>
<targetReference>Clone_Relationships_To_Update</targetReference>
</connector>
</assignments>
<assignments>
<name>Relationships_To_Update</name>
<label>Relationships To Update</label>
<locationX>138</locationX>
<locationY>674</locationY>
<assignmentItems>
<assignToReference>RelationshipsToUpdate</assignToReference>
<operator>Add</operator>
<value>
<elementReference>Re_assign_Relationships</elementReference>
</value>
</assignmentItems>
<connector>
<targetReference>Re_assign_Relationships</targetReference>
</connector>
</assignments>
<assignments>
<description>Update the Field Worker Id to the new Field Worker selected in the selection screen</description>
<name>Update_Field_Worker_Id</name>
<label>Update Field Worker Id</label>
<locationX>138</locationX>
<locationY>566</locationY>
<assignmentItems>
<assignToReference>Re_assign_Relationships.GRMS__FieldWorker__c</assignToReference>
<operator>Assign</operator>
<value>
<elementReference>Which_field_worker_do_you_want_to_move_the_case_load_to</elementReference>
</value>
</assignmentItems>
<connector>
<targetReference>Relationships_To_Update</targetReference>
</connector>
</assignments>
<choices>
<name>Copy</name>
<choiceText>Copy</choiceText>
<dataType>String</dataType>
<value>
<stringValue>Copy</stringValue>
</value>
</choices>
<choices>
<name>Migrate</name>
<choiceText>Migrate</choiceText>
<dataType>String</dataType>
<value>
<stringValue>Migrate</stringValue>
</value>
</choices>
<decisions>
<name>Migrate_or_Copy_Decision</name>
<label>Migrate or Copy Decision</label>
<locationX>226</locationX>
<locationY>350</locationY>
<defaultConnector>
<targetReference>Create_New_Relationships</targetReference>
</defaultConnector>
<defaultConnectorLabel>Copy</defaultConnectorLabel>
<rules>
<name>MigrateOutcome</name>
<conditionLogic>and</conditionLogic>
<conditions>
<leftValueReference>typedecision</leftValueReference>
<operator>EqualTo</operator>
<rightValue>
<elementReference>Migrate</elementReference>
</rightValue>
</conditions>
<connector>
<targetReference>Re_assign_Relationships</targetReference>
</connector>
<label>MigrateOutcome</label>
</rules>
</decisions>
<description>A screen flow to migrate a case load between fields workers, either by re-assigning to a different field worker or by copy a case load to a different field worker.</description>
<dynamicChoiceSets>
<name>Field_Worker_End</name>
<dataType>String</dataType>
<displayField>Name</displayField>
<filterLogic>and</filterLogic>
<filters>
<field>GRMS__ContactType__c</field>
<operator>EqualTo</operator>
<value>
<stringValue>Field Worker</stringValue>
</value>
</filters>
<object>Contact</object>
<sortField>Name</sortField>
<sortOrder>Asc</sortOrder>
<valueField>Id</valueField>
</dynamicChoiceSets>
<dynamicChoiceSets>
<name>Field_Workers_Start</name>
<dataType>String</dataType>
<displayField>Name</displayField>
<filterLogic>and</filterLogic>
<filters>
<field>GRMS__ContactType__c</field>
<operator>EqualTo</operator>
<value>
<stringValue>Field Worker</stringValue>
</value>
</filters>
<object>Contact</object>
<sortField>Name</sortField>
<sortOrder>Asc</sortOrder>
<valueField>Id</valueField>
</dynamicChoiceSets>
<interviewLabel>Case Load Migration Flow {!$Flow.CurrentDateTime}</interviewLabel>
<label>Case Load Migration Flow</label>
<loops>
<name>Create_New_Relationships</name>
<label>Create New Relationships</label>
<locationX>402</locationX>
<locationY>458</locationY>
<collectionReference>Get_Case_Load</collectionReference>
<iterationOrder>Asc</iterationOrder>
<nextValueConnector>
<targetReference>Create_Relationship</targetReference>
</nextValueConnector>
<noMoreValuesConnector>
<targetReference>Create_Relationships</targetReference>
</noMoreValuesConnector>
</loops>
<loops>
<description>Re-assign the field worker and client relationships to the new field worker.</description>
<name>Re_assign_Relationships</name>
<label>Re-assign Relationships</label>
<locationX>50</locationX>
<locationY>458</locationY>
<collectionReference>Get_Case_Load</collectionReference>
<iterationOrder>Asc</iterationOrder>
<nextValueConnector>
<targetReference>Update_Field_Worker_Id</targetReference>
</nextValueConnector>
<noMoreValuesConnector>
<targetReference>Update_all_Relationships</targetReference>
</noMoreValuesConnector>
</loops>
<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>Flow</processType>
<recordCreates>
<name>Create_Relationships</name>
<label>Create Relationships</label>
<locationX>402</locationX>
<locationY>866</locationY>
<connector>
<targetReference>Success</targetReference>
</connector>
<inputReference>RelationshipsToCopy</inputReference>
</recordCreates>
<recordLookups>
<name>Get_Case_Load</name>
<label>Get Case Load</label>
<locationX>226</locationX>
<locationY>242</locationY>
<assignNullValuesIfNoRecordsFound>false</assignNullValuesIfNoRecordsFound>
<connector>
<targetReference>Migrate_or_Copy_Decision</targetReference>
</connector>
<filterLogic>and</filterLogic>
<filters>
<field>GRMS__FieldWorker__c</field>
<operator>EqualTo</operator>
<value>
<elementReference>Which_field_worker_do_you_want_to_start_with</elementReference>
</value>
</filters>
<getFirstRecordOnly>false</getFirstRecordOnly>
<object>GRMS__FieldWorkerClientRelation__c</object>
<storeOutputAutomatically>true</storeOutputAutomatically>
</recordLookups>
<recordUpdates>
<name>Update_all_Relationships</name>
<label>Update all Relationships</label>
<locationX>50</locationX>
<locationY>866</locationY>
<connector>
<targetReference>Success</targetReference>
</connector>
<inputReference>RelationshipsToUpdate</inputReference>
</recordUpdates>
<screens>
<name>Selection_Screen</name>
<label>Selection Screen</label>
<locationX>226</locationX>
<locationY>134</locationY>
<allowBack>true</allowBack>
<allowFinish>true</allowFinish>
<allowPause>true</allowPause>
<connector>
<targetReference>Get_Case_Load</targetReference>
</connector>
<fields>
<name>Which_field_worker_do_you_want_to_start_with</name>
<choiceReferences>Field_Workers_Start</choiceReferences>
<dataType>String</dataType>
<fieldText>Which field worker do you want to start with?</fieldText>
<fieldType>DropdownBox</fieldType>
<isRequired>true</isRequired>
</fields>
<fields>
<name>Which_field_worker_do_you_want_to_move_the_case_load_to</name>
<choiceReferences>Field_Worker_End</choiceReferences>
<dataType>String</dataType>
<fieldText>Which field worker do you want to move the case load to?</fieldText>
<fieldType>DropdownBox</fieldType>
<isRequired>true</isRequired>
</fields>
<fields>
<name>Decision1</name>
<fieldText>&lt;p&gt;Do you want to migrate the caseload of surveys from one field worker to another (and delete the caseload from the first field worker) or do you want to copy a caseload from a case worker to another?&lt;/p&gt;</fieldText>
<fieldType>DisplayText</fieldType>
</fields>
<fields>
<name>typedecision</name>
<choiceReferences>Migrate</choiceReferences>
<choiceReferences>Copy</choiceReferences>
<dataType>String</dataType>
<fieldType>RadioButtons</fieldType>
<isRequired>true</isRequired>
</fields>
<showFooter>true</showFooter>
<showHeader>true</showHeader>
</screens>
<screens>
<name>Success</name>
<label>Success</label>
<locationX>226</locationX>
<locationY>1058</locationY>
<allowBack>true</allowBack>
<allowFinish>true</allowFinish>
<allowPause>true</allowPause>
<fields>
<name>SuccessMessage</name>
<fieldText>&lt;p&gt;Your relationships have updated&lt;/p&gt;</fieldText>
<fieldType>DisplayText</fieldType>
</fields>
<showFooter>true</showFooter>
<showHeader>true</showHeader>
</screens>
<start>
<locationX>100</locationX>
<locationY>0</locationY>
<connector>
<targetReference>Selection_Screen</targetReference>
</connector>
</start>
<status>Active</status>
<variables>
<name>NewRelationship</name>
<dataType>SObject</dataType>
<isCollection>false</isCollection>
<isInput>false</isInput>
<isOutput>false</isOutput>
<objectType>GRMS__FieldWorkerClientRelation__c</objectType>
</variables>
<variables>
<name>RelationshipsToCopy</name>
<dataType>SObject</dataType>
<isCollection>true</isCollection>
<isInput>false</isInput>
<isOutput>false</isOutput>
<objectType>GRMS__FieldWorkerClientRelation__c</objectType>
</variables>
<variables>
<name>RelationshipsToUpdate</name>
<dataType>SObject</dataType>
<isCollection>true</isCollection>
<isInput>false</isInput>
<isOutput>false</isOutput>
<objectType>GRMS__FieldWorkerClientRelation__c</objectType>
</variables>
</Flow>
Loading

0 comments on commit 5b9b72f

Please sign in to comment.