Thursday, February 7, 2013

How to find BPEL Process Instance ID from Correlation Property Value in Apache ODE/WSO2 BPS

This is a small SQL query to retrieve Process Instance ID from the DB, when we know a Correlation Property Value, for a simple case where the correlation set consists of only one property.

SELECT PROCESS_INSTANCE_ID FROM ODE_SCOPE WHERE SCOPE_ID IN (SELECT cs.SCOPE_ID FROM ODE_CORRELATION_SET cs WHERE cs.CORRELATION_SET_ID IN (SELECT os.CORRSET_ID FROM ODE_CORSET_PROP os WHERE os.PROP_VALUE='$CORR_PROP'));

Here, use the respective correlation property value instead of $CORR_PROP

2 comments:

  1. Hello, I am new to Apache ODE .. how can I access this DB (what is the connection string for it?)

    ReplyDelete
  2. Hi,
    By default, ODE uses an embedded Derby database. You can fine more details on configuring an external database with ODE here:
    [1] http://ode.apache.org/war-deployment.html
    [2] http://ode.apache.org/ode-schema.html
    [3] http://ode.apache.org/ode-jbi-and-axis2-properties-overview.html

    ReplyDelete