I have a Subprocess that is a Loop type. I am calling a web service within the loop. The data is pulled using a database adapter. One of the data values I am passing to the service is "Furniture & amp; Office Equipment" (title). Ignore the space between the & and amp;, I did that so it posts properly. The input data association is using this XPath Expression:
I agree and do not really want to use the string concatenation. I am looping through an array in the subProcess. When I use a XSLT transformation in this case how do I have access to the loopCounter? Is there a sample available to show how to do this?
Yes, I have used the "for each" before but in this case the loop is in the subProcess and my web service call is within the subProcess so I don't want to iterate the array in the XSLT. The Loop Characteristics of the subProcess are: Loop and the loop condition is a simple expression "loopCounter <= costCodes.costCodes.length()". I would like to attach an image of the subProcess but I don't see how to do that. To describe it; for each costCode in the array I want to do a read to see if it exists, if it does, update it, else create it, end.
I found my SubProcess loop characteristics needs to be defined as "MultiInstance" and NOT "Loop". This way I get a handle to each item in the array. After this I was still not able to assign an XSL transformation to my service call. I ended up creating a re-usable process for the service calls and have a Call activity in the loop to pass the item into it. I was then able to use XSL to call the service. This does not seem correct but it is working.