cancel
Showing results for 
Search instead for 
Did you mean: 

How to retrieve the Process Instance ID of the subprocess from the main process ID in BPM?

Former Member
0 Kudos

Details :

Implemented in NWDS

Through: BPM,Web Module(API Servlet)

While triggering through API I am unable to retrieve the process Instance ID of the subprocess through the main process ID.

Any suggestions will be appreciated!

Accepted Solutions (0)

Answers (2)

Answers (2)

kiruthika_s
Active Participant
0 Kudos

Hi,

Refer the below threads,the approaches followed in this can help you to achieve your solution

https://archive.sap.com/discussions/thread/1546005

https://archive.sap.com/discussions/thread/3447899

Regards

Kiruthika

former_member203641
Participant
0 Kudos

Hi,

I did it this way. Created the reporting data source and Reporting activity in sub-process and mapped process instance attribute to store parent process ID. Through Reporting data source manager API, I queried processes that have this reporting data source with value of parent process.

For more on using reporting data source API please refer below URL

https://help.sap.com/doc/javadocs_nw74_sps11/7.4.11/en-US/CE/bpem/com.sap.bpem/index.html

I used reporting data source identifier like below

An URI identifying a reporting data source must be formatted as following:

 bpm://bpm.sap.com/reporting-datasource/<DC vendor>/<DC name>/<Name of the reporting data source>

and method was below,

Set<URI>search(URI reportingDataSourceId, String reportingFieldName, String term)
Searches for process instances that persisted data matching the searched term in the given reporting field.

where parameters passed were

reportingDataSourceId = URI created above

reportingFieldName = reporting field of reporting data source created in sub-process

term = Main process instance id for which sub-process URIs are to be identified.

Hope this helps !

Thanks,

Amit