IC SunsetThe developerWorks Connections platform will be sunset on December 31, 2019. On January 1, 2020, this forum will no longer be available. More details available on our FAQ.
Topic
  • 5 replies
  • Latest Post - ‏2019-07-17T19:11:42Z by Deb2013
Deb2013
Deb2013
54 Posts

Pinned topic How to get all BPDs from a particular Process App in IBM BPM 8.5.7

‏2019-07-16T22:32:17Z | api tw

Hi,

Is there any way to get all BPDs from a particular Process App using TW API.

 I can get all Process Apps using following script but unable to retrieve BPDs that resides in a Process App.

         var allProcessApps=tw.system.model.getAllProcessApps(false);

 

IBM BPM version - 8.5.7

 

Regards,

Deba

  • Atanu
    Atanu
    209 Posts

    Re: How to get all BPDs from a particular Process App in IBM BPM 8.5.7

    ‏2019-07-17T07:01:59Z  

    Don't think we have any OOTB feature to ge the list of processes in a particular snapshot of a Process App.

    You can export the TWX, unzip it and look into the package.xml file in META-INF folder.

    You will see entries with type="bpd" and get the list of BPDs.

     

    - Atanu Roy

  • Deb2013
    Deb2013
    54 Posts

    Re: How to get all BPDs from a particular Process App in IBM BPM 8.5.7

    ‏2019-07-17T13:00:28Z  
    • Atanu
    • ‏2019-07-17T07:01:59Z

    Don't think we have any OOTB feature to ge the list of processes in a particular snapshot of a Process App.

    You can export the TWX, unzip it and look into the package.xml file in META-INF folder.

    You will see entries with type="bpd" and get the list of BPDs.

     

    - Atanu Roy

    Atanu,

    I need something OOB  TW APIs or REST API that will help me to retrieve all BPDs within a Process App.

  • AndrewPaier
    AndrewPaier
    1198 Posts

    Re: How to get all BPDs from a particular Process App in IBM BPM 8.5.7

    ‏2019-07-17T18:27:13Z  
    • Deb2013
    • ‏2019-07-17T13:00:28Z

    Atanu,

    I need something OOB  TW APIs or REST API that will help me to retrieve all BPDs within a Process App.

    The ReST API has a call - https://server:port/rest/bpm/wle/v1/assets.  This response includes (among a number of other things) the BPDs in the ProcessApp / Snapshot you pass to the call.  

    Out of curiosity - what are you trying to do with this data?  It is important to note that only a subset of the BPDs in a PA can be called by an end user.  Some are cruft that aren't used at all and others are only used in the context of another Process Instance.

    -Andrew Paier.

  • Deb2013
    Deb2013
    54 Posts

    Re: How to get all BPDs from a particular Process App in IBM BPM 8.5.7

    ‏2019-07-17T18:44:21Z  

    The ReST API has a call - https://server:port/rest/bpm/wle/v1/assets.  This response includes (among a number of other things) the BPDs in the ProcessApp / Snapshot you pass to the call.  

    Out of curiosity - what are you trying to do with this data?  It is important to note that only a subset of the BPDs in a PA can be called by an end user.  Some are cruft that aren't used at all and others are only used in the context of another Process Instance.

    -Andrew Paier.

    Hi Andrew,

    Thanks for your response.

    My requirement is to dynamically retrieve list of exposed variables in a bpd of a Process App. I am using below TW APIs in Server Script to fetch.

     

    i. Below code helps to get list of Process Apps: var allProcessApps=tw.system.model.getAllProcessApps(false);

    ii. There is no TW API which gives a list of BPDs of a Process App - that is what I am searching for. 

    iii.  this helps to get exposed variables:    var exposedData = tw.system.model.findProcess(tw.local.bpdID, tw.local.processAppID).searchMetaData;

     

     

    Updated on 2019-07-17T18:45:19Z at 2019-07-17T18:45:19Z by Deb2013
  • Deb2013
    Deb2013
    54 Posts

    Re: How to get all BPDs from a particular Process App in IBM BPM 8.5.7

    ‏2019-07-17T19:11:42Z  

    The ReST API has a call - https://server:port/rest/bpm/wle/v1/assets.  This response includes (among a number of other things) the BPDs in the ProcessApp / Snapshot you pass to the call.  

    Out of curiosity - what are you trying to do with this data?  It is important to note that only a subset of the BPDs in a PA can be called by an end user.  Some are cruft that aren't used at all and others are only used in the context of another Process Instance.

    -Andrew Paier.

    Hi Andrew,

    Many thanks for your help.

    The url  https://server:port/rest/bpm/wle/v1/assets is working. I pass the ProcessAppId as a parameter. Its giving output with all services, bpds of the process app.

     

    Actually, I am using customized internal Swagger file, and all operations I kept in that Swagger only. So, I want to add this operation as well. So you know, what is the corresponding REST API service that might be available in https://server:port/bpmrest-ui.