ActionTracks
Unit Tests added to ActionTracks
Over the last couple weeks, I have been focusing on writing unit tests for models and controllers. I am happy to announce that I have completed the tests and they run without errors. The tree_xml methods do not have tests as there were errors in outputing results. These methods are going to be replaced with JSON versions so I will add those tests when I convert those methods. This has not been a fun project, however, it is rewarding to know it is done and adding new tests will be far less daunting. I may push an update to Alpha 0.6 with the test or I may wait until I add the features for 0.7.
ActionTracks Alpha 0.6 Released!
ActionTracks Alpha_0.6 is now available. In addition to several bug fixes and improvements several new features were added. The ActionTracks page now has screen shots. I am working on a live demo with generic field and data layout. Here are some highlights:
- My Account page for managing your account, contacts, messages, tracks.
- Application Settings similar to those of Croogo without the YAML.
- Access Control has been implemented with the Alaxos ACL plugin.
- Added Contact Groups Tab
- Standard and AJAX flash messages
ActionTracks Alpha 0.5 Released!
I am happy to announce the first public release of ActionTracks, a workflow driven direct marketing CRM for managing direct marketing campaigns and sales workflow. ActionTracks is based on a complex workflow driven system I developed using Goldmine. The concept for a web-based version was initially included in a business plan for suite of products for mortgage brokers. When I returned to software development full-time in 2008, I decided to use this concept to learn CakePHP. I have used this as a test platform to prove concepts and prototype features. What has resulted is a mostly working proof of concept. While the product is functional it certainly needs a lot of work.
When the product is complete i should support the same type of system I used as a mortgage broker to automate and manage my business. My process worked like this:
I used Pay Per Click campaigns to drive niche traffic to landing pages to receive free reports for first-time homebuyers, investors, etc. In order to receive the report, the user had to provide basic contact information. The contact info is automatically imported into the CRM where a Track is attached to the new contact. If the visitor requested the first-time homebuyer report, they would receive the report. After receiving the report, they would receive a series of emails spaced every few days or weeks. If the prospect submitted an application or called for a loan, the first-time homebuyer emails would stop, the Contact Type would be changed to Borrower and the contact would start receiving a series of letters and emails walking them through the loan process and keeping them informed about what steps are still to come. As the loan moved through the loan process, the borrower and other related contacts such as Realtors, appraisers, and escrow officers would receive email, fax, or letter notifications as the status of the loan changed. When the loan was closed, a gift was scheduled and the the borrower starts receiving follow up communication to stay in touch with borrowers and ask for referrals. My system required more than 200 messages and letters.
The idea for ActionTracks was to make the process of setting up these workflows much easier. Producing the content for these can be the most daunting task. In the mortgage business, there are several companies that provide content in the way of letters, flyers, and other marketing material. I wanted a system that would support easily importing this content from content providers such as Loan Toolbox, Dave Hershman, and Brian Sacks.
I am no longer in the mortgage business and really have no need for an application like this, however, I hate to see it sit and rot. I decided to release it as an Open Source application to generate some interest from other developers or companies interested in this type of system.
If you are interested in implenting or getting involved with the development of ActionTracks, please let me know.
Implementing Jared Hoyt's Wizard Plugin for CakePHP
I recently refactored one of my projects and decided to upgrade the Wizard Component written by Jared Hoyt to his new Wizard Plugin. Simply upgrading the component to the plugin would not have been difficult, however, I am using the Wizard in a jQuery modal box with AJAX form submission. This article is about the issues I encountered and how I fixed them.
History
When I began developing ActionTracks in 2008, I used Jared Hoyt's Wizard Component to manage the creation of Action records. The initial Wizard Component did not support plot branching so I had to modify the Wizard to support my plot branching. The Wizard ran in a modal window using an iframe.The Action creation process uses five steps with two separate branches. Each branch has 4-8 options. The branching looked like this.
action_details (Select the Trigger)
trigger_xxx ( If the Trigger is not Immediate, Enter the Trigger Details )
select_task (Select the Task to Perform)
task_xxx (Enter Task Detaisl)
confirm
This worked flawlessly.
Update
I have been doing a major rewrite of ActionTracks both on the back end and front end. On the front end, I have been converting all off the Scriptaculous and dhtmlx widgets to jQuery. In addition, I have been adding more AJAX where it makes sense. In addition to my rewrite, Jared has done a major rewrite of the Wizard Component converting it to a plugin and adding plot branching.
Not only am I upgrading to the Wizard Plugin, but I am now using a jQuery UI Dialog for the modal and AJAX instead of standard forms inside an iFrame. This has been one of the most difficult and frustrating conversions.
I have managed to get it working with only a few tweaks.
I had to prefix my callbacks with an underscore.
I need to disable the defaultBranch with:
$this->defaultBranch = falseI do this because the first trigger option is Immediate, so there are no Trigger Details. This allows the Immediate option to skip to the Select Task step.
My biggest issue was dealing with Wizard Completion. Previously, there was no _afterComplete callback. Saving the data was handled in the final step callback. Everything worked for the most part with the completion code in the final step callback. As soon as I moved it to the _afterComplete, things went haywire.
There are a couple issues with saving the data.
$this->Wizard->read()did not work in the _afterComplete callback because the data has been moved from the session key (Wizard.ControllerName) to the Wizard.complete key. I was able to retrieve it with $this->Session->read() and then save it.
Now the final issue was with redirection. As others have reported, there is a problem redirecting to $wizardAction without the controller name. I tried adding the action, but it didn't work for me. I fixed this by changing
$this->redirect($this->wizardAction)to
$this->process()calling it directly instead of redirecting. This can cause a PHP Warning because you are redirecting to the process method without passing the step, so I changed
function process($step) {
to
function process($step = null) {
After all of this, it works. I need to do some thorough testing especially with backing up through steps, but so far so good.
The next step is getting the Wizard to handle editing of records. In my situation, it may be easier to delete or soft delete a record and simply create a new record. The reason is that if I edit a record there are fields with existing data that would create unpredictable results unless they were cleared.