Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.

Moderator: ArturoRobles

Forum rules: Please search to see if a question has already asked before creating a new topic. Please don't post the same question in multiple forums.

I am currently having trouble displaying the title of the project on the output document when receiving it as a pdf. The data also does not appear inside the pdf. I am uncertain if it's an issue with the database or if the trigger is wrong. Has anyone encountered this issue?

The trigger for sending an email with the output document

$docId = '315355263615cb11e95f7e9005773565'; //set to the Output Document's unique ID
$caseId = @@APPLICATION;
$aNewDoc = executeQuery($sql);

if (empty($aNewDoc)) {
throw new Exception("Error: Unable to generate Output Document with ID '$docId'.");
else {
$fileId = $aNewDoc[1]['APP_DOC_UID'];
$oDoc = new AppDocument();
$aDocInfo = $oDoc->load($fileId);
$ext = '.pdf'; //set to '.doc' if sending a DOC file
$g = new G();
$pathToFile = PATH_DOCUMENT . $g->getPathFromUID(@@APPLICATION) . PATH_SEP . 'outdocs' .
PATH_SEP . @@Placa .
PATH_SEP . $fileId . '_' . $aDocInfo['DOC_VERSION'] . $ext;
$filename = $aDocInfo['APP_DOC_FILENAME'] . $ext;
$aAttachments = array(
$filename => $pathToFile

$to = ''

@@msg = PMFSendMessage(@@APPLICATION, '', $to, '', '',
'Testing Subject', 'email_Info.html', array(), $aAttachments);

Thank you
Title does not appear.PNG
Title does not appear.PNG (4.14 KiB) Viewed 831 times
phpMyAdmin not displaying the output document title.PNG
phpMyAdmin not displaying the output document title.PNG (26.02 KiB) Viewed 831 times
Output Document Title.PNG
Output Document Title.PNG (26.03 KiB) Viewed 831 times
Hello, I don't know how to help. Some how can you try to follow the ProcessMaker document in below to see if able to fix your issues. As your code is slightly different from the official doc. So worthy to try:

doc link:
also see attached screenshot:

Also note that:
1/ you got $filename = $aDocInfo['APP_DOC_FILENAME'] . $ext; //.pdf only > meant $aDocInfo['APP_DOC_FILENAME'] not work
2/ Try to use the SELECT statement from the official doc or see my attached

Anyway, good luck..
PM364_email-generated-output-doc.png (77.45 KiB) Viewed 812 times

Process maker is furnished for the room for all st[…]

adidas continental 80 uomo bianche è senza […]

The nike blazer mid 77 women's black is another st[…]

air jordan 1 low wolf grey

Ved at slutte sig til sin "Ideas That Connect[…]