Skip to Content
Former Member
May 16, 2013 at 06:23 AM

Search for complex EJB Mapping function example


Hi guys,

i have some problem regarding my ejb mapping function in bpm process. I want to know how i can access within the ejb function.

I want to give two strings into the mapping function and want to return a article from type ArticleType (defined in BPM as XSD Schema)

<?xml version="1.0" encoding="UTF-8"?>

<schema xmlns="" targetNamespace="" xmlns:tns="" elementFormDefault="qualified">

<complexType name="ArticleType">


<element name="artName" type="string"></element>

<element name="artPI" type="string"></element>




The function looks like above but is not working, how can i access the ArticleType defined in BPM to use it in the java class ?

Maybe someone knows a good example ?

public class ConcatFunctionComplex implements ConcatFunctionComplexLocal {

private static final String PARAMETER1 = "parameter1";

private static final String PARAMETER2 = "parameter2";

private static final String RESULT = "result";

private static final String NAME_PROPERTY_INPUT_PARAMETER1 = SdoRenamingHelper

.renameXsdElementToSdoProperty(new QName(PARAMETER1), false);

private static final String NAME_PROPERTY_INPUT_PARAMETER2 = SdoRenamingHelper

.renameXsdElementToSdoProperty(new QName(PARAMETER2), false);

private static final String NAME_PROPERTY_OUTPUT_RESULT = SdoRenamingHelper

.renameXsdElementToSdoProperty(new QName(RESULT), false);


* Default constructor.


public ConcatFunctionComplex() {

// TODO Auto-generated constructor stub



public DataObject invokeSdo(DataObject inputDO, InvocationContext invocationContext) {

// input

Type typeInput = inputDO.getType();

String parameter1 = inputDO.getString(typeInput.getProperty(NAME_PROPERTY_INPUT_PARAMETER1));

String parameter2 = inputDO.getString(typeInput.getProperty(NAME_PROPERTY_INPUT_PARAMETER2));

DataObject outputD1 = invocationContext.createOutputDataObject();

Property resultProperty = outputD1.getType().getProperty(NAME_PROPERTY_OUTPUT_RESULT);

DataObject article = outputD1.createDataObject(resultProperty);

article.set("artName", parameter1);

article.set("artPI", parameter2);

return article;



thanks in advanance for your help.