Released new version of Task Agent

October 1st, 2007

Hi all,

I just released a new version of the Task Agent. It is available for download from our FTP server for both ABECAS Insight 7.3 and 7.4

All changes in the new version of the Task Agent are related only to the Task Agent Management Console and does not affect the operation of the Task Agent engine. Here’s what changed:

  • The Task Agent console now updates correctly the list of available database connections after the initial configuration is created. Before the Task Agent console had to be closed and reloaded in order the changes to reflected on the user interface.
  • The ABECASInsightTaskWorker configuration screen now provides an option to set the Task Agent as the default handler of e-mail and fax tasks created by ABECAS Insight. Here a screen shot of the configuration screen:

ABECASInsightTaskWorker Configuration

Here is the About box with the new version information:

Task Agent - About

Task Agent Gives You Wings!

September 27th, 2007

First of all I would like to thank everybody who could attend this year’s Users Seminar, which took place here in Fresno from the 24th to the 26th of September. It was great to catch up with Charlie, Ingrid, Barry, Beth, Tina, Rhonda, Bill, Lynn, and many other customers.

On Wednesday morning I gave a talk on the use of Task Agent with our “Enterprise” modules (Inventory, Purchasing, Order Management, etc.), and I’d like to talk more about it here, as well as provide the sample code.

Scenario
The scenario I went through was to automate the delivery of sales information to sales managers and also individual sales persons. They would receive an email every Friday, containing performance comparison between the current week of the current year and the same week of the prior year. The manager would receive a .csv (comma-separated value) file with data pertaining to all sales persons, and each sales person would receive an email with his/her own numbers.

Methodology and database considerations
In order to achieve this I used Task Agent to run an “Execute SQL Script” task.
The script requires two functions that already exist in your database if you’ve updated it using a setup after 9/26/2007. Otherwise, you can add them manually.
You can get the main query and these 2 companion functions in the zip file located here.

The functions are:
>> fnAB_WeekOfYear: returns the week # given a date (from 1 to 52)
>> FnOM_GetHeaderTotalAmount: Returns the total amount for a given Sales Order

The main query returns the following columns:
ParticipantIdentityID,
ParticipantName,
RecipientEmailAddress,
ThisWeek_ThisYear,
ThisWeek_LastYear,
Difference

Although the main query is not harmful (it’s a simple select statement), please make sure to read carefully the comments on the top of it to understand its mechanism and filtering criteria.

Bird’s eye view of the complete Task Agent solution
JobDetails

JobWorkflow

Tasks
We’re using 2 “Execute SQL Script”-type tasks. They both run the same query and the only difference is the type of delivery. The first one delivers individual emails to each sales person, whereas the second task sends one single email with all the information to the sales manager.
Here’s an image to illustrate where you paste the query:
TaskSQL

First task - emailing individual recipients
The first task emails the results to individual recipients and the information needs to be pertinent to that particular person. We do that by:
a) Set the Results Storage Type to MailMerge Format
b) Set the MailMerge Address to a specific column retrieved by the query (in this case the column called “RecipientEmailAddress”.
Task1_Results_recipients

c) Leave the email recipients blank
d) In the email message tab, write your message, referencing the columns retrieved using tags (surround the column title with < >). Red arrows are pointed to these tags in the picture below.
e) Optionally, you can format your message using standard HTML tags, like the ones shown in blue in the image below.
Task1_Results_message

Second task (task #3) - emailing the sales manager
To send one single email with all the information to one single recipient, we need to:
a) Set the storage type to be Comma-Delimited
b) Specify the manager’s email address
c) Do not use tags in the email message (standard HTML tags are still OK to use).
Task2Results

Conclusion
Task Agent is a great tool which really gives wings to our imagination. Although this was an example on a useful application, it barely scratches the surface on the use of this tool. I envisioned the job described here to be run on a weekly basis, but bear in mind that there are other “triggers” for jobs, such as data changes and system changes.
Also, additionally to SQL scripts, you can run reports, Abecas Insight programs, any external program, schedule FTP uploads and downloads, and much more.

Please send us feedback about this on any other topic, and if you have any questions, don’t hesitate to contact our support department (support at argosoftware dot com) or me directly (gustavoc at argosoftware dot com).


Gustavo Cavalcanti
Product Manager - EMS
Argos Software

How To: Create a new blank ABECAS Insight database using UPDATEDB

September 20th, 2007

Most users employ the default ABECAS Insight database, ABECAS_CS. In certain cases, you may want to create one or more additional ABECAS Insight databases:

  • An additional database is needed for training or testing
  • Two databases require very different user security
  • Discrete business entities can be separated for maximum performance

In these cases, you can use the database version control program, UPDATEDB, to create a new, empty database.

Login to your ABECAS Insight Server. Click on the START button, select the RUN option, and type the following command into the RUN dialog and click the OK button:

X:\ABECASCS\SCRIPTS\DATABASE\UPDATEDB /C /DABECAS_NEW

In this case, X: is the drive where ABECAS Insight is installed and ABECAS_NEW is the desired name for the new database.

note: There is a space before each forward slash. There are no other spaces in the command.

UPDATEDB will ask you for the SA password and create the database.

Next, you should create a database alias so that your ABECAS Insight users can access your new database.

  1. Right-click on the Blue A tray icon and select SETTINGS -> GENERAL.
  2. Click on the SERVER tab on the left-hand toolbar.
  3. Click on the DATABASE icon on the left-hand toolbar.
  4. Click the ADD button on the right-hand side of the dialog.
  5. Enter the ALIAS name. This must start with “ABECAS_” and will, in most cases, be the same as the database name. The database name is automatically filled in for you when you enter the ALIAS name.
  6. Select your desired ALIAS parameters- I typically turn on the 300 record limit to avoid accidentally pulling back unmanageably large results.
  7. Select OK on all dialogs.
  8. Restart the ABECAS Insight Server 2.0 service.

It is important to remember that you must update all your ABECAS Insight databases when you upgrade your ABECAS Insight installation. When you install your next update, do the following:

  1. Click on the CUSTOM checkbox to configure your installation.
  2. Click on the SERVER component in the custom dialog.
  3. Click DETAILS to access server configuration options.
  4. Click on the UPDATE MULTIPLE DATABASES checkbox.
  5. SELECT OK and NEXT to proceed with the installation.

UPDATEDB will now display a list of databases during installation. You might want to run the installation program immediately after creating your new database so that you do not forget this vital step.

note: Certain ABECAS Insight programs, such as the ED (EDI) Module, will require special consideration in multi-database environments.

How To: Move the TEMPDB database

September 14th, 2007

It is always preferable to install ABECAS Insight and the SQL Server 2000 data files on your largest physical drive or partition. Users often install SQL Server 2000 using the default configuration, which installs all SQL Server databases on the C: drive.

If you are low on disk space on your C: drive, you can move the system databases without reinstalling SQL Server. The system database that experiences the most size fluctuation is TEMPDB. This is where all cursors, temp tables, and other temporary objects are stored. TEMPDB is also one of the easiest SQL Server system databases to move.

You will use the Query Analyzer to move the TEMPDB database. Make sure that there are no active connections to the SQL Server. Open the Query analyzer and run the following queries:

note: Your desired drive is represented by X:

use master

go

Alter database tempdb modify file (name = tempdev, filename = ‘X:\MSSQL\DATA\tempdb.mdf’)

go

Alter database tempdb modify file (name = templog, filename = ‘X:\MSSQL\DATA\templog.ldf’)

The target folder must already exist. I have chosen X:\MSSQL\DATA, but you can alter the text between the single quotes to suit your needs. If you have created additional files or filegroups in TEMPDB, you’ll have to handle those as well.

You must restart the SQL Server for this change to take effect. You must also delete the old TEMPDB files, as they are not automatically cleaned up. By default, the TEMPDB files are located here:

C:\Program Files\Microsoft SQL Server\MSSQL\DATA\tempdb.mdf
C:\Program Files\Microsoft SQL Server\MSSQL\DATA\templog.ldf

As always, you should make sure that you have a good backup before changing the configuration of your SQL Server.

How to: Restart all three ABECAS Insight services from a CMD file

September 1st, 2007

It is sometimes necessary to stop or start all three ABECAS Insight server components at the same time. The ABECAS Insight tray icon programs ask for confirmation before shutting down any services. However, you can quickly restart all three services using a CMD (Windows Command) file.

Login to your ABECAS Insight Server machine as an administrator. Open NOTEPAD and create a file on your C: drive called AIRESTART.CMD

note: You will have to use the Save As command and change the Save As Type drop-down list to All Files in order to ensure the proper file name.

Enter the following lines into AIRESTART.CMD:

net stop “abecas insight server 3.0″
net stop “abecas insight server 1.0″
net stop “abecas insight server 2.0″
PING 1.1.1.1 -n 1 -w 10000 >NUL
net start “abecas insight server 2.0″
net start “abecas insight server 1.0″
net start “abecas insight server 3.0″

note: The use of PING is a rather inelegant way make the system wait for 10 seconds before restarting ABServer 2.0.

Save your changes to the AIRESTART.CMD file and place a shortcut to the file on your server’s desktop. You can adapt the commands in this file to create a shortcut that only stops the services, or even use the built-in Windows scheduling facilities to automate the process.

You should never perform this function while there are active connections. This will unload the services without warning and drop all existing connections. ABECAS Insight clients, ABComm, EDI, XM, and Event Scheduler programs may behave unpredictably and will eventually lose connection to the SQL Server