it depends on whether you talk about the BPEL core language or the some engine with specific extensions. As for the standard-only:
- No, however there is the BPEL/J standard defined which is supported by some engines
- BPEL offers XSLT and XPath out of the box. Some engines offer additional languages.
- BPEL itself does not define the exact run-time. However, all engines that I know of log
the execution of the process or can be configured to do so.
- BPEL as the standard only interacts with Webservices (i.e. anything defined by a WSDL).
As you have tagged your post with wso2 you seem to be able to use vendor extensions. I do not know WSO2 myself but AFAIK it is based on Apache ODE. Apache ODE has some extensions available:
- Apache ODE does not support BPEL/J but you can add your own XPath functions writting in Java. You can pass the element(s) you want to validate to it and return the validation result as needed. For further information see https://ode.apache.org/custom-xpath-functions.html
- Apache ODE has support for XQuery. For further information see https://ode.apache.org/extensions/xquery-extensions.html
- For querying the process log see https://ode.apache.org/ode-execution-events.html
- Apache ODE has a mechanism for external variables which are stored directly in the DB. However, I do not know whether this is sufficient for your use case. IMO it is always cleaner to write a persistence service if you want to store a business object. I would use external variables only with data you want to use for BI: https://ode.apache.org/extensions/external-variables.html
I hope that this helps and is equally exposed by WSO2.