Icod.Wod framework, or WoD, is an automation class library. Copyright (C) 2023 Timothy J. Bruce
The Icod Work on Demand Framework, or WoD, is a class library intended to automate a great variety of tasks. These tasks can be roughly divided into categories of:
- File Operations
- Database Operations
- Salesforce Operations
- Email Operations
A common job might be to download records from multiple SalesForce tables, load them into a SQL database to process the records with a SQL program, export the modified records back into SalesForce, export other records as a set of XML files, copy the XML files to an SFTP site, export another set of records as a set of JSON files, export those JSON files to an on-line web resource (such as WorkDay), and email a CSV report file to some other people. And do all of this on a specific schedule, such as at 7pm Monday through Friday. And describe the work in a platform neutral format, such a human-readable XML file (called a Schematic), rather than some binary tool offered by a particular Database vendor.
Oh! And did I mention you don't need a cloud? Yes, it will work on any platform which supports .Net Framework 4.8.1. Such as any desktop, application server, or even your smartphone. Yes you can have a cloud if you like, but you don't need one.
The WoD exposes the necessary classes and interfaces to perform all this work. There is a corresponding client program, Icod.Wod.Client, which can be used for running WoD Schematics. It would typically be invoked aline the lines of:
\\application-server\Icod.Wod\Icod.Wod.Client.exe \\application-server\jobs\daily\SFstaff-to-Workday.xml
These operations involve working with a database of some sort. The WoD Framework will connect to any database product for which you have a driver and can specify via a connection-string. See ConnectionStrings.com.
Example:
<dbFileExport connectionStringName="CustomerData" namespace="dbo"
commandText="getCustomerMailingList" commandType="StoredProcedure"
>
<destination xsi:type="delimitedFile" codePage="utf-8" convertEmptyStringToNull="false" hasHeader="true"
fieldSeperator="44" quoteChar="34" recordSeparator=" " append="false"
path="\\file-store\weekly-reports\" name="customer-mailing-list.csv" writeIfEmpty="true"
/>
</dbFileExport>
Executes a stored procedure or even raw text in the specified database.
Exports data to a specified file.
Imports data from a specified file.
Sends email to one or more specified addresses. May contain zero or more file attachments.
Example:
<email to="[email protected]" sendIfEmpty="false" subjectCodePage="us-ascii" subject="Customer mailing list">
<attachments>
<attach path="\\file-store\weekly-reports\" name="customer-mailing-list.csv" />
</attachments>
</email>
There are a great many file operations supported by the Icod.Wod Framework, but we should first describe the different end-points supported.
Example:
<fileOperation xsi:type="deleteFile" path="\\file-store\weekly-reports\" name="customer-mailing-list.csv" />
A file or directory is specified by an end-point. This end-point could be almost anything. A web page,
a spreadsheet on an Sftp site, or even a Jpeg on the local computer itself.
All operations require at least one end-point specification.
This is any file accessible by any installed file system driver, such as NTFS or Ext4, or CIFS, or even NFS.
This is any file accessible via the Ftp or Ftps protocols.
This is any file accessible via the Http or Https protocols.
This is any file accessible via the Sftp protocol.
These are the core function which manipulate one or more files or directories. Each requires one or more end-points.
Appends one or more files to a Zip archive.
Appends text from one or more files to the end of a file.
Copies one or more files.
Compresses or decompresses one or more files with the Deflate algorithm.
Attempts to delete one or more files.
Attempts to launch the file as an executable.
Perform specified work if and only if the specified file exists.
Retrieve/unpack one or more files from one or more Zip archives.
Compresses or decompresses one or more files with the GZip algorithm.
Retrieve the top-most specified number of lines from one or more files.
Translates the specified Json files to Xml files.
List all files and directories in a specified path.
List all directories in a specified path.
List all files in a specified path.
List the contents of the specified Zip archive.
Creates a directory in the specified path.
Creates a Zip archive.
Prepends text to the beginning of the specified ciles.
Prefixes each line of the specified files with the specified text.
Removes all blank lines and trims all trailing and leading whitespace from the lines of the specified files.
Changes the Code Page of the specified files.
Renames the specified file.
Removes the specified directory.
Removes the specified file from a Zip archive.
Appends the specified text to each line in the specified files.
Retrieve the bottom-most specified number of lines from one or more files.
Creates the specified file if it does not exist; otherwise it updates the last-write and last-access times.
Creates the specified Zip archive if it does not exist; otherwise it updates the last-write and last-access times.
Translates the specified Xml files to Json files.
Transforms the specified XML files according to the rules of the specified XSLT file.
These operations are for exchanging data with the SalesForce cloud.
These operations use the highly efficient Bulk API.
Deletes the specified records.
Inserts the specified records.
Downloads records from the SalesForce cloud as per the specified soql to a file.
Updates the specified records.
Performs an upsert opertion in the SalesForce cloud as per the specified records.
Downloads records from the SalesForce cloud as per the specified soql to a file, using the inefficient Rest Api.
No. It'll run on any computer which supports the .Net Framework 4.8.1.
It's rather easy. A schematic is a collection of one or more steps. Each step is an operation to execute, such as delete or email a file. Some steps can be done in paralell, and even conditionally on the existence of some file. Since we like intellisense and autocomplete there is a pair of Xsd schema files which Visual Studio, Glade, and Notepad++ will use. Thanks to intellisense and autocomplete you can focus on ''what'' you want to do rather than ''how'' to do it. If what you want done can't be done with those then give me a ring and we'll see how your task fits into things.
Sure! You can find a few examples here, at my pastebin.
Yes, I know. It's easier to use too. And did I mention it doesn't need a cloud and doesn't cost a fortune?
Icod.Wod framework, or WoD, is an automation class library. Copyright (C) 2023 Timothy J. Bruce
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA