PM-00000 "Fix in class Bpmn.php and cases_Step.php" SOLVED
Issue:
- Problems in method Bpmn::getElementsBetweenElementOriginAndElementDest
- Problems in cases_Step.php with OutputDocuments
Cause:
- No control of repetitive loop in method Bpmn::getElementsBetweenElementOriginAndElementDest
- No defined variables DEL_INDEX and TAS_UID
Solution:
- Added validation for the control of repetitive loop in method Bpmn::getElementsBetweenElementOriginAndElementDest
- Defined variables DEL_INDEX and TAS_UID
This commit is contained in:
@@ -160,16 +160,15 @@ if ($flagExecuteBeforeTriggers) {
|
|||||||
if (! isset( $_SESSION['_NO_EXECUTE_TRIGGERS_'] )) {
|
if (! isset( $_SESSION['_NO_EXECUTE_TRIGGERS_'] )) {
|
||||||
//Execute before triggers - Start
|
//Execute before triggers - Start
|
||||||
$Fields['APP_DATA'] = $oCase->ExecuteTriggers( $_SESSION['TASK'], $_GET['TYPE'], $_GET['UID'], 'BEFORE', $Fields['APP_DATA'] );
|
$Fields['APP_DATA'] = $oCase->ExecuteTriggers( $_SESSION['TASK'], $_GET['TYPE'], $_GET['UID'], 'BEFORE', $Fields['APP_DATA'] );
|
||||||
$Fields['DEL_INDEX'] = $_SESSION['INDEX'];
|
|
||||||
$Fields['TAS_UID'] = $_SESSION['TASK'];
|
|
||||||
//Execute before triggers - End
|
//Execute before triggers - End
|
||||||
} else {
|
} else {
|
||||||
unset( $_SESSION['_NO_EXECUTE_TRIGGERS_'] );
|
unset( $_SESSION['_NO_EXECUTE_TRIGGERS_'] );
|
||||||
$Fields['DEL_INDEX'] = $_SESSION['INDEX'];
|
|
||||||
$Fields['TAS_UID'] = $_SESSION['TASK'];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$Fields["DEL_INDEX"] = $_SESSION["INDEX"];
|
||||||
|
$Fields["TAS_UID"] = $_SESSION["TASK"];
|
||||||
|
|
||||||
if (isset( $_GET['breakpoint'] )) {
|
if (isset( $_GET['breakpoint'] )) {
|
||||||
$_POST['NextStep'] = $_SESSION['TRIGGER_DEBUG']['BREAKPAGE'];
|
$_POST['NextStep'] = $_SESSION['TRIGGER_DEBUG']['BREAKPAGE'];
|
||||||
}
|
}
|
||||||
@@ -518,7 +517,7 @@ try {
|
|||||||
$util = new Java( "com.processmaker.util.pmutils" );
|
$util = new Java( "com.processmaker.util.pmutils" );
|
||||||
$util->setInputPath( $javaInput );
|
$util->setInputPath( $javaInput );
|
||||||
$util->setOutputPath( $javaOutput );
|
$util->setOutputPath( $javaOutput );
|
||||||
|
|
||||||
G::LoadSystem('inputfilter');
|
G::LoadSystem('inputfilter');
|
||||||
$filter = new InputFilter();
|
$filter = new InputFilter();
|
||||||
|
|
||||||
@@ -553,17 +552,17 @@ try {
|
|||||||
$util = new Java( "com.processmaker.util.pmutils" );
|
$util = new Java( "com.processmaker.util.pmutils" );
|
||||||
$util->setInputPath( $javaInput );
|
$util->setInputPath( $javaInput );
|
||||||
$util->setOutputPath( $javaOutput );
|
$util->setOutputPath( $javaOutput );
|
||||||
|
|
||||||
G::LoadSystem('inputfilter');
|
G::LoadSystem('inputfilter');
|
||||||
$filter = new InputFilter();
|
$filter = new InputFilter();
|
||||||
|
|
||||||
$locationFrom = PATH_DYNAFORM . $aOD['PRO_UID'] . PATH_SEP . $aOD['OUT_DOC_UID'] . '.pdf';
|
$locationFrom = PATH_DYNAFORM . $aOD['PRO_UID'] . PATH_SEP . $aOD['OUT_DOC_UID'] . '.pdf';
|
||||||
$locationFrom = $filter->validateInput($locationFrom, "path");
|
$locationFrom = $filter->validateInput($locationFrom, "path");
|
||||||
copy( $locationFrom, $javaInput . $aOD['OUT_DOC_UID'] . '.pdf' );
|
copy( $locationFrom, $javaInput . $aOD['OUT_DOC_UID'] . '.pdf' );
|
||||||
|
|
||||||
$outputFile = $javaOutput . $sFilename . '.pdf';
|
$outputFile = $javaOutput . $sFilename . '.pdf';
|
||||||
print $util->writeVarsToAcroFields( $aOD['OUT_DOC_UID'] . '.pdf', $xmlData );
|
print $util->writeVarsToAcroFields( $aOD['OUT_DOC_UID'] . '.pdf', $xmlData );
|
||||||
|
|
||||||
$locationFrom = $javaOutput . $aOD['OUT_DOC_UID'] . '.pdf';
|
$locationFrom = $javaOutput . $aOD['OUT_DOC_UID'] . '.pdf';
|
||||||
$locationFrom = $filter->validateInput($locationFrom, "path");
|
$locationFrom = $filter->validateInput($locationFrom, "path");
|
||||||
copy( $locationFrom, $pathOutput . $sFilename . '.pdf' );
|
copy( $locationFrom, $pathOutput . $sFilename . '.pdf' );
|
||||||
|
|||||||
@@ -83,6 +83,7 @@ class Bpmn extends Handler
|
|||||||
"lane" => array("BOU_ELEMENT_TYPE", "BOU_SIZE_IDENTICAL", "BOU_UID")
|
"lane" => array("BOU_ELEMENT_TYPE", "BOU_SIZE_IDENTICAL", "BOU_UID")
|
||||||
);
|
);
|
||||||
|
|
||||||
|
private $arrayElementOriginChecked = array();
|
||||||
|
|
||||||
public function __construct($data = null)
|
public function __construct($data = null)
|
||||||
{
|
{
|
||||||
@@ -1378,6 +1379,13 @@ class Bpmn extends Handler
|
|||||||
$index
|
$index
|
||||||
) {
|
) {
|
||||||
try {
|
try {
|
||||||
|
if (isset($this->arrayElementOriginChecked[$elementOriginUid]) && $this->arrayElementOriginChecked[$elementOriginUid] == $elementOriginType) {
|
||||||
|
//Return
|
||||||
|
return array();
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->arrayElementOriginChecked[$elementOriginUid] = $elementOriginType;
|
||||||
|
|
||||||
if ($elementOriginType == $elementDestType && $elementOriginUid == $elementDestUid) {
|
if ($elementOriginType == $elementDestType && $elementOriginUid == $elementDestUid) {
|
||||||
$arrayEvent = array();
|
$arrayEvent = array();
|
||||||
$arrayEvent[$index] = array($elementDestUid, $elementDestType);
|
$arrayEvent[$index] = array($elementDestUid, $elementDestType);
|
||||||
@@ -1403,7 +1411,7 @@ class Bpmn extends Handler
|
|||||||
$index + 1
|
$index + 1
|
||||||
);
|
);
|
||||||
|
|
||||||
if (count($arrayEvent) > 0) {
|
if (!empty($arrayEvent)) {
|
||||||
$arrayEvent[$index] = array($elementOriginUid, $elementOriginType);
|
$arrayEvent[$index] = array($elementOriginUid, $elementOriginType);
|
||||||
|
|
||||||
//Return
|
//Return
|
||||||
@@ -1431,6 +1439,8 @@ class Bpmn extends Handler
|
|||||||
$arrayEventType = array("END", "INTERMEDIATE");
|
$arrayEventType = array("END", "INTERMEDIATE");
|
||||||
$arrayEventMarker = array("MESSAGETHROW");
|
$arrayEventMarker = array("MESSAGETHROW");
|
||||||
|
|
||||||
|
$this->arrayElementOriginChecked = array();
|
||||||
|
|
||||||
$arrayEventAux = $this->getElementsBetweenElementOriginAndElementDest(
|
$arrayEventAux = $this->getElementsBetweenElementOriginAndElementDest(
|
||||||
$elementOriginUid,
|
$elementOriginUid,
|
||||||
$elementOriginType,
|
$elementOriginType,
|
||||||
|
|||||||
Reference in New Issue
Block a user