重新启动后,wso2等待循环不起作用 [英] wso2 wait loop doesn't work after restart

查看:97
本文介绍了重新启动后,wso2等待循环不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在连接到Postgresql 9 DB的WSO2 BPS 3.0.0上的bpel进程中开发了一个池逻辑. 看起来像这样:

I've developed a pooling logic in bpel process on the WSO2 BPS 3.0.0 connected to a Postgresql 9 DB. It looks like this:

<bpel:repeatUntil name="RepeatUntilIncidentCompleted">
<bpel:sequence name="CheckIncidentStatus">
    <bpel:wait name="Wait">
        <bpel:for expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA['PT1M']]></bpel:for>
    </bpel:wait>
    <!-- invoke a service, copy status to a vStatus variable -->
</bpel:sequence>
<bpel:condition expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[$vStatus=36]]></bpel:condition>

我创建了一个流程实例,并且此循环运行良好. 后来我重新启动了WSO2 BPS服务器.重新启动时,流程实例处于循环中,但是重新启动后,循环不再运行.该过程在Carbon控制台中被标记为活动中.

I created a process instance and this loop worked fine. Later I restarted the WSO2 BPS server. In the moment of the restart the process instance was in the loop, but after restart the loop wasn't running anymore. The process is marked as active in the carbon console.

我已经在deploy.xml中添加了in-memory = false属性,但是它没有帮助.

I've added the in-memory=false property in the deploy.xml but it didn't help.

我可能会错过一些配置,但是这样的循环(可能在Apache ODE中)也会存在持久性问题.

I could have missed some configuration but there also can be a persistence problem with such a loop (probably in the Apache ODE).

有人知道这个问题的解决方案吗?提前谢谢.

Does anyone know a solution to this problem? Thx in advance.

推荐答案

我发现:
1.您在wso2 bpel进程中进行的所有睡眠操作都在ode_job表中表示. ts属性包含唤醒时间.
2.重新启动bps服务器后,所有延迟的睡眠操作都不会继续进行(当唤醒时间<当前时间-偏移量时,睡眠操作会延迟).
3.重新启动bps服务器后,所有未延迟的睡眠操作将继续正常进行.

I've discovered that:
1. All sleep operations that you put in a wso2 bpel process are represented in the ode_job table. The attribute ts contains the time of wake up.
2. After restart of the bps server all delayed sleep operations aren't continued (a sleep operation is delayed when wake up time < current time - offset ).
3. After restart of the bps server all non-delayed sleep operations that are continued properly.

现在让我们这样说:
-您有一个bpel流程实例在一个等待操作中等待.唤醒时间为X.
-停止bps服务器,然后在X之后重新启动它.
由于2.原因,流程实例在重启后将无法继续.这包括我先前描述的循环.

我的解决方法:
每次重新启动wso2 bps服务器时,我都会在数据库上执行sql脚本,以更新睡眠操作的唤醒属性(ode_job表中的ts列).唤醒时间设置为不久的将来.

我不知道您是否可以通过配置更改2./3.行为.我找不到有关它的任何文档.这里需要一些代码分析.更糟糕的是,wso2使用了它自己的apache ode分支,因此您不能只更新apache ode库.

我怀疑2中描述的行为可能有两个原因: -延迟的睡眠操作被删除
-重新启动后立即执行了延迟的睡眠操作,但尚未加载进程定义.

Now let's say that:
- You have a bpel process instance that waits in a wait operation. The wake up time is X.
- You stop the bps server, and start it again after X.
Because of 2. the process instance won't continue after restart. This includes the loop I've described earlier.

My workaround to the problem:
Everytime the wso2 bps server is restarted I execute a sql script on the database that updates the wake up attribute of the sleep operations (the ts column in the ode_job table). The wake up times are set to some near future.

I don't know if you can change the 2. / 3. behaviour by configuration. I couldn't find any documentation about it. Some code analasis is needed here. To make things worse, wso2 uses it's own apache ode branch, so you can't just update the apache ode library.

I suspect that there can be two reasons for the behaviour described in 2.:
- delayed sleep operations are droped
- delayed sleep operations are executed right after restart, but the process definitions aren't loaded yet.

这篇关于重新启动后,wso2等待循环不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆