I am wondering if the SCA BPEL test runtime supports mapping of partner links that are within a scope (and not at the top level) to an SCA service or reference. Perhaps the reason for the failure of mapping is the declaration of the multiRefFrom attribute
on the partnerLink!
Here is the BPEL code snippet from the Test_SBPEL_2005 test case (bpel file – service1WithMultiRef.bpel), which throws an error: [UndeclaredPartnerLink] Attempt to reference undeclared partner link "TestReference".
<forEach counterName="idx">
<startCounterValue>1</startCounterValue>
<finalCounterValue>
count($multiRefs/sref:service-ref)
</finalCounterValue>
<scope>
<partnerLink name="TestReference" partnerLinkType="test:Service2PartnerLinkType" partnerRole="Provider" sca-bpel:multiRefFrom="multiRefs" />
<assign>
<copy>
<from>$multiRefs/sref:service-ref[$idx]</from>
<to partnerLink="TestReference" />
</copy>
</assign>
<!-- Invoke target test service (Note: the value of outputVariable is overwritten with each run of the for-loop) -->
<invoke name="invokeTest"
partnerLink="TestReference" operation="operation2"
inputVariable="serviceInput" outputVariable="serviceOutput"/>
</scope>
</forEach>
Thanks,
Sanjay