Questions and discussion about using ProcessMaker: user interface, running cases & functionality
#817545
Hi,
This error is coming up sometimes but quite often, and I can't identify the pattern that causes it!
It is critical because the case stops.
I have a parallel task where PMFNewcase() is called for every row of the grid, generating an asyncronous case.
Every parallel user has a different grid.
After all parallel user finish, the process continues to a new task. This task waits for the the cases generated by PMFNewcase() to finish. As soon as one of these cases are finished, the task at the main process can process it and waits for the others.
Version 3.2.1 Community, MySQL 5.5.61, PHP 5.5.37
Thanks for any help.
err_pm.PNG
err_pm.PNG (24.52 KiB) Viewed 4280 times
#817549
From the error messages, it looks like ProcessMaker is trying to export a grid to a Report Table, but your grid doesn't have any value for the datetime field in the grid, so it causes an error.

You might have an error in the definition of your Report Table where it says that there is a datetime field which doesn't exist in the grid. This might happen if you deleted the datetime field from the grid. You can try deleting the Report Table and creating a new one. You might also get this error if you are manually defining your grid variable in a trigger and you forgot to include the datetime field in the array.
#817565
Hi Amos,
Thank you very much for your prompt answer.
The grid has the column date set...
Now I recall that on the source grid I had 2 rows and then only one appears on the destination grid. I'm using a trigger (see below) to update the destination grid, the one that I have the Report table. This trigger is being called on the "before routing". I don't know why, but there is some bug when I'm filling up the source grid (some field not being updated!?) which causes that the last row is not appearing on the destination grid! But somehow, the engine is still counting on with this "disappeared" row, and the error comes up!

This is not happening always. It is only on specific cases that I couldn't figure it out yet!
Code: Select all
if (!isset(@=gridAssessDivisions) or !is_array(@=gridAssessDivisions)) {
	@=gridAssessDivisions = array();
}
if (!isset(@=gridDivision) or !is_array(@=gridDivision)) {
	@=gridDivision = array();
}

$i = count(@=gridAssessDivisions);
//if the user has already entered data, then overwrite the existing row in grid
for ($j = 1; $j <= count(@=gridDivision); $j++) {
	$dup = False;
	for ($z = 1; $z <= count(@=gridAssessDivisions); $z++) {
	   if (@=gridAssessDivisions[$z]['SerialNumber'] == @=gridDivision[$j]['SerialNumber']) {
		 	$dup = True;
		   	break;
	   }
	}
	if ($dup != True) {
		$i++;
	} 
	@=gridAssessDivisions[$i]['userId'] = @@USER_LOGGED;
	@=gridAssessDivisions[$i]['Division'] = @@Division;
	@=gridAssessDivisions[$i]['AssessDate'] = @@DivAssessDate;
	@=gridAssessDivisions[$i]['Title'] = @=gridDivision[$j]['Title'];
	@=gridAssessDivisions[$i]['SerialNumber'] = @=gridDivision[$j]['SerialNumber'];
	@=gridAssessDivisions[$i]['TypeOfService'] = @=gridDivision[$j]['TypeOfService'];
	@=gridAssessDivisions[$i]['Approval'] = @=gridDivision[$j]['Approval'];
	@=gridAssessDivisions[$i]['ServiceLocal'] = @=gridDivision[$j]['ServiceLocal'];
	@=gridAssessDivisions[$i]['Note'] = @=gridDivision[$j]['Note'];
}
Thanks again.
#817639
Thanks Amos.
The algorithm seems ok to me. I am wondering about the fact that I'm calling this Trigger on "before routing" and at this moment the variable @@DivAssessDate is no longer loaded, and because of that some error occurs at the engine. I noticed that the @@USER_LOGGED is empty!
I will add this code:
if (isset(@@DivAssessDate)){
@=gridAssessDivisions[$i]['AssessDate'] = @@DivAssessDate;
}
but I don't know how to test it as I have no idea about what is happening!
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[…]