简体   繁体   English

如何跳过Tibco中的运行时错误?

[英]How to skip run time error in tibco?

I am new to tibco and I am working on tibco BW 5.X versions. 我是tibco的新手,我正在研究tibco BW 5.X版本。

I have a scenario where I am working on multiple records coming in from a schema and I have to write a text file with only specific values out of those records. 我有一种情况,我要处理来自架构的多个记录,并且我必须编写一个文本文件,其中仅包含这些记录中的特定值。

Ex : 例如:

if this is the input: 如果这是输入:

<param>1</param>
<param>2</param>
<param>1</param>
<param>1</param>

I only have to write the param having values 1 and have to generate error for param having values 2 but after generating error the iteration that is currently going on should continue and must not stop. 我只需要编写具有值1的参数,并且必须为具有值2的参数生成错误,但是在生成错误后,当前正在进行的迭代应该继续并且不能停止。

I would be grateful if someone can help 如果有人可以帮助我,我将不胜感激

I assume in case of the value "2" you want to invoke the "Generate Error" Activity to throw an error up to a calling process or client that some entry was not correct, right? 我假设在值“ 2”的情况下,您要调用“生成错误”活动来向调用过程或客户端抛出错误,表明某些条目不正确,对吗?

So if you want to make sure to process the whole list you should not throw the error in the loop group on the list as it will exit. 因此,如果要确保处理整个列表,则不要在列表上的循环组中抛出错误,因为该错误将退出。 You can either: 您可以:

  1. Use 2 seperated lists 使用2个单独的列表

    map the entries with value "1" into a good list that enter the loop and entries with value "2" into a bad list, that will if filled let you then invoke the "Generate Error" activity after the loop processing. 将值“ 1”的条目映射到进入循环的良好列表中,将值“ 2”的条目映射到不良列表中,如果填充,则可以在循环处理之后调用“ Generate Error”活动。

  2. Append the entries with value "2" in your loop Thereby after processing the loop you have these entries and if the list contains entries invoke the "Generate Error" activity. 在循环中添加值为“ 2”的条目。因此,在处理完循环后,您将拥有这些条目,并且如果列表中包含条目,则调用“生成错误”活动。

Hope that helps Cheers Seb 希望可以帮助干杯

Ps: if you upload your process it would be more clear to show ;) 附言:如果您上载流程,将更清楚地显示;)

You could create a output schema which contains only param1 values and use a mapper activity to perform corresponding transformation and xpath functions for filtering. 您可以创建一个仅包含param1值的输出模式,并使用mapper活动执行相应的转换和xpath函数以进行过滤。 If you try to implement this solution you can eliminate the chance of param2 values creeping into your output. 如果尝试实施此解决方案,则可以消除param2值爬入输出的机会。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM