Perform the following steps to create workflows to invoke/test AEM document services.

  1. Implement the process step with a Java class and create a bundle/package. 

    • Download java codes and build them as a Maven project. Add custom classes to implement services and APIs to call the required operation for the service.
    • Add a CQ component to implement the following features for the service:
      • As an input, accept a path or value as input.
      • As output, accept a relative path to the workflow payload or an absolute path from the root to a node in the repository.
      • As an input, accept any literal value or value from a CQ widget, such as radio button, checkbox, dropdown, and on.
  2. Install the bundles/packages using the CQ package manager utility. For example, install the package adobe-aem-workflow-core-pkg- to create the bundle adobe-aem-cluster-test-workflow- 0.1.0-SNAPSHOT.jar.


  3. Create workflows in CQ for each API you want to test. For details around creating workflows, see Extending Workflow Functionality.

    You can download out-of-the-box workflows from link below and install them.

    After installing the workflow package, navigate to the location  /libs/cq/workflow/components/workflow/clustertest/ in the CRX repository. Verify  that the workflows are imported.


    Workflow node
  4. Depending upon your operating system (linux or Windows), install either or Download the latest add-on package from http://noinexus/nexus/content/groups/development-repositories/com/adobe/aemds/. Upload the package using the CQ package manager utility.

  5. Go to http://localhost:4502/workflow, and create a model for each test case.

    Create new model
  6. Check the new models to test the services relating to Assembler/Form/Output/DOCServices.

    Check new models
  7. Right-click any model and then click Edit from the context menu. For example, if you create the model TestOPBatchPDF, right-click it, and then click Edit. Delete the default step in the workflow. From Side-kick, click the Workflow tab and Search for Generate PDF Output Batch. Drag this workflow step to the Workflow panel.

    Generate PDF Output Batch workflow
  8. Double-click the Generate PDF Output Batch process. A dialog appears. 

    Generate PDF Output Batch dialog
  9. Click the Arguments tab, and specify values for the following and click OK:

    • inputfileNames: Name of Input XDP files that are uploaded as nodes (comma separated).
    • inputDataFileNames: Name of Input Data-XML files that are uploaded as nodes (comma separated).
    • multipleFiles: true/false
    • Templatecount: Number of input files passed
    • OutputMetadadaDocName: Name for the metadata file

    Sample values:

    • inputfileNames: cardApp.xdp, ExpenseClaim.xdp, PurchaseOrder.xdp.
    • inputDataFileNames: cardApp_data.xml, ExpenseClaim_data.xml, PurchaseOrder_data.xml
    • multipleFiles: true/false
    • templatecount: 3
    • OutputMetadadaDocName: OPBatchPDF_MATADATA.xml


  10. Create a launcher for each test case in the usual way. For example, go to http://localhost:/workflow and click Launcher. Then click Add and create a launcher.

    Create launcher
    Workflow launcher configuration