Process ID value comes up as “-1″

Issue: Recently I worked on an issue for a customer who reported a problem with Process ID value becoming “-1″.

Scenario: Customer had a process where they were naming the output file using a combination of “Process ID + time-stamp”. They reported that the value of the output filename was coming up as “-1+time-stamp” for some files.

Trouble-shooting: Upon reviewing their process, the design was – A long-lived process takes an input from a watched-folder end-point and checks to see if the incoming file is a TIFF, MS Word document or XML data file. If the input was any other format other than XML, then these files would be converted to PDF’s and the output file would be named as “Process-ID+timestamp” and stored in a directory. If the input file was an XML data file then it would be sent to a sub-process and merged with a form-template and flattened and then named as “Process-ID+timestamp” and stored in the same output directory. By running some tests, we could see that the file name would come out as “-1+timestamp” only when the input file was an XML data file.

The Parent process was a long-lived process and the sub-process was a short-lived process. When the files were named using the ProcessID within the long-lived process, everything was working fine. The issue was with the XML data files when they were passed to the short-lived sub-process, because the processID of the short-lived process was being used to name the output files in the sub-process.

   So the processID part of the output file name was being generated using
     ProcessID = /process_data/@id

The problem with this is, for short-lived processes there is no Process ID as they are not being stored in the Database. Hence the /process_data/@id was returning ‘-1′ as the value.

Resolution: To resolve this issue, we stored the processID of the parent process in a string variable (named ParentPID) and passed this variable to the short-lived process. And for generating the output file name within the short-lived process, we assigned ‘ProcessID = ParentPID’ and then used this for the output file generation. This resolved the issue.

VN:F [1.9.22_1171]
Was this helpful? Please rate the content.
Rating: 0.0/10 (0 votes cast)

About Ameeth Palla

Ameeth Palla is a Technical Account Manager for the Adobe Digital Enterprise Platform team. Previously he was in the role of a Technical Expert for LiveCycle for the the Technical Response Team (what is now the Sr.Support Architect role). In both roles, Ameeth handled several technical issues for various customers and worked closely to aid with Sales POC's, Development/Implementation and Manitenance of LiveCycle/ADEP Projects. In the current role he handles several high profile customer accounts and provides guidance in all aspects of LiveCycle/ADEP. Also he is a Certified LiveCycle ES2.5 Process Management Expert. He was nominated for the 'Adobe Founders Award' and the 'Excellence Matters' award for LiveCycle/ADEP BU.
This entry was posted in ADEP, Adobe LiveCycle ES, Adobe LiveCycle ES2 (9.0.x), Adobe LiveCycle ES3, Document Services and tagged , . Bookmark the permalink.

One Response to Process ID value comes up as “-1″

  1. krishna says:

    Ameeth,
    Thanks for the post. This will be really helpful for us as we use processids to filenames in our business scenario.

    Krishna