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.
28 lines
670 B
28 lines
670 B
<?php
|
|
|
|
class StartNodeHandler
|
|
{
|
|
|
|
private $currentNode;
|
|
private $flowContext;
|
|
|
|
function __construct($node, FlowContext $Context)
|
|
{
|
|
$this->currentNode = $node;
|
|
$this->flowContext = $Context;
|
|
}
|
|
|
|
/**
|
|
* 根据传入FlowNode节点的中的Code 更新Flow表
|
|
*/
|
|
function doWork()
|
|
{
|
|
# echo " StartNodeHandler 31:".$this->flowContext->getFormKey();
|
|
$flow = new Flow ($this->flowContext->getFormKey());
|
|
$flow->setFlowCode($this->currentNode->getFlowCode())->save();
|
|
$subflow = new Subflow($flow);
|
|
$subflow->setCurrentUser($this->flowContext->getNextAssigner())->insert();
|
|
|
|
}
|
|
|
|
}
|