BPM Data Form?

Hi

I have a dev requirement:
User Enters a Part Number
Then if Part number begins with 9p or 8 it picks a route of 1 or 2. if the part number does not begin with either-it then asks another question, and based on answer- it may then ask another and so on.

The resultant route would then be passed to a BAQ which would calculate costings.

Do you think I could use a BPM data form for this? I have never used one before -any advice much appreciated :slight_smile:
Many thanks
Carla

My idea is as follows:

BPM Data Form1 - Enter Part Num
Pass result to a BPM
Condition widget: If begins with 9p or 8 - run BAQ with route 1 or route 2
if false
BPM Data form 2 runs - Pass to BPM - Select Mill or Banbury - If mill Run BAQ with route 3
If Banbury
Condition widget- IF begins with 7U - run BAQ with route 8,IF 7V run baq with Route 6

and so on

I can my my idea Could work - ONLY iff I can call my baq from within the bpm and then display the result from the BAQ into the screen via a pop up of some sort.

Has anyone done this?

Not quite clear on your flow, but anyhow BPM Data Forms are launched from within the BPM so you can have conditional logic, multiple BPM data forms and hence set up a context field with a value to use in your BAQ. Depending on the process flow, you might find you can create a single BPM Data Form and apply a customisation, using row rules to control which fields need populating. When pronpting for a part num, what BPM intercept are you targetting ?

Hi Thanks for a reply

I began designing the BPM Flow and below is a screen shot

For the time being where you see Show Message - this is where I want to call a baq to pass information and return a result.
Using conditions I have been able to flow to the next question using another Data form and so on, but I don’t knw if im over complicating it, Im just really stuck on how to run ideally my dashboard passing the parameter through, or a baq

image

2nd flow then asks

image

Does this make it clearer?

I think it depends on what data you are getting back and what you want to do with it (display on BAQ data form ? Or modify the main table you are dealing with). I dont think you can run a BAQ from a BPM just using widgets but there are a number of setter widgets to update fields or tables based on a query (not used them myself but there designer does look a lot like the BAQ designer).

You can run a BAQ but its not nice. For example, you could display BAQ results on the BPM data forms themselves but you’d need to add a customisation and add some code. You may be able to adapt the following code:

‘’'cs

// Execute a BAQ by Calling the Client Adapter
private void CallBAQUsingAdapter()
{
try
{
// Declare and create an instance of the Adapter.
DynamicQueryAdapter adapterDynamicQuery = new DynamicQueryAdapter(this.oTrans);
adapterDynamicQuery.BOConnect();

// Declare and Initialize Variables
string BAQName = "DIEN-HASO";
Ice.BO.QueryExecutionDataSet ds = new Ice.BO.QueryExecutionDataSet();

// Add Parameter Rows
// Definition: AddExecutionParameterRow(string ParameterID, string ParameterValue, string ValueType, bool IsEmpty, Guid SysRowID, string RowMod)
// Possible ValueTypes: nvarchar, int, decimal, date, datetime, bit, uniqueidentifier, bigint
// IsEmpty indicates if your passed value Is Empty because if it is, you can define in your params to use a default value if empty.
// Typically you use string.IsNullOrEmpty(yourValueVariable) but if you are hard coding a value then you can simply set it to false
ds.ExecutionParameter.AddExecutionParameterRow("QuoteNumber", "10003", "int", false, Guid.Empty, "A");
ds.ExecutionParameter.AddExecutionParameterRow("FirstName", "Bill", "nvarchar", false, Guid.Empty, "A");

// Call Adapter method
adapterDynamicQuery.ExecuteByID(BAQName, ds);

// Lets Loop through our results
if (adapterDynamicQuery.QueryResults.Tables["Results"].Rows.Count > 0)
{
	foreach (DataRow item in adapterDynamicQuery.QueryResults.Tables["Results"].Rows)
	{
		// In E9 you used TableName.Column in E10 it is TableName_Column
	    string val = item["QuoteHed_QuoteNum"].ToString();
	}
}

// Cleanup Adapter Reference
adapterDynamicQuery.Dispose();

} catch (System.Exception ex)
{
	ExceptionBox.Show(ex);
}

}’’’

You can also run a BAQ from c# code using the Execute Custom Code widget, again you’d need to adapt the following code to suit:

‘’'cs

try
{
// Declare and Initialize Variables
string BAQName = “DIEN-HASO”;
Ice.BO.QueryExecutionDataSet ds = new Ice.BO.QueryExecutionDataSet();

// Add Parameter Rows
// Definition: AddExecutionParameterRow(string ParameterID, string ParameterValue, string ValueType, bool IsEmpty, Guid SysRowID, string RowMod)
// Possible ValueTypes: nvarchar, int, decimal, date, datetime, bit, uniqueidentifier, bigint
// IsEmpty indicates if your passed value Is Empty because if it is, you can define in your params to use a default value if empty.
// Typically you use string.IsNullOrEmpty(yourValueVariable) but if you are hard coding a value then you can simply set it to false
ds.ExecutionParameter.AddExecutionParameterRow("QuoteNumber", "10003", "int", false, Guid.Empty, "A");
ds.ExecutionParameter.AddExecutionParameterRow("FirstName", "Bill", "nvarchar", false, Guid.Empty, "A");

// Use Business Object Directly
Ice.Proxy.BO.DynamicQueryImpl dynamicQuery = WCFServiceSupport.CreateImpl<Ice.Proxy.BO.DynamicQueryImpl>((Ice.Core.Session)oTrans.Session, Epicor.ServiceModel.Channels.ImplBase<Ice.Contracts.DynamicQuerySvcContract>.UriPath);
System.Data.DataSet results = dynamicQuery.ExecuteByID(BAQName, ds);

// Lets Loop through our results
if (results.Tables["Results"].Rows.Count > 0)
{
	foreach (DataRow item in results.Tables["Results"].Rows)
	{
		// In E9 you used TableName.Column in E10 it is TableName_Column
	    string val = item["QuoteHed_QuoteNum"].ToString();
	}
}
} catch (System.Exception ex)
{
	ExceptionBox.Show(ex);

}’’’

Hope this helps.

Regards,
Jon

1 Like

Thanks for all your help.

My development is almost complete. I have bpmdata forms opening depending on what was answered in the previous bpmdata form and its flowing really well.

My last issue is that on load of the BPM data forms they remember the last data entered when it was last run. I’d like to clear this data on some fields on load or on close. Everythign ive tried so far does work. Example is below

This is the bpmform

The BPMData form

:+1:

why not clearing your Character01 variable on the BPM itself “set BPMCalConext…to blank” after using it in whatever logic you are running

Hi thanks for reply- I could clear all within the bpm before the flows begin I guess, I wouldn’t want to clear within the flow as it utilises them across different forms. Ill give it a go. Thanks!

every time you run your BPB will go through one of the possible designed paths (each condition is branched Yes and No) , you should be able to clear your variable at the end of each of these paths after using it in your logic, this should not affect your design.