- Fri Dec 08, 2017 4:14 pm
#812488
I have a process that includes an input document and has a dynaform with a file field on it. The file field has a variable tied to the input document. I use REST to create a case and then use REST to upload the input document into the case. That all works as expected. I then try to set the variable in the case with the UID for the uploaded document (actually, an array with a single string which is the UID) and set the variable plus a _label suffix to the file name (actually, an array with a single string which is the filename). When I go into the form however, I expect to see the file linked in there, and it is not. What am I missing?
Here is the result of the Upload:
{"app_doc_uid":"9478154835a29b5a32eb0c9016093062","app_doc_filename":"0216001304.jpg","doc_uid":"2085262685a1fe190b72e10068083144","app_doc_version":"1","app_doc_create_date":"2017-12-07 16:41:55","app_doc_create_user":"admin, Administrator (admin)","app_doc_type":"INPUT","app_doc_index":1,"app_doc_link":"cases\/cases_ShowDocument?a=9478154835a29b5a32eb0c9016093062&v=1"}
Here is the result of GET variables on that case after I set the fileVar002 and fileVar002_label fields (as per "Files" section of http://wiki.processmaker.com/3.2/REST_A ... _Variables):
{"SYS_LANG":"en","SYS_SKIN":"neoclassic","SYS_SYS":"workflow","APPLICATION":"","PROCESS":"","TASK":"","INDEX":"","USER_LOGGED":"","USR_USERNAME":"","APP_NUMBER":"38","PIN":"4Z63","firstName":"Dave","fileVar002":["9478154835a29b5a32eb0c9016093062"],"fileVar002_label":["0216001304.jpg"]}"
Here is the result of the Upload:
{"app_doc_uid":"9478154835a29b5a32eb0c9016093062","app_doc_filename":"0216001304.jpg","doc_uid":"2085262685a1fe190b72e10068083144","app_doc_version":"1","app_doc_create_date":"2017-12-07 16:41:55","app_doc_create_user":"admin, Administrator (admin)","app_doc_type":"INPUT","app_doc_index":1,"app_doc_link":"cases\/cases_ShowDocument?a=9478154835a29b5a32eb0c9016093062&v=1"}
Here is the result of GET variables on that case after I set the fileVar002 and fileVar002_label fields (as per "Files" section of http://wiki.processmaker.com/3.2/REST_A ... _Variables):
{"SYS_LANG":"en","SYS_SKIN":"neoclassic","SYS_SYS":"workflow","APPLICATION":"","PROCESS":"","TASK":"","INDEX":"","USER_LOGGED":"","USR_USERNAME":"","APP_NUMBER":"38","PIN":"4Z63","firstName":"Dave","fileVar002":["9478154835a29b5a32eb0c9016093062"],"fileVar002_label":["0216001304.jpg"]}"