The product arrangement business process of the HelloProductArrangement sample program executes processing as follows:
Note that because the product arrangement business process is called by using a user-defined reception, you need to create a user-defined reception by using WSDL (ArrangementService.wsdl).
Define a business process of the HelloProductArrangement sample program as follows:
The following table shows the values that you need to set when adding the product arrangement business process.
Table 5-7 Values that need to be set when adding a business process
Item | Value to be set | Description |
---|---|---|
Business process name | ProductArrangement | Specify the name of the business process. |
Status persistence | yes | Specify whether to leave records in the database. The records left in the database can be used to check the progress of a process. For this sample program, you leave records in the database. Therefore, select yes. |
Import check box in the BPEL file area | Clear the check box. | To import the BPEL file that was created by using a tool in the upper process, select the check box. If you import the file, the activities necessary for the business process are automatically displayed. For this sample program, you do not import the file. Therefore, clear the check box. |
Service ID | ArrBP | Specify the ID of the business process. |
The following is the procedure for adding the product arrangement business process.
The HelloProductArrangement sample program receives a request from the service requester by using a reception that has been defined by the user according to the interface of the business process. The interface of the business process includes the operation name and message format to be set for the receive activity and reply activity. The following table shows the values that you need to set when adding a user-defined reception.
Table 5-8 Values that need to be set when adding a user-defined reception
Item | Value to be set | Description |
---|---|---|
Reception type | SOAP Reception | Select the reception type. |
Reception name | ServiceReception | Specify the name of the user-defined reception. |
WSDL file | ArrangementService.wsdl | Specify the name of the WSDL file to be used. |
Port name | Arrangement | Specify the port name. |
The following is the procedure for adding a user-defined reception for product arrangement.
For a business process, variables are used to define activities. Therefore, the variables to be used must be set before activities are defined. The following table shows the variables to be used for the product arrangement business process.
Table 5-9 Variables to be used for the product arrangement business process
Variable name | Type | XSD file |
---|---|---|
InputData | XML | InputData.xsd |
OutputData | XML | OutputData.xsd |
StockAllocationInputData | XML | StockAllocationInputData.xsd |
StockAllocationOutputData | XML | StockAllocationOutputData.xsd |
DeliveryArrangementInputData | XML | DeliveryArrangementInputData.xsd |
DeliveryArrangementOutputData | XML | DeliveryArrangementOutputData.xsd |
The following is the procedure for setting the variables to be used for the product arrangement business process.
Item | Variable name | ||||
---|---|---|---|---|---|
OutputData | StockAllocationInputData | StockAllocationOutputData | DeliveryArrangementInputData | DeliveryArrangementOutputData | |
Service/Reception | Reception name | Service name | Service name | Service name | Service name |
Name of Service/Reception | ServiceReception | StockManagement | StockManagement | DeliveryReception | DeliveryReception |
Operation name | arrangeItem | reserveItem | reserveItem | deliverItem | deliverItem |
Message type | Response message (Body) | Request message (Body) | Response message (Body) | Request message (Body) | Response message (Body) |
Message format | Output data | Stock allocation input data | Stock allocation output data | Delivery arrangement input data | Delivery arrangement output data |
The following table shows the activities that are necessary for the business process of the HelloProductArrangement sample program.
Table 5-10 Activities necessary for the business process of the HelloProductArrangement sample program
Value to be set | Description |
---|---|
Receive activity | Receives a response from the service requester |
Data transformation activity | Edits input data, output data, stock allocation data, and delivery arrangement data |
Invoke service activity | Calls the stock management service or delivery reception service |
Switch start activity | Starts the processing selected according to the condition (whether the product is in stock) |
Reply activity | Returns the processing result to the service requester |
Switch end activity | Ends the processing selected according to the condition (whether the product is in stock) |
The following shows the activity deployment procedure.
Define each of the activities that were placed on the canvas.
Item | Value to be set | Description |
---|---|---|
Activity name | Receive | Enter the name of the activity. |
Operation name | arrangeItem | Specify the name of the operation that is used to call the stock management service from the service requester. |
Body allocated variable | InputData | From the drop-down list, select the variable to be allocated to the body of the request message for the business process. |
Header allocated variable | None | Set this item when you allocate a variable to the header of the request message for the business process. This item is not used for this sample program. Therefore, do not set this item. |
Correlation set group | None | Set this item when you allocate a correlation set group to an activity. This item is not used for this sample program. Therefore, do not set this item. |
Communication model | Sync | Specify the communication model of the operation. The product arrangement service used for this sample program is a Web Service. Therefore, set Sync. |
Instance generation | yes | Select whether to initialize the process when a request message is received. For this sample program, set yes to enable initialization. |
Item | Value to be set | Description |
---|---|---|
Activity name | StockAllocationPreprocessing | Enter the name of the activity. |
Variable (in the Source Variables area) | InputData | Select the transformation-source variable from the drop-down list, and then click the Add button. |
Variable (in the Destination Variable area) | StockAllocationInputData | Select the transformation-destination variable from the drop-down list. |
DataTransDefnFile | StockAllocationPreprocessing | Enter the name of the data transformation definition file to be used to transform variables. |
Item | Value to be set | Description |
---|---|---|
Activity name | Out-Of-Stock-Setting | Enter the name of the activity. |
Variable (in the Source Variables area) | StockAllocationOutputData | Select the transformation-source variable from the drop-down list, and then click the Add button. |
Variable (in the Destination Variable area) | OutputData | Select the transformation-destination variable from the drop-down list. |
DataTransDefnFile | Out-Of-Stock-Setting | Enter the name of the data transformation definition file to be used to transform variables. |
Item | Value to be set | Description |
---|---|---|
Activity name | DeliveryArrangementPreprocessing | Enter the name of the activity. |
Variable (in the Source Variables area) | StockAllocationOutputData | Select the transformation-source variable from the drop-down list, and then click the Add button. |
Variable (in the Destination Variable area) | DeliveryArrangementInputData | Select the transformation-destination variable from the drop-down list. |
DataTransDefnFile | DeliveryArrangementPreprocessing | Enter the name of the data transformation definition file to be used to transform variables. |
Item | Value to be set | Description |
---|---|---|
Activity name | DeliveryNumberSetting | Enter the name of the activity. |
Variable (in the Source Variables area) | DeliveryArrangementOutputData | Select the transformation-source variable from the drop-down list, and then click the Add button. |
Variable (in the Destination Variable area) | OutputData | Select the transformation-destination variable from the drop-down list. |
DataTransDefnFile | DeliveryNumberSetting | Enter the name of the data transformation definition file to be used to transform variables. |
Item | Value to be set | Description |
---|---|---|
Activity name | StockAllocation | Enter the name of the activity. |
Service name | StockManagement | From the drop-down list, select the name of the service component to be called by sending a request message. |
Operation name | reserveItem | Among the operations for the service component (stock management) specified in Service name, select the name of the operation that is to be called. |
Communication model | Sync | The communication model set for the operation specified in Operation name is displayed. |
Body allocated variable (in the Request message area) | StockAllocationInputData | From the drop-down list, select the variable to be allocated to the body of the request message that calls the stock management service. |
Header allocated variable (in the Request message area) | None | Set this item when you allocate a variable to the header of the request message that calls the stock management service. This item is not used for this sample program. Therefore, do not set this item. |
Body allocated variable (in the Response message area) | StockAllocationOutputData | From the drop-down list, select the variable to be allocated to the body of the response message to be received from the synchronization operation. |
Header allocated variable (in the Response message area) | None | Set this item when you allocate a variable to the header of the response message to be received from the synchronization operation. This item is not used for this sample program. Therefore, do not set this item. |
Correlation set group | None | Set this item when you allocate a correlation set group to an activity. This item is not used for this sample program. Therefore, do not set this item. |
Item | Value to be set | Description |
---|---|---|
Activity name | DeliveryArrangement | Enter the name of the activity. |
Service name | DeliveryReception | From the drop-down list, select the name of the service component to be called by sending a request message. |
Operation name | deliverItem | Among the operations for the service component (delivery arrangement) specified in Service name, select the name of the operation that is to be called. |
Communication model | Sync | The communication model set for the operation specified in Operation name is displayed. |
Body allocated variable (in the Request message area) | DeliveryArrangementInputData | From the drop-down list, select the variable to be allocated to the body of the request message that calls the delivery arrangement service. |
Header allocated variable (in the Request message area) | None | Set this item when you allocate a variable to the header of the request message that calls the delivery arrangement service. This item is not used for this sample program. Therefore, do not set this item. |
Body allocated variable (in the Response message area) | DeliveryArrangementOutputData | From the drop-down list, select the variable to be allocated to the body of the response message to be received from the synchronization operation. |
Header allocated variable (in the Response message area) | None | Set this item when you allocate a variable to the header of the response message to be received from the synchronization operation. This item is not used for this sample program. Therefore, do not set this item. |
Correlation set group | None | Set this item when you allocate a correlation set group to an activity. This item is not used for this sample program. Therefore, do not set this item. |
Item | Value to be set | Description |
---|---|---|
Activity name | Reply_Out-Of-Stock-Error | Enter the name of the activity. |
Operation name | arrangeItem | Specify the name of the operation specified for the corresponding receive activity. |
Body allocated variable | OutputData | From the drop-down list, select the variable to be allocated to the body of the response message for the business process. |
Header allocated variable | None | Set this item when you allocate a variable to the header of the response message for the business process. This item is not used for this sample program. Therefore, do not set this item. |
Correlation set group | None | Enter this item when you allocate a correlation set group to an activity. This item is not used for this sample program. Therefore, do not set this item. |
Fault name | None | Define the reply activity as fault processing, and then specify the fault name to be used when a response message that indicates that a fault occurred in the service requester is received. No fault processing is used for this sample program. Therefore, do not set this item. |
Item | Value to be set | Description |
---|---|---|
Activity name | Reply_Arrangement-Success | Enter the name of the activity. |
Operation name | arrangeItem | Specify the name of the operation specified for the corresponding receive activity. |
Body allocated variable | OutputData | From the drop-down list, select the variable to be allocated to the body of the response message for the business process. |
Header allocated variable | None | Set this item when you allocate a variable to the header of the response message for the business process. This item is not used for this sample program. Therefore, do not set this item. |
Correlation set group | None | Enter this item when you allocate a correlation set group to an activity. This item is not used for this sample program. Therefore, do not set this item. |
Fault name | None | Define the reply activity as fault processing, and then specify the fault name to be used when a response message that indicates that a fault occurred in the service requester is received. No fault processing is used for this sample program. Therefore, do not set this item. |
Item | Value to be set | Description |
---|---|---|
Condition name | Out-Of-Stock | Specify the condition for determining whether the product is out of stock as a result of a stock allocation check. |
Variable contents | StockAllocationOutputData | From the drop-down list, select the variable to be used in the condition expression. |
Condition expression | csc:getVariableData("StockAllocationOutputData", "/*[local-name() | Specify the condition expression for determining whether the product is out of stock in XPath expression format. |