Questions and discussion about using ProcessMaker: user interface, running cases & functionality
#815186
Hi
ProcessMaker hanging after i change item in process like insert or move and drag item or drag flow(lines).
i testing many computers and like this.
i install latest procesmaker and not help me.
i attached myprocess.pmx file

please help.
Thanks for Helping
Attachments
(340.9 KiB) Downloaded 231 times
#815209
I could not view your process when I tried to import it in version 3.2.1 community. I have seen this problem before in processes which use pools and lanes.

I don't know of any way to recover your process. The only solution is to recreate the process without pools lanes. The only reason to use pools is if you need interprocess communication, which almost nobody uses, so it is best to not use them.
#815213
amosbatto wrote: Wed Jul 18, 2018 12:39 am I could not view your process when I tried to import it in version 3.2.1 community. I have seen this problem before in processes which use pools and lanes.

I don't know of any way to recover your process. The only solution is to recreate the process without pools lanes. The only reason to use pools is if you need interprocess communication, which almost nobody uses, so it is best to not use them.
Thanks for answering me.
i tested this way but did not work.
if i disabled auto save process Work's??
attached new myProcess file and capture of your way i used.
Attachments
(327.46 KiB) Downloaded 266 times
myProcess_Before_screenCapture.png
myProcess_Before_screenCapture.png (104.11 KiB) Viewed 4204 times
myProcess_After_screenCapture.png
myProcess_After_screenCapture.png (122.34 KiB) Viewed 4204 times
#815231
Thanks.
but this way not work.
i changed memory limit.
and i disabled :
//PMDesigner.project.setSaveInterval(40000);
and this is not work and auto save Was active after change this line.
=================================
why after i move or drag items this takes so long and??
what is this file?
is this my problem?
================
i created new process and insert many items and hanged after i drag and move item in processmaker latest version.
Attachments
Untitled.png
Untitled.png (143.23 KiB) Viewed 4187 times
#815283
Hi coworker the problem seems to be found and solved mostly by some modifications.
The survey done on ProcessMaker v3.2.1.0 .
After profiling js cpu timing that you can see here:
2.jpg
Js Profiling
2.jpg (105.13 KiB) Viewed 4146 times
I found tow suspect!
First I disable lane updates on move and drop on line 84940:
Code: Select all
PMLane.prototype.updateAllRelatedDimensions = function (avoidWeight) {
    //this.parent.updateAllLaneDimension(avoidWeight);
    //this.parent.paint();
    return this;
};


Then add a timer to prevent fast re-rendering on move on line of 71824 :
Code: Select all
PMCustomShapeDragBehavior.prototype.updateAndRepaintPositions = function (options) {
	clearTimeout(this.updateTimeout);
	this.updateTimeout=setTimeout(function(){
		var j,
			port,
			connection,
			customShape = options.customShape,
			sibling = options.sibling;
		// move the segments of this connections
		for (j = 0; j < customShape.canvas.sharedConnections.getSize(); j += 1) {
			connection = customShape.canvas.sharedConnections.get(j);
			if (connection.srcPort.parent.getID() ===
				sibling.getID()) {
				// to avoid moving the connection twice
				// (two times per shape), move it only if the shape
				connection.move(options.diffX * customShape.canvas.zoomFactor,
					options.diffY * customShape.canvas.zoomFactor);
			}
		}
		for (j = 0; j < sibling.ports.getSize(); j += 1) {
			//for each port update its absolute position and repaint its connection
			port = sibling.ports.get(j);
			connection = port.connection;
			port.setPosition(port.x, port.y);

			if (!customShape.canvas.sharedConnections.contains(connection)) {
				connection
					.setSegmentColor(PMUI.util.Color.GREY, false)
					.setSegmentStyle("regular", false)// repaint:  false
					.disconnect()
					.connect();
			}
		}
		},300);
};
and line of 72010:
Code: Select all
PMCustomShapeDragBehavior.prototype.onDragEnd = function (customShape) {
	
    var command,
        self = this;
    return function (e, ui) {
		clearTimeout(self.dragTimeout);
		self.dragTimeout=setTimeout(function(){
			 // call to dragEnd procedure
			self.dragEndProcedure(customShape, true, e, ui);
			customShape.dragging = false;
			// hide the snappers
			customShape.canvas.verticalSnapper.hide();
			customShape.canvas.horizontalSnapper.hide();
			if (!customShape.changedContainer) {
				if (customShape.parent.getType() === 'PMLane') {
					command = new PMCommandMoveInLane(customShape.canvas.currentSelection);
				} else {
					command = new PMUI.command.CommandMove(customShape.canvas.currentSelection);
				}
				command.execute();
				customShape.canvas.commandStack.add(command);
			}
			customShape.changedContainer = false;
			// decrease the zIndex of the oldParent of customShape
			customShape.decreaseParentZIndex(customShape.oldParent);
			// force to apply zoom, when move more than two figures
			if (customShape.getCanvas().getCurrentSelection().getSize() > 1) {
				customShape.getCanvas().applyZoom(customShape.getCanvas().getZoomPropertiesIndex() + 1);
			}
			customShape.getCanvas().emptyCurrentSelection();
		},300);
       
    };
};
And after applying those changes the designer works and it is responsive when move objects on complex processes.

you get the final modified js here:
final file
(5.74 MiB) Downloaded 239 times
Have Fun :D
Attachments
CPU Profile Dump for chrome
(994.86 KiB) Downloaded 237 times
Last edited by mk8800 on Mon Jul 23, 2018 3:23 am, edited 1 time in total.
#815284
mk8800 wrote: Sun Jul 22, 2018 11:18 am Hi coworker the problem seems to be found and solved mostly by some modifications.
The survey done on ProcessMaker v3.2.1.0 .
After profiling js cpu timing that you can see here:
2.jpg
I found tow suspect!
First I disable lane updates on move and drop on line 84940:
Code: Select all
PMLane.prototype.updateAllRelatedDimensions = function (avoidWeight) {
    //this.parent.updateAllLaneDimension(avoidWeight);
    //this.parent.paint();
    return this;
};


Then add a timer to prevent fast re-rendering on move on line of 71824 :
Code: Select all
PMCustomShapeDragBehavior.prototype.updateAndRepaintPositions = function (options) {
	clearTimeout(this.updateTimeout);
	this.updateTimeout=setTimeout(function(){
		var j,
			port,
			connection,
			customShape = options.customShape,
			sibling = options.sibling;
		// move the segments of this connections
		for (j = 0; j < customShape.canvas.sharedConnections.getSize(); j += 1) {
			connection = customShape.canvas.sharedConnections.get(j);
			if (connection.srcPort.parent.getID() ===
				sibling.getID()) {
				// to avoid moving the connection twice
				// (two times per shape), move it only if the shape
				connection.move(options.diffX * customShape.canvas.zoomFactor,
					options.diffY * customShape.canvas.zoomFactor);
			}
		}
		for (j = 0; j < sibling.ports.getSize(); j += 1) {
			//for each port update its absolute position and repaint its connection
			port = sibling.ports.get(j);
			connection = port.connection;
			port.setPosition(port.x, port.y);

			if (!customShape.canvas.sharedConnections.contains(connection)) {
				connection
					.setSegmentColor(PMUI.util.Color.GREY, false)
					.setSegmentStyle("regular", false)// repaint:  false
					.disconnect()
					.connect();
			}
		}
		},300);
};
and line of 72010:
Code: Select all
PMCustomShapeDragBehavior.prototype.onDragEnd = function (customShape) {
	
    var command,
        self = this;
    return function (e, ui) {
		clearTimeout(self.dragTimeout);
		self.dragTimeout=setTimeout(function(){
			 // call to dragEnd procedure
			self.dragEndProcedure(customShape, true, e, ui);
			customShape.dragging = false;
			// hide the snappers
			customShape.canvas.verticalSnapper.hide();
			customShape.canvas.horizontalSnapper.hide();
			if (!customShape.changedContainer) {
				if (customShape.parent.getType() === 'PMLane') {
					command = new PMCommandMoveInLane(customShape.canvas.currentSelection);
				} else {
					command = new PMUI.command.CommandMove(customShape.canvas.currentSelection);
				}
				command.execute();
				customShape.canvas.commandStack.add(command);
			}
			customShape.changedContainer = false;
			// decrease the zIndex of the oldParent of customShape
			customShape.decreaseParentZIndex(customShape.oldParent);
			// force to apply zoom, when move more than two figures
			if (customShape.getCanvas().getCurrentSelection().getSize() > 1) {
				customShape.getCanvas().applyZoom(customShape.getCanvas().getZoomPropertiesIndex() + 1);
			}
			customShape.getCanvas().emptyCurrentSelection();
		},300);
       
    };
};
And after applying those changes the designer works and it is responsive when move objects on complex processes.

you get the final modified js here:
mafe-92a59a3-cc19932.js

Have Fun :D

Hey
Thanks buddy This is worked for me.
you are the best :roll:
excellent
Want to create your own meme coin?

In the world of cryptocurrencies, a unique and exc[…]

The market for cryptocurrencies is demonstrating a[…]

What's SAP FICO?

Embarking on a dissertation can be one of the most[…]

Hello. For rental housing, there are software solu[…]