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

    View BPMN using the API

    pedalshoe

      Hi,

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

      Thank you,

      -Christopher

        • 1. Re: View BPMN using the API
          horvie

          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");