A lot is being talked about the BPEL4People/Human Interaction capability in SAP Process Integration 7.1. Introducing it here by creating a simple scenario based on the functionality of User Decision step in PI 7.1 which allows the user to take a decision.
We have a file in PI 7.1 system under the directory “/tmp/SO.xml” which is having the general data for sales order. The Integration Process (BPM) in PI 7.1 will receive this file and check for the credit limit in the data. The default credit limit is 50000.
BPM is using User Decision step in which after receiving the file with data having credit limit above 50000, the process with user decision step will be started. The file is picked from the directory and the message would initialize the ccBPM. The message would wait for the user decision and the action can be seen in User’s Inbox.
1. The scenario is a file to file using BPM.
2. User has developed interfaces in PI and trying to develop ccBPM with Human Interaction capabilities.
Enterprise Service Builder:
- Create the data type and message type. The basic data type is as under:
- Create the Outbound Asynchronous, Inbound Asynchronous and Abstract Asynchronous Service (Message) Interface.
- Create Message Mapping and Operation (Interface) Mapping
- Create an Integration Process with the name IP_Salesorder as under:
The steps used here are as under:
- Receive1 step will receive the message from the sender system.
- Container1 step is used to assign the default value to SO_limit container variable.
- Switch1 step is used to check the limit of sales order.
- Branch1 of Switch1 involves the User Decision1 step.
- Otherwise branch of Switch1 step involves Control2 step.
- User Decison1 is having two Decision option branches.
- Decision option1 step is triggered when the result of User Decision step is CREATE
- Decision option2 step is triggered when the result of User Decision step is CANCEL
- Properties for each and every step defined above in the Integration Process and variables/parameter used are as under:
Create the container variable as below:
Switch to Configurable Parameters by clicking on Container dropdown arrow.
Create the configurable parameters as above. The E-mail will be sent to the Admin (SAP User Name) that we will assign in Integration Directory.
I am using an alert and that’s why I have chosen the action as Throw Alert; you can simply choose the action as Cancel Process having same properties as of Control2 as below:If you want to use an Alert, Please refer to Michal’s blog for the same https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/2328 and https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/1382 for defining Alert Category in ALRTCATDEF transaction in PI system and using Dynamic text for the same.
We are done with Integration Process, save it and perform a check for the same.This will ensure that steps defined in BPM are correct. In case some error is there please cross check the properties for each step once again. Don’t forget to activate the change list.
- Create a Business Service say BS_Test.
- Import the Integration process “IP_Salesorder” from ESR/IR
Here in the Integration process we will assign the name of the SAP user who is going to receive the e-mail in SAP’s Inbox in transaction SBWP to take the decision on User Decision Step.
- Create the Sender and Receiver file communication channel.
- Create the Receiver determination (BS_Test to IP_Salesorder) and (IP_Salesorder to BS_test)
- Create the Interface Determination for (BS_Test to IP_Salesorder) and (IP_Salesorder to BS_test)
- Create the Sender agreement for BS_Test
- Create the Receiver agreement for IP_Salesorder