By defaut the behavior of launching the maestro workflow would ask users to go to task console and select the workflow and then click on Launch button
looks like below: (The link to access task console is : http://siteurl/maestro/taskconsole)
Usually once you install maestro workflow, it will dynamicall create a task console link on the navigation bar.
For example, if I want to lauch my membership application workflow, I would need to get to the task console link and initiate the workflow over here.
So then once you refresh the page, the workflow you have selected would appear under the task console table and display a status as active meaning the workflow has started.
Now the question is : how would we initiate a workflow from a direct link on the navigation bar?
So in this case, look at the picture 1-1, on the navigation menu bar, the link “Apply for the membership” should initiate the membership application workflow for us.
To acheive this goal, I created a customized module “launchmaestrolinks”. The module could be at below:
Note: This module is a put-together work from a few gurus and the intitial idea is learned from the drupal forum.
After the module is downloaded, here are a few things you need to do to install it!
- Copy the zip file to [site_corecode]/sites/all/modules
- Unzip the file to install the module.
- Enable the module “Launch Maestro Links”
Login to your site with administrator priviledges, and then go to Administration->Modules. You should find a simlar screen as below:
Make sure you click the checkbox to enable the module and then save the configuration.
4. Once you have enabled the module, go to navigation bar to create and configure the maestrow workflow links.
Before you create the navigation link for the maestrow workflow, make sure you know about the template number of the maestrow workflow you are referring to.
For example you could locate the template id number by going to Administration->Structure->Maestro Workflows. In this case, I am going to create the direct link on the navigation bar for my Membership Application Workflow. The template id number is 1.
Now we go to Administration-> Structure->Menus
Click on the operation “list links” beside Navigation.
We could simply add a link by clicking on at the top of the list links.
Note: the link path should follow the standard as : mastrolinks/<template_id>. So in my example, it would be 1.
Now you could see the link “Apply for the Membership” would show up at the navigation bar and once you click that link.
It will automatically kick off the workflow: Membership Applicaiton Workflow.
End of the instructions and have fun with the new module.
Merry Christmas to everyone!!