Skip to content

Commit

Permalink
Updated source material
Browse files Browse the repository at this point in the history
  • Loading branch information
bthomps committed Sep 29, 2022
1 parent 8df4ad9 commit 2845f10
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
8 changes: 4 additions & 4 deletions v12/src/ExampleFileIterator/ExampleFileIteratorFlow.msgflow
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<nodes xmi:type="ComIbmFileExists.msgnode:FCMComposite_1" xmi:id="FCMComposite_1_1" location="15,26" inputDirectory="C:\temp\FileIterator\Input" listMode="true">
<translation xmi:type="utility:ConstantString" string="File Exists"/>
</nodes>
<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}">
<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}">
<translation xmi:type="utility:ConstantString" string="Trace1"/>
</nodes>
<nodes xmi:type="ComIbmFileIterator.msgnode:FCMComposite_1" xmi:id="FCMComposite_1_3" location="409,85">
Expand All @@ -18,13 +18,13 @@
<nodes xmi:type="ComIbmFilter.msgnode:FCMComposite_1" xmi:id="FCMComposite_1_4" location="617,85" filterExpression="esql://routine/#ExampleFileIteratorFlow_Filter.Main">
<translation xmi:type="utility:ConstantString" string="Filter"/>
</nodes>
<nodes xmi:type="ComIbmFileRead.msgnode:FCMComposite_1" xmi:id="FCMComposite_1_5" location="833,60">
<nodes xmi:type="ComIbmFileRead.msgnode:FCMComposite_1" xmi:id="FCMComposite_1_5" location="833,60" messageDomainProperty="JSON">
<translation xmi:type="utility:ConstantString" string="File Read"/>
</nodes>
<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;">
<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;">
<translation xmi:type="utility:ConstantString" string="Trace2"/>
</nodes>
<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}">
<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}">
<translation xmi:type="utility:ConstantString" string="Trace3"/>
</nodes>
<connections xmi:type="eflow:FCMConnection" xmi:id="FCMConnection_1" targetNode="FCMComposite_1_2" sourceNode="FCMComposite_1_1" sourceTerminalName="OutTerminal.out" targetTerminalName="InTerminal.in"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ CREATE FILTER MODULE ExampleFileIteratorFlow_Filter
DECLARE MyDateVariable1 DATE CAST(LocalEnvironment.Destination.File.LastModified AS DATE);
DECLARE MyDateVariable2 DATE CAST(CURRENT_GMTTIMESTAMP AS DATE);
IF (MyDateVariable1 < MyDateVariable2) THEN
RETURN FALSE;
-- This means the file was last modified before today's date
RETURN TRUE;
ELSE
-- This means the file was last modified on today's date
RETURN TRUE;
END IF;
END;
Expand Down
1 change: 1 addition & 0 deletions v12/src/ExampleFileIterator/Fruit1.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"Fruit": "APPLES"}
1 change: 1 addition & 0 deletions v12/src/ExampleFileIterator/Fruit2.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"Fruit": "ORANGES"}
1 change: 1 addition & 0 deletions v12/src/ExampleFileIterator/Fruit3.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"Fruit": "BANANAS"}

0 comments on commit 2845f10

Please sign in to comment.