I just started to work with Drupal because of the module "Maestro" seems to be perfectly suited to my professional needs.

I can start a Maestro workflow with the "Technical Support request" function as well as with an article. However, I do not succeed to launch a workflow from a form: "webform" or "Entityform".

When I launch a process created with a Webform content or Entityform I receive the following error message (example with a process which use Webform):

PDOException: SQLSTATE [42S22]: Column not found: 1054 Unknown column 'instance_name' in 'field list': INSERT INTO {} maestro_project_content (nest tracking_id, task_id, content_type, body, instance_name, status) VALUES (: db_insert_placeholder_0,: db_insert_placeholder_1 ,: db_insert_placeholder_2,: db_insert_placeholder_3,: db_insert_placeholder_4,: db_insert_placeholder_5,: db_insert_placeholder_6) Array ([: db_insert_placeholder_0] => 39 [: db_insert_placeholder_1] => 317 [: db_insert_placeholder_2] => 713 [: db_insert_placeholder_3] => webform [: db_insert_placeholder_4 ] => 54 [: db_insert_placeholder_5] => [: db_insert_placeholder_6] => 11) MaestroTaskTypeWebform-> processContent () (line 167 in

I am aware that this is a rookie mistake but I look for a solution since 2 days without success.

Thank you

Comments

blainelang’s picture

Are you using the entityform task type or the webform task type?

You can't use the content type task for either of these entity types - it's only for nodes or custom content types.
Have a look at these maestro task type projects.

https://drupal.org/project/maestro_entityform_task
https://drupal.org/project/maestro_webform_task

damienmichel’s picture

blainelang, thank you for your quick reply.

Yes, I use the entityform task type or the webform task type (according to the form used in the workflow).

My problem is due to the variable I have to create when I add an "Interactive Function Task".
For example : I start my workflow with an "Entity form task" (I select the Entityform to use), I Draw a line to an "Interactive Function Task". In the box "handler" of the "Interactive Function Task" I choose "Maestro_reviewEntityForm". Maestro said "Requires that you use a variable called "instance_name". It can be Process Variable or a Task Variable (defined under the edit task dialog - Optional tab) that is set to the instance name for the entity form previously defined in the workflow that this function will review.".
So, I created the template variable "instance_name" but I don't know which Variable value to insert (I tried, without success, to put the name of the form used in the template, and "webform" or "Entityform").

This problem of Variable value setting is the origin of the bug presented in my previous post.

I really appreciate your help.

blainelang’s picture

When you edit the entityform task (same for webform task), you select the entityform type in the task properties. You also need to provide an instance_name variable in the task - the initial value (reference name) can be anything you want - it's just a reference in this workflow.

So if I want to route an expense form, I may call set the task process variable "instance_name" to expenseform.

In subsequent entityform task types or interactive function "review entity form" tasks, you use the same value to tell the task what entity form instance it should use. You may have multiple entity forms being used in the same workflow. You may even have multiple instances of the same entityform being used, that's why we just don't assume which entity form result to reference.

damienmichel’s picture

Thank you for your explanations. I Followed your advice but when I launch a process using Webform or entityform I still have the same error message. Below you can watch the error message provided after launching a Workflow which use an Entity form (my variable value is "test_entity") :

PDOException : SQLSTATE[42S22]: Column not found: 1054 Unknown column 'a.instance_name' in 'where clause': SELECT a.nid AS submission_id FROM {maestro_project_content} a WHERE (a.tracking_id = :db_condition_placeholder_0) AND (a.content_type = :db_condition_placeholder_1) AND (a.instance_name = :db_condition_placeholder_2) ; Array ( [:db_condition_placeholder_0] => 330 [:db_condition_placeholder_1] => entityform [:db_condition_placeholder_2] => test_entity ) dans MaestroTaskTypeEntityform->getTaskConsoleURL() (ligne 124 dans /homez.337/damienin/www/drupal/sites/all/modules/maestro_entityform_task/maestro_entityform_task.engine.class.inc).

So the problem is not due to the instance name but maybe by the Entityform himself. Indeed, when I create a new entity form there is no field (not even a field Node Element).

blainelang’s picture

Can you try the DEV version of maestro, and then check if there is an update to run. A new field was added a few weeks ago to track multiple instances of submitted date in the workflows.

blainelang’s picture

Status: Active » Postponed (maintainer needs more info)

We had some GIT Commit issues, use the DEV release for the Jun 5th or greater and re-test.

blainelang’s picture

We just created a new release 1.4 - use that.

damienmichel’s picture

Many Thanks Blainelang.
The problem has been resolved in the new release.
Thank you

blainelang’s picture

Issue summary: View changes
Status: Postponed (maintainer needs more info) » Closed (fixed)