cancel
Showing results for 
Search instead for 
Did you mean: 

Integration of BRM within BPM does not work

tbroek
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

I am working on a demo that shows the integration of BRM within BPM. A simple scenario with a gateway to decide for automatic or manual approval. I would like to use BRM to decide what to do: automatic or manual. For example: if amount <=25 then set status to automatic.

Unfortunately I can't get it to work. I took the examples I got on this years TechEd (BPM262), but this doesn't work at home

I also read through the blogs from Julius (), but these look very complicated. In my opinion it must be able to use business rules without any line of coding (despite what is stated in Julius blogs).

Ruleset trials and questions

- What is the returntype: the context or the parameter you want to be judged or returned?

- What are the parameters: context or the parameters you want to use?

- What is the result: context or the parameter you want to return?

- Why is it not possible to change the Overview tab, once you have created the ruleset?

- How to implement within the process, I used the mapping activity, but I either get an error at selecting the ruleset, or I get an error during runtime (nullpointer).

The concept is very powerfull but I feel that the integration of BRM within BPM is not finished yet. Am I missing something? Anyone implemented a business rule within a process without any line of coding?

Kind regards

Twan

Accepted Solutions (1)

Accepted Solutions (1)

artigopalan
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Twan,

This is Arti from the PM team.

From the information you have posted, i can see that you have used rules in the correct fashion. You should be able to use the rules defined in your BPM quite as similar as using any other function. The only reason I can think of presently is some build error. So I would to check the issue. Can you please send across to me the sample DCs you have created?

The lines of code mentioned in Julius's blog was to invoke the rules in an application by making a look-up call to the rule engine EJB. This is not required in your case, where you are trying to use rules directly in a process context.

Regarding the other questions you have asked please find my answers inline.

Ruleset trials and questions

- What is the returntype: the context or the parameter you want to be judged or returned?

- What are the parameters: context or the parameters you want to use?

- What is the result: context or the parameter you want to return?

That is correct, by setting the return type and the parameters you are just creating a signature for your ruleset. Here, the return type is the type of parameter you will be returning after the invocation of rules. The parameters is nothing but defining the context you use in the ruleset and the result is setting the parameter/value to be returned after invocation.

- Why is it not possible to change the Overview tab, once you have created the ruleset?

Here, I think you mean the signature of the ruleset. As of now, you are not allowed to change the signature of a ruleset, though you can create/modify the rules (if-then or Decision Tables) defined within it.

Hope this was useful.

Regards,

Arti

tbroek
Product and Topic Expert
Product and Topic Expert
0 Kudos

Thanks Arti for your support.

It turns out to be a version issue. I downloaded and installed the CE environment end of October 2008.

Three BRM components had release:

BRMS-BUILDT 1000.7.11.0.0.20080916231100

BRMS-CORE 1000.7.11.0.0.20080916231100

BRMS-FACADE 1000.7.11.0.0.20080916231100

Now with the newest download their release is:

BRMS-BUILDT 1000.7.11.1.0.20081109001200

BRMS-CORE 1000.7.11.1.0.20081109001200

BRMS-FACADE 1000.7.11.1.0.20081109001200

If you want to find out yourself: NWA> Problem Management> Java--> System Info -->Components Info. Narrow the search by typing brms in the Name column.

Even the Developer studio got updated, from Build id: 200809132152 to Build id: 200811082206.

Now my BRM issues have disappeared, my demo scenario is running smoothly. I will post a blog on this tomorrow.

Kind regards

Twan

Former Member
0 Kudos

Hi,

I tried to implement the senario as mentioned on the your blog

"Expense Statement Demo with BRM"

Link: /people/twan.vandenbroek/blog/2009/01/20/easy-process-implementation-with-sap-netweaver-bpm-the-brm-sequel

I am too facing problem with BRMS. Here are the details

BRMS-BUILDT 1000.7.11.0.0.20080731231100

BRMS-CORE 1000.7.11.0.0.20080731231100

BRMS-FACADE 1000.7.11.0.0.20080924231100

Is it happening because of my version issue?

Regards,

Pratik

Edited by: Pratik Khandelwal on Jan 20, 2010 1:55 PM

artigopalan
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Pratik,

I would like to clarify that there were few problems in the initial version of BRM which was made available for download, but it was later fixed and the updated version was made available almost instantly.So, i am not very sure if the problems you are facing can be fixed by installing the latest BRM SCs.

Can you please list out the problem you are facing? It would be helpful to trace it better if you could mention the steps you performed.

Best Regards,

Arti

Former Member
0 Kudos

Hi Arti,

I followed the steps mentioned on the blog (See my previous message for the blog link). When I run this process, I can able to execute "Enter Expense" step. After completion of this step I can't able to find any task on UWL. Even the process is in running state as seen from NWA>Operation Mgmt. If I select this particular process and click on "Show Task", message is being displayed "No Task Instance to display".

Initailly tcbrmsfacade java application service was failed to start. So, as per "Note 1255521 - Hotfix for BRMSFACADE component - SAP EHP1 FOR SAP NW CE 7.1" I deployed the same and it is in running state now.

I am new to BPM and BRMS, please let me know what could be probable cause.

Thanks & Regards,

Pratik

Former Member
0 Kudos

Hi arti, <br>

I found two errors on server's error log while executing the same. I am enclosing initial section of errors. See if it's helpful to sort out the issue.

<br><br><br>

1. System exception

[EXCEPTION]

javax.ejb.EJBException: (Failed in component: sap.com/tcbrmsglxapp, BC-BMT-BRM-ENG) Exception raised from invocation of public void com.sap.brms.glx.ejb.RulesetInvokerBean.invokeRuleset(java.lang.String,commonj.sdo.helper.HelperContext,commonj.sdo.DataObject,commonj.sdo.DataObject) method on bean instance com.sap.brms.glx.ejb.RulesetInvokerBean@63f4db for bean sap.com/tcbrmsglxappannotation|com.sap.brms.glx.ejb.jarannotation|RulesetInvoker in application sap.com/tcbrmsglx~app.; nested exception is: java.lang.NullPointerException

java.lang.NullPointerException

at com.sap.brms.glx.ejb.SDODOMConversionHelper.copyElementDataToDataObject(SDODOMConversionHelper.java:254)

at com.sap.brms.glx.ejb.SDODOMConversionHelper.fillResponseDataObject(SDODOMConversionHelper.java:198)

at com.sap.brms.glx.ejb.RulesetInvokerBean.invokeRuleset(RulesetInvokerBean.java:200)

at sun.reflect.GeneratedMethodAccessor1912.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:585)

<br><br><br>

2. An error occurred while executing transition MAPPING_Validate__Expense(Token_0_Expense_Approval_Process_fb9d3700912540231d95cb19129723d8(Instance_0_Expense_Approval_Process_fb9d3700912540231d95cb19129723d8(null,null,null,false),1), Instance_0_Expense_Approval_Process_fb9d3700912540231d95cb19129723d8(null,null,null,false), Context_0_DO_Context_fb9d3700912540231d95cb19129723d8(Instance_0_Expense_Approval_Process_fb9d3700912540231d95cb19129723d8(null,null,null,false),Scope_3_Expense_Approval_fb9d3700912540231d95cb19129723d8(Instance_0_Expense_Approval_Process_fb9d3700912540231d95cb19129723d8(null,null,null,false)),1,true)): com.sap.glx.core.kernel.api.TransitionException: An exception occurred while executing the script "_Expense_Approval:MAPPING_Validate__Expense(

com.sap.glx.adapter.BPMNAdapter:Token_0_Expense_Approval_Process_fb9d3700912540231d95cb19129723d8 token,

com.sap.glx.adapter.BPMNAdapter:Instance_0_Expense_Approval_Process_fb9d3700912540231d95cb19129723d8 parent,

com.sap.glx.adapter.internal.ContainerAdapter:Context_0_DO_Context_fb9d3700912540231d95cb19129723d8 context_0){

exit=new com.sap.glx.adapter.BPMNAdapter:Exit();

exit:addParameter(token);

exit:addParameter(parent);

exit:addParameter(context_0);

exit:onActivation("4B553CE4D75A4D7004B711DFAC81001372BEFBBB", parent, token);

delete exit;

controller=new com.sap.glx.adapter.internal.ExceptionAdapter:ExceptionController();

controller:setContext(token);

delete controller;

mapper=new com.sap.glx.adapter.internal.Transformer:DataMapper();

yves_in=new com.sap.glx.adapter.internal.Transformer:Data();

yves_out=new com.sap.glx.adapter.internal.Transformer:Data();

data=context_0:getData();

yves_in:setData("sap.com/glx/", "$sap.com/glx/:DO_Context", data, "6536A68BEDF1903C9327404A8E4F756E");

data=context_0:getData();

scope=new com.sap.glx.adapter.internal.TypeRegistry:GenericScope(null, "6536A68BEDF1903C9327404A8E4F756E");

copy=scope:copy(data);

delete scope;

yves_out:setData("sap.com/glx/", "$sap.com/glx/:DO_Context", copy, "6536A68BEDF1903C9327404A8E4F756E");

mapper:map("4B553CE4D75CBE7404B711DFAA74001372BEFBBB_fb9d3700912540231d95cb19129723d8", yves_in, yves_out);

data=yves_out:getData("sap.com/glx/", "$sap.com/glx/:DO_Context", "6536A68BEDF1903C9327404A8E4F756E");

context_0:setData(data);

delete yves_in;

delete yves_out;

delete mapper;

token:state=3;

}"

at com.sap.glx.core.kernel.execution.transition.ScriptTransition.execute(ScriptTransition.java:69)

<br><br>

Regards,<br>

Pratik

<br>

Edited by: Pratik Khandelwal on Jan 25, 2010 10:26 AM<br>

Edited by: Pratik Khandelwal on Jan 25, 2010 10:29 AM<br>

Edited by: Pratik Khandelwal on Jan 25, 2010 10:29 AM

artigopalan
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Pratik,

Sorry for the late reply.

Regarding the issue, it seems that the issue you are facing is similar to the issue Twan faced and can be fixed by deploying a corrected set of BRM SCs.

Can you contact please me on mail? I will share the right SCs across to you.

Also, FYI - The 7.11 SP3 is already available for general customers now. We would recommend installing it.

Best Regards,

Arti

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello all,

I want to use rules in BPM . Earlier i have used rules through java class (using Engine invoker) but this time i want to use rules in bpm so i just want to know that what we need to set in result field . does it always take object type ?? or anything(primitive type)

thanks in advance

Regards

vinit sharma