You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
1.1 KiB
37 lines
1.1 KiB
<?php
|
|
class EndNodeHandler{
|
|
|
|
private $currentNode;
|
|
private $flowContext;
|
|
private $formData;
|
|
function __construct($node,FlowContext $Context,$formData){
|
|
$this->currentNode=$node;
|
|
$this->flowContext=$Context;
|
|
$this->formData=$formData;
|
|
}
|
|
/**
|
|
* 根据传入FlowNode节点的中的Code 更新Flow表
|
|
*/
|
|
function doWork(){
|
|
|
|
//作为一般流程节点处理
|
|
$handler=new FlowNodeHandler( $this->currentNode,$this->flowContext,$this->formData);
|
|
$handler->doWork();
|
|
|
|
#删除流程上的所有任务
|
|
$task = new NodeTask();
|
|
$task->setFormKey($this->flowContext->getFormKey());
|
|
$tasks = TaskManager::getTasks($task);
|
|
foreach ($tasks as $task) {
|
|
$taskCreator = $task->getCreator();
|
|
if ($taskCreator == $this->flowContext->getNextAssigner()) {
|
|
$task->delete();
|
|
}
|
|
}
|
|
// Flow::updateFlowCode( $this->flowContext->formKey,$this->currentNode->getFlowCode());
|
|
|
|
// Subflow::updateCurrentUser($this->flowContext->formKey,$this->flowContext->nextAssigner);
|
|
|
|
}
|
|
|
|
}
|