简体   繁体   中英

BPEL with correlation sets

I have a BPMN process that starts every one minute, retrieves a list of messages and iterates (each one containing a userId and that corresponds to a message in a conversation), then it sends a message to a BPEL process.

The BPEL process contains a correlation set (with the userId), so there's only one process instance per user. This BPEL process contains 4 message catch, with the same interface, and after processing 4 messages the instance terminates.

The I'm having is: I receive 4 messages from the same user, the process instance ends. Then I receive another message form the same user. In my understanding it should create a new instance of the BPEL process. But instead, it shows me that the send activity is performed, and no new instance is created, and I can't see any error.

Can somebody help me? Thanks

Usually the correlation is set on the OrderId. Since the messages need to be correlated the messages are always persisted in the database.

When your instance is completed, the instance data is present in the database. When the same CustomerId message comes to BPEL, it will first check for the CustomerId in the database. Once it sees that there is a completed instance, it raises an exception. You can clear the database and you will find that your correlation works once again (only once). This is how its implemented in the BPEL engine.

I would suggest you to use the OrderId as correlation. Since the orderID will only be known to that customer.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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