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

    View BPMN using the API



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

      Thank you,


        • 1. Re: View BPMN using the API

          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.



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

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

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