Add BOReader.GetList in BPM

This is my first time to invoke one BO method in BPM by code. Because I can’t find BOReader.GetList method directly, so I tried to add it by code.

I added reference.

Then in Code part,
Ice.Proxy.Lib.BOReaderImpl BOR =new Ice.Proxy.Lib.BOReaderImpl();
there is an error:
‘Ice.Proxy.Lib.BOReaderImpl’ does not contain a constructor that takes 0 arguments.
From Tracing Log, I got there are three parameters in GetList.

<parameter name="serviceNamespace" type="System.String"><![CDATA[Erp:BO:SalesRep]]></parameter>
<parameter name="whereClause" type="System.String"><![CDATA[(InActive = false) AND (Inactive=False)]]></parameter>
<parameter name="columnList" type="System.String"><![CDATA[SalesRepCode,Name]]></parameter>

How can I call BOReader by code?
Thanks.

You don’t want to use BOReader on a BPM server side, wrong tool for the job. What are you trying to do?

I want to add new salesperson when I create a new quote. I know I can add new salesperson from New menu, but our sales team wants to complete the whole process after they select one customer.
From tracing log, I got all methods I need to use.
Erp.Proxy.BO.QuoteImpl—GetNewQSalesRP
Ice.Proxy.Lib.BOReaderImpl–GetList
Erp.Proxy.BO.QuoteImpl–GetSalesRepInfo
Ice.Proxy.BO.ReportMonitorImpl—GetRowsKeepIdleTime
Erp.Proxy.BO.QuoteImpl—Update

For example, When I create a new quote, I select a customer which territory id is US01, in this territory I have three salesperson, AA,BB,CC.
In Epicor, we have to add AA,BB,CC three times by New/SalesPerson menu.
My goal is to add AA,BB,CC automatically after I select customer.

I have worked on this project for two weeks. I had a lot of trying. If BOReader can’t be used in BPM, is it possible to achieve my goal? …Is Customization able to do it?

Thank you.

Yeah you can do this but you don’t need BO reader. Simply call the required BOs to accomplish what you need. BOReader is used to query data in the db which you can do directly on the BPM

So the BOs I need are GetNewQSalesRP, GetSalesRepInfo and Update?
Do I need ReportMonitorImpl.GetRowsKeepIdleTime?

Nope, you only need the BO’s related to the function you are performing. Look at the trace in detail and you should be able to discern which ones you need for the most part

Thank you. and in my case. I had three sales person.
I came up two ideas for this BPM.
First, I invoke BOs three times like
Invoke GetNewQSalesRP–Invoke GetSalesRepInfo–Invoke Update (add first person)-- Invoke GetNewQSalesRP–Invoke GetSalesRepInfo----Invoke Update (add second person)-- Invoke GetNewQSalesRP–Invoke GetSalesRepInfo --Invoke Update (add third person). then three person are added.
Second, I invoke BOs like a cycle.

the cycle will run three times.

Which way should be better?

Cycle is cleaner as long as you know when to break.

OK. Thank you. I try to complete my task one more time. Thanks.