Write a custom DSC and put in Java app logic to determine which PDF to retrieve. A LC DSC is similiar to a AEM Custom Workflow step in that it allows you to use custom business logic.
Another way is to use an executeScript activity in a workflow that allows you to run Java logic in a BeanShell script. The actual code will depend on your variables and how your list is set up, but it should be fairly simple to do. If it is more complex or you need to do other custom Java manipulation then a DSC would be the better way to go.
You will likely need these references:
There is any possibility to create a component in work flow and using Xpath expression related that condition.?
Actually i had refer few blogs some peoples says like use lower-case string of file name(using Xpath expression).then we will get actually file from list.
Please let me know.?
I don't know actually condition to put for getting specified pdf from list of pdf files.
Below flow is the i have tried, but am not sure.required condition using for that.
Please have a look, please give me any inputs on same.