Skip to content

Commit 4c9d63e

Browse files
authored
Merge pull request #379 from navikt/schedFlow
Create HOT_Course_set_Task_record_type_scheduled.flow-meta.xml
2 parents 3df9487 + bb1ff11 commit 4c9d63e

File tree

2 files changed

+125
-1
lines changed

2 files changed

+125
-1
lines changed

force-app/main/default/classes/CourseSchedulableTest.cls

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ public class CourseSchedulableTest {
66
}
77
@isTest
88
public static void testCourseSchedulable() {
9-
String cronExpr = '0 0 0 21 3 ? 2025';
9+
String cronExpr = '0 0 0 21 9 ? 2025';
1010

1111
Course__c course1 = CourseRegistrationHandlerTest.getCourse('Testkurs');
1212
course1.RegistrationToDateTime__c = Datetime.Now().addDays(-85);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Flow xmlns="http://soap.sforce.com/2006/04/metadata">
3+
<apiVersion>63.0</apiVersion>
4+
<decisions>
5+
<name>Is_task_from_course</name>
6+
<label>Is task from course?</label>
7+
<locationX>182</locationX>
8+
<locationY>252</locationY>
9+
<defaultConnectorLabel>Not from course</defaultConnectorLabel>
10+
<rules>
11+
<name>Yes_is_from_course</name>
12+
<conditionLogic>or</conditionLogic>
13+
<conditions>
14+
<leftValueReference>FirstThreeDigitsOfRecordId</leftValueReference>
15+
<operator>EqualTo</operator>
16+
<rightValue>
17+
<stringValue>a16</stringValue>
18+
</rightValue>
19+
</conditions>
20+
<conditions>
21+
<leftValueReference>FirstThreeDigitsOfRecordId</leftValueReference>
22+
<operator>EqualTo</operator>
23+
<rightValue>
24+
<stringValue>a19</stringValue>
25+
</rightValue>
26+
</conditions>
27+
<connector>
28+
<targetReference>Get_record_type_id</targetReference>
29+
</connector>
30+
<label>Yes is from course</label>
31+
</rules>
32+
</decisions>
33+
<environments>Default</environments>
34+
<formulas>
35+
<name>FirstThreeDigitsOfRecordId</name>
36+
<dataType>String</dataType>
37+
<expression>LEFT({!$Record.WhatId}, 3)</expression>
38+
</formulas>
39+
<interviewLabel>HOT Course set Task record type scheduled {!$Flow.CurrentDateTime}</interviewLabel>
40+
<label>HOT Course set Task record type scheduled</label>
41+
<processMetadataValues>
42+
<name>BuilderType</name>
43+
<value>
44+
<stringValue>LightningFlowBuilder</stringValue>
45+
</value>
46+
</processMetadataValues>
47+
<processMetadataValues>
48+
<name>CanvasMode</name>
49+
<value>
50+
<stringValue>AUTO_LAYOUT_CANVAS</stringValue>
51+
</value>
52+
</processMetadataValues>
53+
<processMetadataValues>
54+
<name>OriginBuilderType</name>
55+
<value>
56+
<stringValue>LightningFlowBuilder</stringValue>
57+
</value>
58+
</processMetadataValues>
59+
<processType>AutoLaunchedFlow</processType>
60+
<recordLookups>
61+
<name>Get_record_type_id</name>
62+
<label>Get record type id</label>
63+
<locationX>50</locationX>
64+
<locationY>360</locationY>
65+
<assignNullValuesIfNoRecordsFound>false</assignNullValuesIfNoRecordsFound>
66+
<connector>
67+
<targetReference>Update_task</targetReference>
68+
</connector>
69+
<filterLogic>and</filterLogic>
70+
<filters>
71+
<field>DeveloperName</field>
72+
<operator>EqualTo</operator>
73+
<value>
74+
<stringValue>HOT_course</stringValue>
75+
</value>
76+
</filters>
77+
<getFirstRecordOnly>true</getFirstRecordOnly>
78+
<object>RecordType</object>
79+
<storeOutputAutomatically>true</storeOutputAutomatically>
80+
</recordLookups>
81+
<recordUpdates>
82+
<name>Update_task</name>
83+
<label>Update task</label>
84+
<locationX>50</locationX>
85+
<locationY>468</locationY>
86+
<inputAssignments>
87+
<field>RecordTypeId</field>
88+
<value>
89+
<elementReference>Get_record_type_id.Id</elementReference>
90+
</value>
91+
</inputAssignments>
92+
<inputReference>$Record</inputReference>
93+
</recordUpdates>
94+
<start>
95+
<locationX>56</locationX>
96+
<locationY>0</locationY>
97+
<connector>
98+
<targetReference>Is_task_from_course</targetReference>
99+
</connector>
100+
<filterLogic>and</filterLogic>
101+
<filters>
102+
<field>TAG_ActivityType__c</field>
103+
<operator>IsNull</operator>
104+
<value>
105+
<booleanValue>true</booleanValue>
106+
</value>
107+
</filters>
108+
<filters>
109+
<field>WhatId</field>
110+
<operator>IsNull</operator>
111+
<value>
112+
<booleanValue>false</booleanValue>
113+
</value>
114+
</filters>
115+
<object>Task</object>
116+
<schedule>
117+
<frequency>Once</frequency>
118+
<startDate>2025-03-21</startDate>
119+
<startTime>20:30:00.000Z</startTime>
120+
</schedule>
121+
<triggerType>Scheduled</triggerType>
122+
</start>
123+
<status>Active</status>
124+
</Flow>

0 commit comments

Comments
 (0)