I have 4 workbench fmw files, each pulling data from an outside source, run it through various transformers, that then insert and update data into 6 related tables.
The First FMW is updating traffic accidents.
The Upper body code on the HTTPCaller transformer contains start and end dates that have to be manually updated each week.
This is the code in the Upload Body parameter:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<TPWAccidentDataXML xmlns="http://www.lesa.net/">
<StartDate>02/01/2019</StartDate>
<EndDate>02/16/2019</EndDate>
</TPWAccidentDataXML>
</soap:Body>
</soap:Envelope>
I want to replace the manual process by adding a scheduled task to run every Monday AM morning, and to calculate and pass in the Calculated Start and End dates.
I have a creator transformer to start, followed by 2 DateTime Calculators.
The 1st one calculates the StartDate using @DateTimeNow() to Subtract 8 days, while the 2nd DateTime calculator determines the EndDate @DateTimeNow() to Subtract 2 days.
However not sure how to code this to pass in the value from StartDate and EndDate.
Any ideas?
I tried this, but doesn't work.
<StartDate>@Value($(StartDate))</StartDate>
<EndDate>@Value($(EndDate))</EndDate>
Thanks