| <?xml version="1.0" encoding="UTF-8"?> |
| <!-- |
| ~ Licensed to the Apache Software Foundation (ASF) under one |
| ~ or more contributor license agreements. See the NOTICE file |
| ~ distributed with this work for additional information |
| ~ regarding copyright ownership. The ASF licenses this file |
| ~ to you under the Apache License, Version 2.0 (the |
| ~ "License"); you may not use this file except in compliance |
| ~ with the License. You may obtain a copy of the License at |
| ~ |
| ~ http://www.apache.org/licenses/LICENSE-2.0 |
| ~ |
| ~ Unless required by applicable law or agreed to in writing, |
| ~ software distributed under the License is distributed on an |
| ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| ~ KIND, either express or implied. See the License for the |
| ~ specific language governing permissions and limitations |
| ~ under the License. |
| --> |
| <bpel:process xmlns:bpel="http://schemas.xmlsoap.org/ws/2004/03/business-process/" |
| xmlns:pnlk="http://schemas.xmlsoap.org/ws/2004/03/partner-link/" |
| xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" |
| xmlns:foreach="http://www.example.org/jms" xmlns:diag="http://example.com/ForEach" |
| xmlns:Pool="http://example.com/ForEach/Pool" xmlns:this="http://example.com/ForEach/ForEach" |
| xmlns:bpmn="http://www.intalio.com/bpms" queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0" |
| expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0" |
| name="ForEach" targetNamespace="http://example.com/ForEach/ForEach"> |
| |
| <bpel:import namespace="http://example.com/ForEach" location="ForEach.wsdl" |
| importType="http://schemas.xmlsoap.org/wsdl/"/> |
| <bpel:import namespace="http://example.com/ForEach/ForEach" location="ForEach-ForEach.wsdl" |
| importType="http://schemas.xmlsoap.org/wsdl/"/> |
| |
| <bpel:partnerLinks> |
| <bpel:partnerLink name="poolAndForEachPlkVar" partnerLinkType="diag:PoolAndForEach" myRole="ForEach_for_Pool"/> |
| </bpel:partnerLinks> |
| |
| <bpel:variables> |
| <bpel:variable name="thisStartRequestMsg" messageType="this:startRequest"/> |
| <bpel:variable name="thisStartResponseMsg" messageType="this:startResponse"/> |
| </bpel:variables> |
| |
| <bpel:sequence> |
| <bpel:receive partnerLink="poolAndForEachPlkVar" portType="this:ForPool" |
| operation="start" variable="thisStartRequestMsg" createInstance="yes"/> |
| |
| <bpel:forEach parallel="no" counterName="ForEachCounter"> |
| <bpel:startCounterValue>"1"</bpel:startCounterValue> |
| <bpel:finalCounterValue>"3"</bpel:finalCounterValue> |
| <bpel:scope bpmn:label="ForEach"> |
| <bpel:sequence> |
| <bpel:assign> |
| <bpel:copy> |
| <bpel:from>concat($thisStartRequestMsg.body/text(), $ForEachCounter)</bpel:from> |
| <bpel:to>$thisStartRequestMsg.body</bpel:to> |
| </bpel:copy> |
| </bpel:assign> |
| </bpel:sequence> |
| </bpel:scope> |
| </bpel:forEach> |
| |
| <bpel:assign> |
| <bpel:copy> |
| <bpel:from>$thisStartRequestMsg.body</bpel:from> |
| <bpel:to>$thisStartResponseMsg.body</bpel:to> |
| </bpel:copy> |
| </bpel:assign> |
| <bpel:reply partnerLink="poolAndForEachPlkVar" portType="this:ForPool" operation="start" variable="thisStartResponseMsg"/> |
| </bpel:sequence> |
| </bpel:process> |