本文主要是介绍ccBPM中的Exception handle,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
ccBPM中只有通过block的exception handle branch才能对exception进行捕获。ccBPM中可以触发exception的step type有:
1)Send step
Asynchronous Send step:只有当发生了permanent system error的时候才会触发exception
Synchronous Send step:除了permanent system error之外,当接收到相应的fault message的时候也会触发exception.
2)Transformation step
当发生了permanent system error的时候会触发exception(通常是message mapping中发生了错误)
3)Control step
Control step有三种功能:结束当前process,触发exception和生成Alert信息。
这种触发exception的steps很容易理解,但在使用Send step特别是Asynchronous Send step触发exception的时候通常会引起我们的异议,我们会感觉BPM中Send step发生了系统错误,但是却没有触发exception。下面通过一个例子来说明这一异议。
在integaration process中放置一个Block,并创建一个exception handle branch,再在Block中拖入一个Send step,并将mode设置为Asynchronous,Acknowledge选择为transport,Exception设置为Block中handle的exception,其他一切配置完成后,测试消息发送,并且消息可以成功发送。这时故意将receive channel设置错误,使得消息无法被成功接受,再测试消息发送后,SXI_MONITOR中显示如下:
BPM停止在Send step上,虽然有错误,但是没有触发exception;
双击打开该消息,发现Ack为system transient acknowledgement;
通过SXMB_MONI_BPE查看BPM的状态,发现BPM当前仍然在等待Ack;
这时,通过message monitor去cancel掉这条处于waiting状态正在retry sending或处于system error状态的消息;
再去查看SXI_MONITOR,发现Send step触发了Exception;
双击打开带有错误Ack的message,此时的Ack为System Permanent Acknowledgement。
针对BPM exception归纳如下几点:
1)只有当workflow中发生错误的时候才可能触发exception,pipeline和adapter上发生的错误不会触发workflow的exception;
2)可以把Ack分为
Positive acknowledgment
Permanent negative acknowledgment
Temporary (transient) negative acknowledgment
Positive acknowledgment会使得workflow继续往下执行,Permanent negative acknowledgment会触发exception,而Temporary (transient) negative acknowledgment并不会触发exception,通常这样的ack发生时,可以在message monitor中resend错误的消息;
这篇关于ccBPM中的Exception handle的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!