In Oracle Business Process Management (BPM) creating a function is a tricky one. We do not see any option to create a function. Only option that will be available is to create a Method. To create a Function follow the below steps –
1) Create a Method by navigating to Catalogue component->BPM Object->Right click on the BPM object and select New Method as shown in the below screen shot –
2) A Method popup will be displayed in the screen. Give any name in the “Method Name” text field. In my case I gave it as “sample_Method” as shown below –
4) When you are in “sample_Method“ method window, Go to the Properties tab in the right most panel of the BPM Studio.
5) In the Properties tab under “Method Properties“, by default the Return Type for the “sample_Method” method is void. Set the Return Type as string.
6) In the “sample_Method” method window editor write your business logic. The below mentioned code is the sample code
String strMsg = “The String to be returned”;
Only Function can return something, but not a Method. So by defining the Return Type, a Method becomes a Function.