diff --git a/presentation/lookAndFeel/knowledgeTree/documentmanagement/documentWorkflow.php b/presentation/lookAndFeel/knowledgeTree/documentmanagement/documentWorkflow.php index 1aa66e2..557e756 100644 --- a/presentation/lookAndFeel/knowledgeTree/documentmanagement/documentWorkflow.php +++ b/presentation/lookAndFeel/knowledgeTree/documentmanagement/documentWorkflow.php @@ -47,6 +47,7 @@ class DocumentWorkflowDispatcher extends KTStandardDispatcher { $oWorkflow = KTWorkflowUtil::getWorkflowForDocument($oDocument); $oWorkflowState = KTWorkflowUtil::getWorkflowStateForDocument($oDocument); + $oUser =& User::get($_SESSION['userID']); $aTransitions = KTWorkflowUtil::getTransitionsForDocumentUser($oDocument, $oUser); $aWorkflows = KTWorkflow::getList(); @@ -68,6 +69,16 @@ class DocumentWorkflowDispatcher extends KTStandardDispatcher { array('fDocumentID' => $oDocument->getID())); exit(0); } + + function do_performTransition() { + $oDocument =& $this->oValidator->validateDocument($_REQUEST['fDocumentId']); + $oTransition =& $this->oValidator->validateWorkflowTransition($_REQUEST['fTransitionId']); + $sComments =& $this->oValidator->notEmpty($_REQUEST['fComments']); + $oUser =& User::get($_SESSION['userID']); + $res = KTWorkflowUtil::performTransitionOnDocument($oTransition, $oDocument, $oUser, $sComments); + $this->successRedirectToMain('Transition performed', + array('fDocumentID' => $oDocument->getID())); + } } $oDispatcher = new DocumentWorkflowDispatcher;