Topic
  • No replies
Click_Apply
Click_Apply
37 Posts

Pinned topic For-each X-path node How to call a processing rule

‏2012-10-30T12:58:54Z |
Hello,

I have a requirement, on a XB60. An inline XML with attachments, such as

<root>
<EmailMsg></EmailMsg>
<attachment>base64-encoded</attachment>
<attachment>base64-encoded</attachment>
<attachment>base64-encoded</attachment>
</root>

I want to run a processing rule which is common for all attachments

Can I call 'call Processing rule' inside For-each (advanced action) to take them out and process each attachment with one processing rule

In the post below Steve proposed an approach -

http://www.ibm.com/developerworks/forums/thread.jspa?threadID=322981

swlinn
Posts: 929
Registered: Oct 18, 2005 11:26:12 AM
Re: How to call a Processing Rule dynamically?
Posted: Mar 23, 2010 03:04:00 PM in response to: Liv2luv's post

As Arif points out, you must use a call action. What you could do is have your xsl store the name of the rule to call in a context variable. You could also have your xsl output something simple such as

<condition><call>true</call></conditional>

You could then have a conditional action use that as input and only reference a call action if the input context of /condition/call = 'true', and your call action would reference the context variable that has the name of the rule you wish to call.


I am struggling to get clarity of this approach. Any help is appreciated. An XSL snippet that achieves this objective would be great.

I have to go through this approach as 'dp:decode' throws me a Non-UTF error while base-64 decoding the attachments. HermannSW on DW in some post wrote he has a solution.. for UTF-8 error.. using ffd that approach with a enough detail is acceptable as well.

Regards