Skip to Content
0

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

Mar 27, 2017 at 12:02 PM

174

avatar image

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!

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Amit Valecha Mar 31, 2017 at 02:40 PM
0

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

Share
10 |10000 characters needed characters left characters exceeded
Kiruthika S
Apr 11, 2017 at 01:06 PM
0

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

Share
10 |10000 characters needed characters left characters exceeded