简体   繁体   中英

How to get process instance id in WSO2 BPS

I have a bpel process which is invoked from a spring web application. In my process there is an approval flow. In my web app I want to analyze the process to determine where the process is currently being. For an example : If the process has two approvals to be received I want to know whether the first approval has been returned or likewise. So I want to keep process instance id in my application database. Then I can invoke some admin services to get data about the process.

Is there any way that I can achieve this target ?

And at the same time I want to get confirmed whether there is any admin service to get process status. I know that it is possible to do it with Human tasks.

I'm using WSO2 BPS 3.2.0

The instance ID is always available in the variable $ode:pid . In order to query a process for state, I would refrain from using the admin API but would rather implement an event handler at the root (or a lower) scope, that listens for something like a getStatus operation and uses the PIID as correlation property. It could reply with the approval status. This would be fully BPEL compliant not a hack using the PM API.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM