Sort by:[Date]

Dynamically create a maestro relationship to node and user

We already have the ability to create a drupal action to launch a maestro workflow and trigger that action from drupal. Maesto also has a trigger type task that can launch drupal actions from workflows but we did not have rules integration. We also needed a way to better track adhoc new instances of maestro processes with drupal entities like node and users.
 
Maestro has a content type task that automatically will create the relationship between the content node and maestro proceess information but there are cases where the maestro content type task is not used to create the content entities and we did not have an easy way to later link maestro processes with content nodes or other entities.

See video

Maestro Module: To Regenerate or Not To Regenerate...

The regenerate functionality goes back many years in the history of the Maestro engine.  I wrote the very first instance of the "Maestro" engine back in 2004/2005 where it was nowhere near as flexible and nowhere near as extensible as it is today as Maestro.  That being said, the engine's internals have been updated and upgraded over the years which has culminated in what you see today.  The concept of regenerate and regenerate all live tasks comes from the very beginning of the engine's life and lives today in Maestro 1.0's engine. 

Maestro How-To

How do I..... ?  is a question we hear quite a bit when it comes to the Maestro API. We have a few very good blog posts on our site and also bundle Maestro with some good example code. However time has come to begin to document how to do a variety of common things with the Maestro API.

Some SQL Server 2008 Express Tips to Help You Along

I'm working on another SQL Server 2008 and Drupal 7 project right now.  This particular project has a great deal of stored procedures and triggers in it to massage extrenal data to the right format for display in Drupal.

 

Doing Drupal/PHP development with SQL Server 2008 is easy using the 2008 Express (free) edition for those of us who don't use SQL Server regularily as a database on our development machines.  However, there is one small problem I ran in to on this current project:   SQL 2008 Express does not have any UI mechanisms in the SQL Management Studio to allow you to manage triggers!

Maestro, SQL Server and IIS

With the increased level of support by Microsoft for not only PHP on IIS, but also getting SQL Server support for Drupal 7, the barriers to entry for Enterprise level customers for Drupal are diminishing rapidly.
 
Case and point – we recently deployed a Maestro managed workflow process for an Enterprise level customer who would have never entertained the notion of using Drupal or Maestro if it ran only on MySQL. As sad as that sounds, it’s a stark reality for many large companies who will outright refuse even the best solution due to their perceived increased support costs for “yet another database engine” (MySQL).
 
With that said, my time on our Drupal 7/SQL Server/Maestro project went smoothly as I could have hoped for. There were a few curveballs here and there that hopefully this posting can help someone else overcome. So here I go:
 

Microsoft SQL Server and Drupal? More likely than you think!

With the recent release of Drupal 7, its PDO database abstraction layer means that Drupal 7 can technically support a variety of databases (provided they have the proper Drupal 7 database interface).
Of course, what Drupal 7 + PDO means is that yet another barrier to entry for "Microsoft Shops" to use Drupal has faded away.  One of the biggest reasons.... ahem.. excuse to not use Drupal (or just about any other Open Source CMS for that matter) was that the CMS needed to run on _______  (fill in the blank here with whichever database you like that is NOT SQL Server).  Not to mention the poor support that used to plague PHP on IIS.
Thanks to hard work by Commerce Guys, the sqlsrv project was born, giving Drupal 7 the required SQL Server database driver. That being said, you may notice that the sqlsrv project is still in an Alpha release state at the time of writing of this blog article (Update -- January 31st 2011  -- sqlsrv is now in RC status!). The Alpha state of modules generally turns people away from using it. However I strongly urge people to continue to use it and help work out any bugs with sqlsrv to bring it to a stable release.
Regardless of the release state of sqlsrv and some of the outstanding issues in its issue queue, it does run quite well and actually didn’t give me any major issues when working on a Maestro project for a client.  

Maestro 1.0 is Now Available

This release fixes the critical outstanding issues with Maestro. There are still some would-likes that will make it into 1.1, which is planned for release candidate around February 18th.

Among all the fixes the most important is the fix for the content type task, which was stalling after uploading a file. Version 1.0 has been fully tested in both MySQL and MSSQL Servers alike. For more information, check out the Maestro page. You can download Maestro on our project page on Drupal.org.

Maestro 1.0 RC1 is Available

In light of the recent Drupal 7.0 release, we have finished testing Maestro with D7.0 and are ready to announce the first Maestro release candidate. We will continue to test for bugs, and if no critical issues arise then version 1.0 will be upon us soon!

In particular, this version of Maestro has a number of fixes for MS Sql Server users. For more information on Maestro, check out the Maestro page. You can download Maestro on our project page on Drupal.org.

Tracing the Call Stack in PHP

Here's a neat trick I picked up which will help you debug your PHP application. But before I get into the technique, consider this scenario: You're getting a PHP error deep within a class which you didn't write, but are calling its methods. The PHP error message tells you the line and the error that it was running into, but ultimately the issue lies with a parameter you passed into the method.

Let's say the error you were getting was "A SQL Error Has Occurred. Check error.log for details". So you check the error log and sure enough you see the line of SQL that failed. But your application is big and you have many similar SQL statements. PHP tells you the line it failed on, but thats inside the SQL wrapper class you're using. You want to know what db_query statement you called which caused the SQL error to be thrown within the class. Searching your code for the SQL code you wrote is a good start but again, there are lots of similar queries.

Maestro Overview Part 2 - Interactive Tasks

In part 1 of our Maestro module overview we explained the different task types that we have available in the module. One of these task types is the Interactive Task and this blog post will provide more detail on this task type and how to create your own custom function for it to use.

In an interactive workflow driven process, there are many times you need to present information or request information to a user. Examples of this would include:

  • Submit a task to a user to create or update a content type record. This may be a drupal article or something more site specific like a job request setup as a custom content type
  • Prompt a user to review a piece of information to approve or reject - possibly an article or that job request
  • Ask a user for some information using a form - results of which need to be used in the subsequent workflow
  • Ask a user to pick from a list of users who should be assigned a subsequent task in the workflow
  • Show a user some information - may not require any action

Basically any task where we want to interact with the user and we want full control over what is displayed. We may need to prompt the user with custom submit actions and execute code depending on what action the user takes.