Skip to content

Commit 2845f10

Browse files
committed
Updated source material
1 parent 8df4ad9 commit 2845f10

File tree

5 files changed

+10
-5
lines changed

5 files changed

+10
-5
lines changed

v12/src/ExampleFileIterator/ExampleFileIteratorFlow.msgflow

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<nodes xmi:type="ComIbmFileExists.msgnode:FCMComposite_1" xmi:id="FCMComposite_1_1" location="15,26" inputDirectory="C:\temp\FileIterator\Input" listMode="true">
1010
<translation xmi:type="utility:ConstantString" string="File Exists"/>
1111
</nodes>
12-
<nodes xmi:type="ComIbmTrace.msgnode:FCMComposite_1" xmi:id="FCMComposite_1_2" location="209,26" destination="file" filePath="C:\temp\FileIterator\Traces\Trace1.txt" pattern="===== ${CURRENT_TIMESTAMP} LocalEnvironment =====&#xD;&#xA;${LocalEnvironment}">
12+
<nodes xmi:type="ComIbmTrace.msgnode:FCMComposite_1" xmi:id="FCMComposite_1_2" location="209,26" destination="file" filePath="C:\temp\FileIterator\Traces\Trace1.txt" pattern="===== ${CURRENT_TIMESTAMP} =====&#xD;&#xA;The LocalEnvironment generated by the FileExists node (with List mode turned on) was as shown below:&#xD;&#xA;${LocalEnvironment}">
1313
<translation xmi:type="utility:ConstantString" string="Trace1"/>
1414
</nodes>
1515
<nodes xmi:type="ComIbmFileIterator.msgnode:FCMComposite_1" xmi:id="FCMComposite_1_3" location="409,85">
@@ -18,13 +18,13 @@
1818
<nodes xmi:type="ComIbmFilter.msgnode:FCMComposite_1" xmi:id="FCMComposite_1_4" location="617,85" filterExpression="esql://routine/#ExampleFileIteratorFlow_Filter.Main">
1919
<translation xmi:type="utility:ConstantString" string="Filter"/>
2020
</nodes>
21-
<nodes xmi:type="ComIbmFileRead.msgnode:FCMComposite_1" xmi:id="FCMComposite_1_5" location="833,60">
21+
<nodes xmi:type="ComIbmFileRead.msgnode:FCMComposite_1" xmi:id="FCMComposite_1_5" location="833,60" messageDomainProperty="JSON">
2222
<translation xmi:type="utility:ConstantString" string="File Read"/>
2323
</nodes>
24-
<nodes xmi:type="ComIbmTrace.msgnode:FCMComposite_1" xmi:id="FCMComposite_1_6" location="835,125" destination="file" filePath="C:\temp\FileIterator\Traces\Trace2.txt" pattern="===== ${CURRENT_TIMESTAMP} LocalEnvironment =====&#xD;&#xA;The message flow is not going to bother reading ${LocalEnvironment.File.Name} which will just be deleted&#xD;&#xA;">
24+
<nodes xmi:type="ComIbmTrace.msgnode:FCMComposite_1" xmi:id="FCMComposite_1_6" location="835,125" destination="file" filePath="C:\temp\FileIterator\Traces\Trace2.txt" pattern="===== ${CURRENT_TIMESTAMP} =====&#xD;&#xA;The message flow is not going to bother reading and parsing the file ${LocalEnvironment.Destination.File.Name} &#xD;&#xA;The file ${LocalEnvironment.Destination.File.Name} had a LastModified timestamp of ${LocalEnvironment.Destination.File.LastModified}&#xD;&#xA;The current timestamp is ${CURRENT_TIMESTAMP} &#xD;&#xA;The file ${LocalEnvironment.Destination.File.Name} was last modified before today and so will just be deleted by the message flow.&#xD;&#xA;">
2525
<translation xmi:type="utility:ConstantString" string="Trace2"/>
2626
</nodes>
27-
<nodes xmi:type="ComIbmTrace.msgnode:FCMComposite_1" xmi:id="FCMComposite_1_7" location="1039,55" destination="file" filePath="C:\temp\FileIterator\Traces\Trace3.txt" pattern="===== ${CURRENT_TIMESTAMP} =====&#xD;&#xA;The file ${LocalEnvironment.File.Name} has been parsed and contained the following data:&#xD;&#xA;${Root}">
27+
<nodes xmi:type="ComIbmTrace.msgnode:FCMComposite_1" xmi:id="FCMComposite_1_7" location="1039,55" destination="file" filePath="C:\temp\FileIterator\Traces\Trace3.txt" pattern="===== ${CURRENT_TIMESTAMP} =====&#xD;&#xA;The file ${LocalEnvironment.Destination.File.Name} has been parsed and contained the following data:&#xD;&#xA;${Root.JSON.Data.Fruit}">
2828
<translation xmi:type="utility:ConstantString" string="Trace3"/>
2929
</nodes>
3030
<connections xmi:type="eflow:FCMConnection" xmi:id="FCMConnection_1" targetNode="FCMComposite_1_2" sourceNode="FCMComposite_1_1" sourceTerminalName="OutTerminal.out" targetTerminalName="InTerminal.in"/>

v12/src/ExampleFileIterator/ExampleFileIteratorFlow_Filter.esql

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@ CREATE FILTER MODULE ExampleFileIteratorFlow_Filter
66
DECLARE MyDateVariable1 DATE CAST(LocalEnvironment.Destination.File.LastModified AS DATE);
77
DECLARE MyDateVariable2 DATE CAST(CURRENT_GMTTIMESTAMP AS DATE);
88
IF (MyDateVariable1 < MyDateVariable2) THEN
9-
RETURN FALSE;
9+
-- This means the file was last modified before today's date
10+
RETURN TRUE;
1011
ELSE
12+
-- This means the file was last modified on today's date
1113
RETURN TRUE;
1214
END IF;
1315
END;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"Fruit": "APPLES"}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"Fruit": "ORANGES"}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"Fruit": "BANANAS"}

0 commit comments

Comments
 (0)