Manual Web Task
The Manual Web task is used to redirect the user to a different Drupal page, custom module route, or even an external page from the workflow application. The redirection to a page is done in the Maestro Task Console and provides the Maestro Queue ID (queueid=xxxx) or site-wide token as a parameter in the URL when redirecting to the page.
Configuring the Manual Web Type Task:
In the Template Builder, add a new task of type Content Type Task to your workflow. Once it's added, click on the Edit menu icon on the top left corner of the task. The following image is the edit dialog for setting the Manual Web task properties.

The handler would be the URL you want the user assigned to this task to be redirected to. The URL the user is redirected to will automatically have the queue_id (unique task id the engine has assigned) or the site-wide token. This is all that is required to access the maestro engine API to complete the task, access task properties, workflow properties or set the task status.
It is 100% up to the manual web task's ultimate endpoint to complete the task via the Maestro API. The workflow will not continue until the Manual Web Task's endpoint has completed the task.
Maestro API to complete a task:
An example use of the Maestro API to complete the task. Calling the completeTask API will by default set the task status to SUCCESS. It's optional to pass in the User ID to completeTask method but useful to see the user name in the workflow history.
//Get the Queue ID from the URL if you're not using sitewide tokens:
$queueID = \Drupal::request()->query->get('queueid', '');
//If you are using a site-wide token, get the queueID from the token:
$config = \Drupal::config('maestro.settings');
$sitewideToken = $config->get('maestro_sitewide_token');
if($sitewideToken != '') {
$tokenValue = \Drupal::request()->query->get($sitewideToken, '');
$tokenValue = \Drupal\Component\Utility\Html::escape($tokenValue);
if($tokenValue != '') {
$queueID = MaestroEngine::getQueueIdFromToken($tokenValue);
}
}
MaestroEngine::completeTask($queueID, \Drupal::currentUser()->id());
MaestroEngine::setTaskStatus($queueID, TASK_STATUS_CANCEL);You may want to use a different status and have an IF Task in the workflow after this task to branch depending on the completion status of this task. As a reminder here are the workflow status constants.
//Maestro queue status codes for task execution status
const TASK_STATUS_ACTIVE = 0;
const TASK_STATUS_SUCCESS = 1;
const TASK_STATUS_CANCEL = 2;
const TASK_STATUS_HOLD = 3;
const TASK_STATUS_ABORTED = 4;Help improve this page
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion