ODE-1065: pmapi enhanced to include myRole endpoints in process-info
Project: http://git-wip-us.apache.org/repos/asf/ode/repo Commit: http://git-wip-us.apache.org/repos/asf/ode/commit/d8ebc044 Tree: http://git-wip-us.apache.org/repos/asf/ode/tree/d8ebc044 Diff: http://git-wip-us.apache.org/repos/asf/ode/diff/d8ebc044 Branch: refs/heads/master Commit: d8ebc04467b96dcb4e995c1fa09f42b3effbb680 Parents: fad4da9 Author: sathwik <[email protected]> Authored: Wed Jun 28 19:09:13 2017 +0530 Committer: sathwik <[email protected]> Committed: Wed Jun 28 19:09:13 2017 +0530 ---------------------------------------------------------------------- .../bpel/engine/ProcessAndInstanceManagementImpl.java | 14 ++++++++++++++ bpel-schemas/src/main/xsd/pmapi.xsd | 5 +++++ 2 files changed, 19 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ode/blob/d8ebc044/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/ProcessAndInstanceManagementImpl.java ---------------------------------------------------------------------- diff --git a/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/ProcessAndInstanceManagementImpl.java b/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/ProcessAndInstanceManagementImpl.java index e1a7bd9..4630860 100644 --- a/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/ProcessAndInstanceManagementImpl.java +++ b/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/ProcessAndInstanceManagementImpl.java @@ -952,6 +952,20 @@ public class ProcessAndInstanceManagementImpl implements InstanceManagement, Pro if (pepr != null) { TEndpointReferences.EndpointRef epr = eprs.addNewEndpointRef(); + epr.setPartnerLink(oplink.name); + epr.setPartnerRole(oplink.partnerRoleName); + Document eprNodeDoc = epr.getDomNode().getOwnerDocument(); + epr.getDomNode().appendChild(eprNodeDoc.importNode(pepr.toXML().getDocumentElement(), true)); + } + } + if (oplink.hasMyRole()) { + EndpointReference pepr = _server._engine._activeProcesses.get(pconf.getProcessId()) + .getInitialMyRoleEPR(oplink); + + if (pepr != null) { + TEndpointReferences.EndpointRef epr = eprs.addNewEndpointRef(); + epr.setPartnerLink(oplink.name); + epr.setMyRole(oplink.myRoleName); Document eprNodeDoc = epr.getDomNode().getOwnerDocument(); epr.getDomNode().appendChild(eprNodeDoc.importNode(pepr.toXML().getDocumentElement(), true)); } http://git-wip-us.apache.org/repos/asf/ode/blob/d8ebc044/bpel-schemas/src/main/xsd/pmapi.xsd ---------------------------------------------------------------------- diff --git a/bpel-schemas/src/main/xsd/pmapi.xsd b/bpel-schemas/src/main/xsd/pmapi.xsd index 19fab88..dd98d70 100644 --- a/bpel-schemas/src/main/xsd/pmapi.xsd +++ b/bpel-schemas/src/main/xsd/pmapi.xsd @@ -412,6 +412,11 @@ <documentation>Name of the partner role this endpoint reference is associated with.</documentation> </annotation> </attribute> + <attribute name="my-role" type="xs:string"> + <annotation> + <documentation>Name of the my role this endpoint reference is associated with.</documentation> + </annotation> + </attribute> </complexType> </element> </sequence>
