Questions and discussion about using ProcessMaker: user interface, running cases & functionality
#812518
Hi
In version 3.x after import process and select "Update the current process, overwriting all tasks and steps" all users tasks will be erased... and keeps groups...
But in version 2.x after import process, keeps all users and groups...

Before import process
1.PNG
1.PNG (22.31 KiB) Viewed 3448 times
After import process
2.PNG
2.PNG (22.71 KiB) Viewed 3448 times
#812536
Unfortunately, it works that way when overwriting BPMN processes. Please file a bug report about it if you want it to be changed.

(Unfortunately, most of my bug reports are ignored if I don't provide the code to fix the problem in the bug report.)
#812537
Thanks amos

In version 2
File:\processmaker\workflow\engine\methods\processes\processes_Import_Ajax.php
Call mergeExistingUsers function for merge exist user and new user...
version2.PNG
version2.PNG (161.68 KiB) Viewed 3429 times
In version 3
File:\processmaker\htdocs\workflow\engine\methods\processes\processes_Import_Ajax.php
Call
Code: Select all
$importer->import($option, $optionGroup, false, $objectsToImport);
version 3 call.PNG
version 3 call.PNG (164.33 KiB) Viewed 3429 times
File:D:\processmaker-3.2.1-x\apps\processmaker\htdocs\workflow\engine\src\ProcessMaker\Importer\Importer.php
Call function $this->removeProject(); that removeProject...
version3.PNG
version3.PNG (136.1 KiB) Viewed 3429 times
Unfortunately updateProject is empty :cry:
update.PNG
update.PNG (122.92 KiB) Viewed 3429 times
#812550
Hi

I write this code for append current user process to pmx uploaded file...
File:\apps\processmaker\htdocs\workflow\engine\methods\processes\processes_Import_Ajax.php line 138
Code: Select all
			//append current user to new xml file
			G::LoadClass('wsBase');
			$xmldoc = simplexml_load_file(PATH_DOCUMENT . "input" . PATH_SEP . $_POST["PRO_FILENAME"]);
			$pro_uid = (string)$xmldoc->xpath('//meta[@key="uid"]')[0];
			$task_users=executeQuery("SELECT u.*
						FROM task t inner join task_user u on t.TAS_UID=u.TAS_UID
						WHERE t.PRO_UID='{$pro_uid}'");
						
			if(!empty($task_users)){
				$task_users_node = $xmldoc->xpath('//table[@name="taskusers"]')[0];
				foreach($task_users as $R){
					$record=$task_users_node->addChild('record');
					$record->addChild('tas_uid',$R["TAS_UID"]);
					$record->addChild('usr_uid',$R["USR_UID"]);
					$record->addChild('tu_type',$R["TU_TYPE"]);
					$record->addChild('tu_relation',$R["TU_RELATION"]);
				}	
				$xmldoc->asXML(PATH_DOCUMENT . "input" . PATH_SEP . $_POST["PRO_FILENAME"]); 				
			}
			//================================
t1.PNG
t1.PNG (183 KiB) Viewed 3419 times

🚀 Tauchen Sie mit Immediate Alora AI in die Welt d[…]

Do you want a quick way to delete passwords from P[…]

Try the CloudMigration PST Converter to convert […]

In the rapidly evolving world of online sports be[…]