Registration

Dear SAP Community Member,
In order to fully benefit from what the SAP Community has to offer, please register at:
http://scn.sap.com
Thank you,
The SAP Community team.
Skip to end of metadata
Go to start of metadata

When we are designing BPM processes we usually use many of the predefined functions. However many times we are unable to find function that suits our needs. This is when the custom created BPM functions come into play.

To create a new custom function in BPM you just have to follow the next simple steps.

We must create a new ejb DC that will contain all the BPM functions. 

Example: project_name/ejb/bpmfuncs

Go to your software component>right click>New>Development Component...

From the list choose Java EE>EJB Module and press the Next button

Fill the desired vendor and DC names.

After the creation of the ejb DC, we need to create a new ear DC as well.

Example: project_name/ear/bpmfuncs

Go to your software component>right click>New>Development Component...

From the list choose Java EE>Enterprise Application Module and press the Next button

Fill the desired vendor and DC names.

Java EE perspective

We open the newly created ejb in Java EE perspective.

Then open the ejbModule folder and create New>Package

Choose the proper name for your new package:

We create new Session Bean in our ejbModule:

Choose the proper name for your Session Bean:

Now we must develop the java code for our new bpm function:

Finally reflect all changes in the *Local java class:

Build and Deploy the .ear file.

We must add the new function to the process:

Make sure that you fill:

Name:

Return type:

In your internet browser:
Enter NWA, go to JNDI Browser and copy the object name (the screenshot bellow is taken from different project):

Then double click on the desired function in the process and paste the copied Object name to JNDI Name. Carefully define the Return type and add parameters according to the function code.

Done!

You can now use your new BPM function.

 

  • No labels