Questions and discussion about using ProcessMaker 2: user interface, running cases and functionality
Forum rules: Please search to see if a question has already been asked before posting. Please don't ask the same question in multiple forums.
By askylh
#783123
hi all

i Need help to do a simple 2 step process

Step1 load an image file in a dynaform
Step2 view this image in a dynaform

thanks
Last edited by askylh on Mon Jun 29, 2015 10:16 am, edited 1 time in total.
By askylh
#783140
hi,

So i must fill the src properties.

How can i retrieve this src path from the loaded document in the prior task ?

thanks
By khoer52
#783149
Hi all!

I have tried to fill the src with url to image in ProcessMaker server itself.
But when i run the case, it shows like broken image.

If i fill the src with image url from google, there is no problem.
Is this field cannot read url from it's server? Or is there any permission problem?
Attachments
Selection_067.png
The image is showed like broken image
Selection_067.png (5.3 KiB) Viewed 10626 times
Selection_068.png
i fill the src with url to image in ProcessMaker server
Selection_068.png (16.83 KiB) Viewed 10626 times
By askylh
#783180
hi,

Same for me.
i also need to insert this image in an ouput document, an i need a source path.

ok so the real main question is :

how can we retrieve the source path for image documents upload in the process.

thanks
By askylh
#783214
Hi,

i found this : http://wiki.processmaker.com/index.php/ ... s_with_PHP

Load image ----> view image are my just two task process.

i got a file field in the dynaform load (used in load task) : uploadFile
i put the trigger on the before assignment of next user on the load image task .

this code is never fired true : if (!empty(trim(@@uploadFile))) like if @@uploadFile was not link to the name of the file field

thanks for help

here is the complete code :
Code: Select all
PMFAddCaseNote (@@APPLICATION,@@PROCESS,@@TASK,@@USER_LOGGED,'Before Trigger');
if (!empty(trim(@@uploadFile)))
 {    
    //assign to normal PHP variables, so can be inserted in strings:
    $invoiceFile = @@uploadFile;
    $caseId = @@APPLICATION;
    //query to find the assigned UID for the uploaded file:
    $query = "SELECT APP_DOC_UID FROM CONTENT C, APP_DOCUMENT AD " .  
       "WHERE C.CON_VALUE = '$invoiceFile' AND " .
       "AD.APP_DOC_UID = C.CON_ID AND AD.APP_UID = '$caseId'"; 
    $result = executeQuery($query);
 	
	PMFAddCaseNote (@@APPLICATION,@@PROCESS,@@TASK,@@USER_LOGGED,'After result');
	
    if (is_array($result) and count($result) > 0)
    {
       $filePath = "/opt/processmaker/shared/sites/workflow/files/$caseId/" .
          $result[1]['APP_DOC_UID'] . '_1.' . pathinfo($invoiceFile, PATHINFO_EXTENSION);
   
		@@imagePath = $filePath;
      
    }
 }
By askylh
#783564
hi,

what you need :
variable = imagePath,
input document tagged INPUT
dynaform : with an imageField and src set to @@imagePath
a trigger : code below
2 tasks
task1 : set step to input document
task2 : set step to the dynaform and the trigger BEFORE load dynaform

hope it helps
Code: Select all
$caseId = @@APPLICATION;


$query = "SELECT APP_DOC_UID FROM APP_DOCUMENT WHERE APP_UID='$caseId' AND APP_DOC_TYPE='INPUT' AND APP_DOC_STATUS='ACTIVE'";

$result = executeQuery($query);

if (is_array($result) and count($result) > 0) 
{
   @@imagePath = '../cases/cases_ShowDocument?a=' . $result[1]['APP_DOC_UID'];
}
By nicpan
#785167
askylh wrote:hi,

what you need :
variable = imagePath,
input document tagged INPUT
dynaform : with an imageField and src set to @@imagePath
a trigger : code below
2 tasks
task1 : set step to input document
task2 : set step to the dynaform and the trigger BEFORE load dynaform

hope it helps
Code: Select all
$caseId = @@APPLICATION;


$query = "SELECT APP_DOC_UID FROM APP_DOCUMENT WHERE APP_UID='$caseId' AND APP_DOC_TYPE='INPUT' AND APP_DOC_STATUS='ACTIVE'";

$result = executeQuery($query);

if (is_array($result) and count($result) > 0) 
{
   @@imagePath = '../cases/cases_ShowDocument?a=' . $result[1]['APP_DOC_UID'];
}
Hi askylh!
You can write input document for me and take a photo.(I am a beginer, so I cannot know how to write input document in this situation).

Thanks,
nicpan

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

Experience heightened pleasure with Cenforce 100 M[…]

Get an instant solution to move emails to MBOX for[…]

Most Demanding OST to PST Converter

The most demanding OST to PST Converter is TrijaT[…]