1 Reply Latest reply on Jan 13, 2015 2:45 AM by David Horvat

    View BPMN using the API

    Christopher Logan Newbie

      Hi,

      is there a way to extract the BPMN xml using any API?

      Thank you,

      -Christopher

        • 1. Re: View BPMN using the API
          David Horvat Newbie

          You must get a hold on ProcessAssetDesc type of your process (In example: RuntimeDataService.getProcesses()). When you have that, you call ProcessAssetDesc.getEncodedProcessSource(), that return Baste64 encoded String of BPMN xml, so you should decode it.

           

          Snippet:

          ProcessAssetDesc process = RuntimeDataService.getProcesses().iterator().next();

          byte[] source = Base64.decodeBase64(process.getEncodedProcessSource());

          String xml = new String(source, "UTF-8");