You may have notice that as you were building the state machine that there was one error all along: Correlation set must have at least one property. When deployed to a server, your state machine could have several instances, each in a different state.
When an operation is called on the state machine component, you need a way to make the call on the correct instance. This is accomplished using correlation sets.
A correlation set tells the state machine which running instance to use for the given input data. It does this by examining the contents of the input data, using a specified field as a kind of key that uniquely identifies the corresponding process instance.
In WebSphere Integration Developer V6.0.2.2, these are the four steps:
1. Right-click Correlation Properties on the top-right corner of the editor and select Add Correlation Property.
2. Enter OrderNumber for the name, select int for the type, and then click OK.
3. In the OrderNumber correlation properties that opens, each operation of the business state machine displays. Click the cell next to placeOrder and then drill down to Order - orderNumber.
4. Click the cell next to orderShipped and drill down to Order - orderNumber.
Keep in mind that the interface operations of the selector must match all of the interface operations of the destinations. In other words, you may not select a destination that has an interface with a different operation name, input, or output than the selector itself. If you try to use a selector where the operation name does not match, then you get a ServiceRuntimeException saying the operation name cannot be resolved. If the input or output does not match (for example, if the destination interface has a different input name or a different input type), then you get a SelectorException saying the component does not support the operation.
If you cannot match the interface of the selector with the interfaces of the destinations, you can use a selector with an interface map, which we described in the seventh article in this series, to convert from one interface to another by using the interface map as a destination in the selector. Then the selector can invoke the interface map that, in turn, calls the actual service implementation.
1. The business model is created in the Model step (Websphere Business Modeler)
2. and then is assembled with the business logic in the Assemble step. (Websphere Itegration Developer)
3. It is deployed to a runtime in the Deploy step (Websphere Process Server)
4. and is monitored in the Manage step. (Websphere Process Monitor)
