Monday 02 June 2008 6:06:56 am
Heya all, I've got the following setup: <b>Trigger 1</b>: BEFORE Publish - triggers: Workflow 1 <b>Workflow 1</b>: multiplexer event to 'filter' items of one class - run Workflow 2 on these
<b>Workflow 2</b>: - do my CustomEventType and then finish the publishing My CustomEventType is:
function execute( &$process, &$event )
{
$http =& eZHTTPTool::instance();
if($http->hasPostVariable("done"))
{
return EZ_WORKFLOW_TYPE_STATUS_ACCEPTED;
}
else
{
$requestURI = eZSys::requestURI();
$process->Template = array();
$process->Template['templateName'] = 'design:workflow_event.tpl';
$process->Template['templateVars'] = array ( 'event' => $event );
return EZ_WORKFLOW_TYPE_STATUS_FETCH_TEMPLATE_REPEAT;
}
}
Template code:
<form method="post">
<input type="hidden" name="done" />
<input type="submit" name="submit" value="Done with this workflow" />
</form>
The template is loaded fine, but after I hit the button, it returns to the edit form where I can edit the news item again. This probably has something to do with the <form ...> tag. How can I make sure that submitting the form will not lead to a step back in the workflow, but in a step forward?
Greets, Clemens
|