Skip to content

Commit

Permalink
Merge pull request #956 from bcgov/feture-ALR-1671
Browse files Browse the repository at this point in the history
ALR-1671
  • Loading branch information
GandlojuVishwantha authored Jul 16, 2024
2 parents 9e3a587 + acf85de commit 27c43b2
Show file tree
Hide file tree
Showing 3 changed files with 366 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -197,12 +197,6 @@
<identifier>builder_industries_publicsector_inspectionAssesments</identifier>
</componentInstance>
</itemInstances>
<itemInstances>
<componentInstance>
<componentName>force:detailPanel</componentName>
<identifier>force_detailPanel</identifier>
</componentInstance>
</itemInstances>
<name>detailTabContent</name>
<type>Facet</type>
</flexiPageRegions>
Expand Down
236 changes: 236 additions & 0 deletions src/main/default/flows/UpdateAssessmentTask.flow-meta.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,236 @@
<?xml version="1.0" encoding="UTF-8"?>
<Flow xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>61.0</apiVersion>
<assignments>
<name>countalliaiRecords</name>
<label>countalliaiRecords</label>
<locationX>182</locationX>
<locationY>431</locationY>
<assignmentItems>
<assignToReference>CountAllRecords</assignToReference>
<operator>AssignCount</operator>
<value>
<elementReference>GetALLAIAIRecords</elementReference>
</value>
</assignmentItems>
<connector>
<targetReference>GetCompletedIAIRecords</targetReference>
</connector>
</assignments>
<assignments>
<name>GetAllCompletedIAIRecords</name>
<label>GetAllCompletedIAIRecords</label>
<locationX>182</locationX>
<locationY>647</locationY>
<assignmentItems>
<assignToReference>CompletedCount</assignToReference>
<operator>AssignCount</operator>
<value>
<elementReference>GetCompletedIAIRecords</elementReference>
</value>
</assignmentItems>
<connector>
<targetReference>CheckIfAllCompleted</targetReference>
</connector>
</assignments>
<constants>
<name>Compliant</name>
<dataType>String</dataType>
<value>
<stringValue>Compliant</stringValue>
</value>
</constants>
<decisions>
<name>CheckIfAllCompleted</name>
<label>CheckIfAllCompleted</label>
<locationX>182</locationX>
<locationY>755</locationY>
<defaultConnector>
<targetReference>UpdateInProgress</targetReference>
</defaultConnector>
<defaultConnectorLabel>Default Outcome</defaultConnectorLabel>
<rules>
<name>CheckIfAllIAICompleted</name>
<conditionLogic>and</conditionLogic>
<conditions>
<leftValueReference>CompletedCount</leftValueReference>
<operator>EqualTo</operator>
<rightValue>
<elementReference>CountAllRecords</elementReference>
</rightValue>
</conditions>
<connector>
<targetReference>UPDATETOCOMPLETED</targetReference>
</connector>
<label>CheckIfAllIAICompleted</label>
</rules>
</decisions>
<environments>Default</environments>
<interviewLabel>UpdateAssessmentTask {!$Flow.CurrentDateTime}</interviewLabel>
<label>UpdateAssessmentTask</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>
<recordLookups>
<name>GetALLAIAIRecords</name>
<label>GetALLAIAIRecords</label>
<locationX>182</locationX>
<locationY>323</locationY>
<assignNullValuesIfNoRecordsFound>false</assignNullValuesIfNoRecordsFound>
<connector>
<targetReference>countalliaiRecords</targetReference>
</connector>
<filterLogic>and</filterLogic>
<filters>
<field>AssessmentTaskId</field>
<operator>EqualTo</operator>
<value>
<elementReference>$Record.AssessmentTaskId</elementReference>
</value>
</filters>
<getFirstRecordOnly>false</getFirstRecordOnly>
<object>InspectionAssessmentInd</object>
<storeOutputAutomatically>true</storeOutputAutomatically>
</recordLookups>
<recordLookups>
<name>GetCompletedIAIRecords</name>
<label>GetCompletedIAIRecords</label>
<locationX>182</locationX>
<locationY>539</locationY>
<assignNullValuesIfNoRecordsFound>false</assignNullValuesIfNoRecordsFound>
<connector>
<targetReference>GetAllCompletedIAIRecords</targetReference>
</connector>
<filterLogic>and</filterLogic>
<filters>
<field>AssessmentTaskId</field>
<operator>EqualTo</operator>
<value>
<elementReference>$Record.AssessmentTaskId</elementReference>
</value>
</filters>
<filters>
<field>Result</field>
<operator>IsNull</operator>
<value>
<booleanValue>false</booleanValue>
</value>
</filters>
<filters>
<field>TextFieldResponse</field>
<operator>IsNull</operator>
<value>
<booleanValue>false</booleanValue>
</value>
</filters>
<getFirstRecordOnly>false</getFirstRecordOnly>
<object>InspectionAssessmentInd</object>
<storeOutputAutomatically>true</storeOutputAutomatically>
</recordLookups>
<recordUpdates>
<name>UpdateInProgress</name>
<label>UpdateInProgress</label>
<locationX>314</locationX>
<locationY>863</locationY>
<filterLogic>and</filterLogic>
<filters>
<field>Id</field>
<operator>EqualTo</operator>
<value>
<elementReference>$Record.AssessmentTaskId</elementReference>
</value>
</filters>
<inputAssignments>
<field>Status</field>
<value>
<stringValue>InProgress</stringValue>
</value>
</inputAssignments>
<object>AssessmentTask</object>
</recordUpdates>
<recordUpdates>
<name>UPDATETOCOMPLETED</name>
<label>UPDATETOCOMPLETED</label>
<locationX>50</locationX>
<locationY>863</locationY>
<filterLogic>and</filterLogic>
<filters>
<field>Id</field>
<operator>EqualTo</operator>
<value>
<elementReference>$Record.AssessmentTaskId</elementReference>
</value>
</filters>
<inputAssignments>
<field>Status</field>
<value>
<stringValue>Completed</stringValue>
</value>
</inputAssignments>
<object>AssessmentTask</object>
</recordUpdates>
<start>
<locationX>56</locationX>
<locationY>0</locationY>
<connector>
<targetReference>GetALLAIAIRecords</targetReference>
</connector>
<filterLogic>or</filterLogic>
<filters>
<field>Result</field>
<operator>IsChanged</operator>
<value>
<booleanValue>true</booleanValue>
</value>
</filters>
<filters>
<field>TextFieldResponse</field>
<operator>IsChanged</operator>
<value>
<booleanValue>true</booleanValue>
</value>
</filters>
<object>InspectionAssessmentInd</object>
<recordTriggerType>Update</recordTriggerType>
<triggerType>RecordAfterSave</triggerType>
</start>
<status>Active</status>
<variables>
<name>CompletedCount</name>
<dataType>Number</dataType>
<isCollection>false</isCollection>
<isInput>false</isInput>
<isOutput>false</isOutput>
<scale>2</scale>
<value>
<numberValue>0.0</numberValue>
</value>
</variables>
<variables>
<name>CountAllRecords</name>
<dataType>Number</dataType>
<isCollection>false</isCollection>
<isInput>false</isInput>
<isOutput>false</isOutput>
<scale>2</scale>
<value>
<numberValue>0.0</numberValue>
</value>
</variables>
</Flow>
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
<?xml version="1.0" encoding="UTF-8"?>
<Flow xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>61.0</apiVersion>
<decisions>
<name>Check_Result</name>
<label>Check Result</label>
<locationX>314</locationX>
<locationY>323</locationY>
<defaultConnectorLabel>Default Outcome</defaultConnectorLabel>
<rules>
<name>Compliant</name>
<conditionLogic>and</conditionLogic>
<conditions>
<leftValueReference>$Record.Result</leftValueReference>
<operator>EqualTo</operator>
<rightValue>
<stringValue>Compliant</stringValue>
</rightValue>
</conditions>
<conditions>
<leftValueReference>$Record.TextFieldResponse</leftValueReference>
<operator>IsNull</operator>
<rightValue>
<booleanValue>true</booleanValue>
</rightValue>
</conditions>
<connector>
<targetReference>UpdateResponseTxt</targetReference>
</connector>
<label>Compliant</label>
</rules>
<rules>
<name>Non_Compliant_Check</name>
<conditionLogic>or</conditionLogic>
<conditions>
<leftValueReference>$Record.Result</leftValueReference>
<operator>EqualTo</operator>
<rightValue>
<stringValue>Non-compliant</stringValue>
</rightValue>
</conditions>
<conditions>
<leftValueReference>$Record.Result</leftValueReference>
<operator>EqualTo</operator>
<rightValue>
<stringValue>NA</stringValue>
</rightValue>
</conditions>
<connector>
<targetReference>UpdateTextToBlank</targetReference>
</connector>
<label>Non-Compliant Check</label>
</rules>
</decisions>
<environments>Default</environments>
<interviewLabel>UpdateDescriptionForCompliantCheck {!$Flow.CurrentDateTime}</interviewLabel>
<label>UpdateDescriptionForCompliantCheck</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>
<recordUpdates>
<name>UpdateResponseTxt</name>
<label>UpdateResponseTxt</label>
<locationX>50</locationX>
<locationY>431</locationY>
<filterLogic>and</filterLogic>
<filters>
<field>Result</field>
<operator>EqualTo</operator>
<value>
<stringValue>Compliant</stringValue>
</value>
</filters>
<inputAssignments>
<field>TextFieldResponse</field>
<value>
<stringValue>ComplaintTest</stringValue>
</value>
</inputAssignments>
<inputReference>$Record</inputReference>
</recordUpdates>
<recordUpdates>
<name>UpdateTextToBlank</name>
<label>UpdateTextToBlank</label>
<locationX>314</locationX>
<locationY>431</locationY>
<inputAssignments>
<field>TextFieldResponse</field>
<value>
<stringValue></stringValue>
</value>
</inputAssignments>
<inputReference>$Record</inputReference>
</recordUpdates>
<start>
<locationX>188</locationX>
<locationY>0</locationY>
<connector>
<targetReference>Check_Result</targetReference>
</connector>
<filterLogic>and</filterLogic>
<filters>
<field>Result</field>
<operator>IsChanged</operator>
<value>
<booleanValue>true</booleanValue>
</value>
</filters>
<object>InspectionAssessmentInd</object>
<recordTriggerType>Update</recordTriggerType>
<triggerType>RecordAfterSave</triggerType>
</start>
<status>Active</status>
</Flow>

0 comments on commit 27c43b2

Please sign in to comment.