I’m attempting to get data from a Customization into a BPM using the BPM Context Data. At this point, just the basic functionality of passing Strings into the BPM.
I’ve run into a familiar wall - incomplete pieces of the puzzle, with critical information missing.
I’m testing this on a new UD08 Customization.
From a posting on another site I came up with this code :
UD08Adapter adapterUD08 = new UD08Adapter( this.oTrans ); adapterUD08.BOConnect( );
adapterUD08.BpmContext = new ContextDataSet( );
var row = adapterUD08.BpmContext.BpmData.NewRow( );
row["Character10"] = "BPMC_Character10";
row["Number01"] = 11111;
adapterUD08.BpmContext.BpmData.Rows.Add( row );
The line :
var row = adapterUD08.BpmContext.BpmData.NewRow( );
throws a complier error :
The type ‘System.Data.TypedTableBase`1’ is defined in an assembly that is not referenced. You must add a reference to assembly ‘System.Data.DataSetExtensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089’.
From a post on a MicroSoft site, I found that System.Data.DataSetExtensions should be included with the statement :
using System.Data;
which I already have in the Customization Code.
I also found a test for System.Data.DataSetExtensions in that post, consisting of these two lines :
DataTable dt = new DataTable( );
dt.AsDataView( );
According to that post, “AsDataView is an API contained on DataSetExtensions and should be recognized when compiling.”
However, the line :
dt.AsDataView( );
throws the compiler error :
‘System.Data.DataTable’ does not contain a definition for ‘AsDataView’ and no extension method ‘AsDataView’ accepting a first argument of type ‘System.Data.DataTable’ could be found (are you missing a using directive or an assembly reference?)
So System.Data.DataSetExtensions is apparently not included in the Customization by the statement
using System.Data;
Am I on the right track here trying to get Customization data into the BPM, or is there a better way ?
If this is the right track, what using statements, assemblies, and code would I use to accomplish it ?