I figured out a way to assign the form name dynamically. I added an activity with
'ExecuteScript' service and this activity extracts form name to be rendered from one of the
tags in the input xml document using xpath expression.
This activity composes the actual form name based on what is extracted.
Here is my code that is in ExecuteScript that populates the document object. The document
object in the code will be used in the next activity (RenderPDFForm) in the process as input.
String formId = patExecContext.getProcessDataStringValue("/process_data/inputDoc/form/formHeader/formId");
String formName = "Applications/MyApplication10/1.0/Forms/" + formId;
File file = new File(formName);
Document doc = new Document(file,false);
Now my problem is that the process is failing trying to find the file. It is throwing FileNotFoundException.
How should I specify the file name so that the process finds it.I have made sure that the file actually exists in the location that is specified.