This module is absolutely amazing. Our whole team is very excited to see this project. Thank you!!!

We have a question about how best to approach the dynamic assignment of a task and/or tasks based on fields in a user's profile. Specifically, we want to use a view to drive the assignment of entityforms as tasks to a user upon the creation of said user.

We have created something similar in our custom module. Now we want adapt our work to use Maestro.

The batch function, looks very promising, but I don't know how to use it to assign tasks programmatically.

Any insight you could be provided would be greatly appreciated.

Thanks again!

Comments

_randy’s picture

There is a way to transfer data from, say, rules to a Maestro workflow. You could potentially push the newly created user ID to a Maestro template variable upon new user creation via views.

Have a look here at an example: http://www.youtube.com/watch?v=Uu4DnA1Ikqk

Hopefully that sheds some light on how to at least get started. We have a number of blog posts on our site that may also help.

blainelang’s picture

If you are using the Entityform module, maestro has added support to be able to set a process variable from a form result.

If the entityform instance has been created inside the workflow, then you can add a "Set Process Variable" task and set a variable to the value in one of the form fields and use that variable to assign a future task to.

Alternatively a batch task as you noted which can include any PHP logic and then use the setProcessVariable method on the maestro engine class. There are several examples of batch functions in the provided modules like maestro_publishNode in the maestro_content_publish module.

$maestro->engine()->setProcessVariable($variable_name, $value, $process_id);