Hi,
I have a simple long-lived process designed. It has an (Assembler) invokeDDX service at the start which takes a DDX input and some PDF input files. There is also a SetValue that takes the assembler result and sets it on a variable that is output (returned) to the caller of the process.
Normally, this process works fine if all the inputs (well formed, valid DDX and valid PDFs) are good. However, there are situations when the process stalls because of unexpected inputs. (eg: PDF input has permissions that prevent Assembler from working on it.). In these situations, I would like my process to return something to the caller of the process endpoint. Currently, nothing is returned that indicates that the input was bad.
On the caller (or client) side, the Java code checks the status of the long-lived service invocation using the invocation id:
int current_status = myService.invoke_status(invocation_id);
And current_status is always having a value of 2, which means "in-progress".
Instead of this behavior, I would like to design the process so that if an exception is thrown because of invalid input, then the long-lived process is made to fail. Like return a status of 4, which means failed. Or just return some value object. How can I do this? How can I catch an exception (that would normally stall) and return something to the caller.
invokeDDX service icon has an exception icon (lightning bolt) that I can draw a route out from. But this exception only offers two options: "OperationException" or "SYSTEM Exception". And neither of these two exceptions catches the problem that is encountered in my case. here is a snippet of the exception I want to catch:
[6/5/09 15:35:37:125 EDT] 0000003e AssemblerServ E com.adobe.livecycle.assembler.AssemblerServiceImpl execute ALC-ASM-S00-002: Failed to execute the DDX - error messages provided. [6/5/09 15:35:37:125 EDT] 0000003e AssemblerServ E com.adobe.livecycle.assembler.AssemblerServiceImpl execute TRAS0014I: The following exception was logged com.adobe.livecycle.assembler.client.ProcessingException: ALC-ASM-S00-002: Failed to execute the DDX - error messages provided. at com.adobe.livecycle.assembler.AssemblerServiceImpl.makeResult(AssemblerServiceImpl.java:8 28) at com.adobe.livecycle.assembler.AssemblerServiceImpl.execute(AssemblerServiceImpl.java:467) at com.adobe.livecycle.assembler.AssemblerServiceImpl.invokeDDX(AssemblerServiceImpl.java:29 6) ............. ...... ..
Caused by: com.adobe.internal.pdfm.assembly.AssemblyException: PDFM_S02013: The "appendDocument" operation failed on "process:/process_data/listOfDocs[3]". at com.adobe.internal.pdfm.assembly.DocAssembler.appendDocument(DocAssembler.java:769) at com.adobe.internal.pdfm.assembly.DocAssembler.assemble(DocAssembler.java:185) at com.adobe.internal.ddxm.task.pdf.AssemblePDF.execute(AssemblePDF.java:130) at com.adobe.internal.ddxm.blueprint.BluePrint.execute(BluePrint.java:275) at com.adobe.internal.ddxm.ddx.Node.execute(Node.java:373) at com.adobe.internal.ddxm.Executive.execute(Executive.java:270) at com.adobe.internal.ddxm.Executive.execute(Executive.java:221) at com.adobe.livecycle.assembler.AssemblerServiceImpl.execute(AssemblerServiceImpl.java:465) ... 45 more Caused by: com.adobe.internal.pdfm.packagefiles.PackageFilesException: PDFM_S22004: Package operation failed due to permissions for PDF document "process:/process_data/listOfDocs[2]" at com.adobe.internal.pdfm.packages.PackageService.checkPackageFilesPermissions(PackageServi ce.java:2777) at com.adobe.internal.pdfm.packages.PackageService.aggregatePackageSchemaAndDisplayOrder(Pac kageService.java:1973) at com.adobe.internal.pdfm.packages.PackageService.aggregatePackage(PackageService.java:1629 ) at com.adobe.internal.pdfm.assembly.DocAssembler.appendDocument(DocAssembler.java:667) ... 52 more Caused by: com.adobe.internal.pdfm.util.PDFMPermissionException: PDFM_S00014: DOC_MODIFY permission is required for this operation. at com.adobe.internal.pdfm.util.PDFMPermissionsManager.assertPermitted(PDFMPermissionsManage r.java:100) at com.adobe.internal.pdfm.packages.PackageService.checkPackageFilesPermissions(PackageServi ce.java:2775) ... 55 more
Any help would be much appreciated.
thanks