Just curious: If you already have a 4GL BPM working, why go to (much less reliable & incurring a much more significant client app speed hit) client .net?
Rob
________________________________
From: petecon77 <
pconstan@...>
To:
vantage@yahoogroups.com
Sent: Friday, July 10, 2009 8:46:34 AM
Subject: [Vantage] BPM .NET Actions
Has anyone used a custom action process using .NET code? I am not familiar with Progress and am looking to bypass any custom action process code and use .NET instead of learning Progress programming code. For any anyone not familiar with what I'm talking about, I'm referring to the 'Invoke .NET method' option for BPM actions. I have setup my BPMServer and everything communicates properly, but I'm not sure how I can code my .NET custom logic for setting some values in the 'tt' tables prior to an 'Update'.
I am trying to replicate this Progress 4GL code in .NET:
find first ttUD100 where ttUD100.RowMod= 'A' no-error.
assign ttUD100.Date01 = NOW.
assign ttUD100.Number01 = 1600.
.NET Version in my custom Action logic:
public virtual void OnBeforeUpdate( System.Data. DataTable ttUD100, System.Data. DataTable ttUD100Attch, System.Data. DataTable ttUD100A)
{
//
// TODO: Replace the throw statement with any code for an action before UD100.GetaNewUD100( ) method invocation
//
Trace.WriteLine( "PeteTest .NET Action Process START...");
DataRow row = ttUD100.Rows[ 0];
if (row["RowMod" ].ToString( ) == "A")
{
row["Date01" ] = DateTime.Now;
row["Number01" ] = 1600;
Trace.WriteLine( "RowValue: 2 " + row["Key1"]. ToString( ) + ", " + row["Date01" ] + " " + row["Number01" ] + ": DateTime.Now= " + DateTime.Now) ;
}//end if
Trace.WriteLine( "PeteTest .NET Action Process END...");
}
I'm getting an error saying 'Date02 is null' when I try to set any of the row values,even if I'm actually setting Date02 field. If I comment out the lines where I'm trying to set the datafields and just output the values in the Trace Log everything works. It's just when I try change the value of a row field is where the error is generated. I would expect that I can use similar logic as the 4GL code and just assign the temporary table 'tt' fields, but I could be wrong.
Does anyone have any sample of code of how to set datafields values in .NET that they are willing to share?
[Non-text portions of this message have been removed]