This is sort-of several issues in one;

Main issue:
I've got a task set; directs the user to open a webform, and fill it out. That webform should create a "unique ID" for now I was trying to use the webform SID for that number, set the process variable using instancename:meta-sid, and then recall that in the notification email being sent at the next content task being assigned to the user. Example in the subject; I tried: Task: You need to create a results form topic for request ID [instancename:meta-sid].
Of course in the email (both content and subject) all I get is the variable encased in brackets, but no replacement for values.
Is there a way to obtain these values?

Secondary issue:
Instead of sending an email with the above information-- the next step being the user creates a forum topic; If I were able to pre-populate the forum topic with information including the "unique ID" IE above the webform SID; something like "Request ID: [instancename:meta-sid] -- Is this possible?
I liked the idea of using Forums, but I suppose its possible to switch to some other format (ie content type) to make this work.

Last bit:
How do I get the workflow to immediately send the user that starts it directly to a webform? Right now they have to go to follow a link from email or look in the task list.

Thanks!

Comments

dj_00 created an issue. See original summary.

_randy’s picture

Hi,

For your first question: There isn't a token for that specific type of roll-up of variables in to a notification email, and hence why it doesn't get replaced in the outgoing email.
It is certainly possible to have something like that done, however it would take some development to do so. Alternatives could be to do a custom mail hook that would allow you to alter tokens yourself.

Second question:
If you're looking at creating content based on a webform, you'd have to create that programmatically via a batch function. That would be the most straightforward approach I think. You could then read the values from the form, inject that into the new forum node you're creating and also inject that data in to the Maestro project content table. This way the content is created as you see fit and the next task could be an email to allow someone to edit that forum posting. Sounds tricky, but it's one batch function with some pretty common Drupal programming.

Third question:
There's a couple of ways to fast-forward to the first task and present that to the user. First way involves a custom menu hook and some code that launches a flow and moves it along to the first task and redirects the user to that first task's required content type.
OR
Use rules. This should help: http://www.nextide.ca/maestro-fire-a-workflow-after-saving-content-with-...

dj_00’s picture

Thanks Randy!

#1: Boo, this would be really useful in many cases!

#2: Ok thanks, that gives me the general path to take. I'll have to come back to this later, once I have other pieces in place.

#3: I think I'm skipping to the rules solution -- this as the "best bang for the buck solution" -- I'd actually read that page, but didn't fully understand the implications at the time, now that it's come full circle in my own head I see how I can make that work, and that'll do just fine for now.

geste’s picture

To the extent that I can, I am trying to implement an approval workflow without taking folks to the task console. I thought to use tokens in notifications that jump to the node's edit URL, but I see that there are 4 tokens built in ([task_console_url], [workflow_name], [task_name] and [task_owner]) none of which seem like they would provide what I am looking for. I found this issue when looking to see if anybody had maybe implemented a "URL/node/edit" custom token but I don't see a sign of that.

I have just started implementing a flow based on @_randy's link in #2. What I am trying to figure out is whether I could use rule->action for all notifications rather than the task-associated emails and whether I would regret it down the road.

A great module. It makes my head hurt, but a great module :)

Jim

_randy’s picture

@geste #4

If you're trying to "hide" Maestro from view, and control what to do with content types on your own while still maintaining Maestro in the background, look at the scenario from the other side:

What you can do is on node edit, hook into the form and query Maestro if THAT piece of content is attached to an open process. If so, you can add in your own hidden form elements to add in queueIDs or processIDs or whatever other Maestro information you require, including a custom submit handler to do whatever it is you wish to do with the content after it has been saved/updated.

I've done this with a few deployments and works well.

geste’s picture

Randy,

That was very helpful, thanks. I need to become more hook aware.

Jim

_randy’s picture

Status: Active » Closed (works as designed)