BPM Server .NET

Thanks Peter,
I found a bit of a workaround although is not optimal. I start a new process
from the BPM and then sleep that process for 30 seconds then use the Visual
Studio attach to process feature to step through it.
Sincerely
Jose C Gomez

http://www.josecgomez.com


On Fri, Jul 31, 2009 at 8:34 AM, Peter Constantinidis
<pconstan@...>wrote:

>
>
> Jose,
> The only way that I figured out how to debug is write to the log file where
> you installed your BPM Server. I haven't found a way to step through it in
> my local development environment. You will need to execute the BPM through
> Vantage and then go and check the log file on your BPMServer.
>
> The log file should be located here on the server you installed the BPM
> Server:
> C:\Program
> Files\Epicor\BPMServer\Logs\Action_Epicor.Mfg.BPM.Server.WinService.exe.log
>
> Here's my sample code of how I write to the log. Basically you just use the
> Trace object.
>
> namespace Bpm.Custom {
> using System;
> using System.Data;
> using System.Diagnostics;
> using Bpm.Action;
>
> public class UD100 {
>
> public 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")
> {
> Trace.WriteLine("RowValue1: " + " RowState: " + row.RowState.ToString() +
> ", CreateDate: " + row["Key1"].ToString() + ", CreateUserID: " +
> row["Date01"] + " " + row["Number01"] + ": DateTime.Now=" + DateTime.Now);
> row.BeginEdit();
> FixDBNulls objFix = new FixDBNulls();
> objFix.FillDBNulls(row);
> row["Date01"] = DateTime.Now;
> row["Number01"] = 9999;
> row.EndEdit();
> Trace.WriteLine("RowValue:2 " + " RowState: " + row.RowState.ToString() +
> ", CreateDate: " + row["Key1"].ToString() + ", CreateUserID: " +
> row["Date01"] + " " + row["Number01"] + ": DateTime.Now=" + DateTime.Now);
> }//end if
> Trace.WriteLine("PeteTest .NET Action Process END...");
> }
> }//end class UD100
>
> public class FixDBNulls
> {
> public void FillDBNulls(DataRow inRow)
> {
> Int32 iCol = 0;
> for (iCol = 0; iCol < inRow.ItemArray.Length; iCol++)
> {
> if (inRow[iCol].Equals(DBNull.Value))
> {
> switch (inRow.Table.Columns[iCol].DataType.ToString())
> {
> case "System.Int32":
> case "System.Int16":
> case "System.Double":
> inRow[iCol] = 0;
> break;
> case "System.String":
> inRow[iCol] = "";
> break;
> case "System.DateTime":
> inRow[iCol] = DateTime.MinValue;
> break;
> }//end switch
> }//end if
> }//end foreach
>
> }//end FillDBNulls()
> }//end Class FixDBNulls
> }
>
> Regards,
>
> Peter Constantinidis
> Software Development Manager
> -------------------------------------------------------
> Global Packaging, Inc.
> Phone: (484) 362-2149
> Mobile: (610) 213-6322
> Fax: (484) 831-1109
> Email: pconstan@... <pconstan%40glopkg.com><mailto:
> pconstan@... <pconstan%40glopkg.com>>
>
> From: Jose Gomez [mailto:jose@... <jose%40josecgomez.com>]
> Sent: Wednesday, July 29, 2009 11:26 AM
> To: Peter Constantinidis
> Cc: vantage@yahoogroups.com <vantage%40yahoogroups.com>
> Subject: Re: [Vantage] Re: BPM Server .NET
>
> Peter,
> Thanks for all your help so far. I've got it working with a simple BPM but
> I can't figure out of there is a way to debug it. I can write the code and
> compile it and when its something simple like changing a field or something
> llike ti just runs. But if its something more complicated and it generates
> exceptions and such. It seems to jus crash even thogh I have try catches and
> others to handle exceptions. Is there a way that you know of debuging it?
>
> Sincerely
> Jose C Gomez
>
> http://www.josecgomez.com
> Sent from Jacksonville, FL, United States
> On Mon, Jul 27, 2009 at 8:44 AM, Peter Constantinidis <pconstan@...<pconstan%40glopkg.com>
> <mailto:pconstan@... <pconstan%40glopkg.com>>> wrote:
>
> Jose,
>
> You will need to install the BPM Server on your local development
> environment as well. Once you do that the assembly reference you will need
> will be located here:
>
> C:\Program Files\ComPlus
> Applications\{CB819E8D-DF90-4B54-B72C-51787B8A5091}\Epicor.Mfg.BPM.Server.CallContext.dll
>
> This is the assembly you will need in order to build your project properly.
>
> Regards,
>
> Peter Constantinidis
>
> Software Development Manager
> -------------------------------------------------------
>
> Global Packaging, Inc.
>
> Phone: (484) 362-2149
>
> Mobile: (610) 213-6322
>
> Fax: (484) 831-1109
>
> Email: pconstan@... <pconstan%40glopkg.com><mailto:
> pconstan@... <pconstan%40glopkg.com>>
>
> From: Jose Gomez [mailto:jose@... <jose%40josecgomez.com>
> <mailto:jose@... <jose%40josecgomez.com>>]
> Sent: Monday, July 27, 2009 8:39 AM
> To: vantage@yahoogroups.com <vantage%40yahoogroups.com><mailto:
> vantage@yahoogroups.com <vantage%40yahoogroups.com>>; Peter Constantinidis
>
> Subject: Re: [Vantage] Re: BPM Server .NET
>
> Hi,
>
> Thanks for your help. I installed the BPM Server and such. But when
> creating the VS Project to make the action I can't find the BPM.Action
> reference dll. Where is that located?
>
> Thanks!
> Sincerely
> Jose C Gomez
>
> http://www.josecgomez.com<http://www.josecgomez.com/>
>
> On Fri, Jul 24, 2009 at 9:50 AM, petecon77 <pconstan@...<pconstan%40glopkg.com>
> <mailto:pconstan@... <pconstan%40glopkg.com>>> wrote:
>
> There's really not that much involved in installing the BPMServer.
> The documentation is in the Vantage Help file. Just Search for BPM Server
> and you should get all the information you will need.
>
> This was enough to get me started.
> Check out Message #80239 and Message #80327.
> This will help you with how to actually implement an Action and working
> with the passed in DataSet once you have the BPM Server setup.
>
> Good Luck!
>
> --- In vantage@yahoogroups.com <vantage%40yahoogroups.com><mailto:
> vantage%40yahoogroups.com <vantage%2540yahoogroups.com>>, Jose Gomez
> <jose@...> wrote:
> >
> > Hello,
> > We are trying to use BPM to modify an action on Sales Order Update we
> have
> > used BPM's through 4GL in the past we are .NET programers and we figure
> it
> > would be easier to create it using the Call .NET Method Action. But we
> can't
> > figure out how to set up the BPM Server and where to get the references
> > from.
> > Anyone have a doc or something that walks you through setting up the BPM
> > Server with an example?
> >
> > We'd appreciate it
> >
> > Thanks!
> >
> >
> >
> > Sincerely
> > Jose C Gomez
> >
> > http://www.josecgomez.com<http://www.josecgomez.com/>
> >
> >
>
> > [Non-text portions of this message have been removed]
> >
>
> [Non-text portions of this message have been removed]
>
>
>


[Non-text portions of this message have been removed]
Hello,
We are trying to use BPM to modify an action on Sales Order Update we have
used BPM's through 4GL in the past we are .NET programers and we figure it
would be easier to create it using the Call .NET Method Action. But we can't
figure out how to set up the BPM Server and where to get the references
from.
Anyone have a doc or something that walks you through setting up the BPM
Server with an example?

We'd appreciate it

Thanks!



Sincerely
Jose C Gomez

http://www.josecgomez.com


[Non-text portions of this message have been removed]
There's really not that much involved in installing the BPMServer.
The documentation is in the Vantage Help file. Just Search for BPM Server and you should get all the information you will need.

This was enough to get me started.
Check out Message #80239 and Message #80327.
This will help you with how to actually implement an Action and working with the passed in DataSet once you have the BPM Server setup.

Good Luck!


--- In vantage@yahoogroups.com, Jose Gomez <jose@...> wrote:
>
> Hello,
> We are trying to use BPM to modify an action on Sales Order Update we have
> used BPM's through 4GL in the past we are .NET programers and we figure it
> would be easier to create it using the Call .NET Method Action. But we can't
> figure out how to set up the BPM Server and where to get the references
> from.
> Anyone have a doc or something that walks you through setting up the BPM
> Server with an example?
>
> We'd appreciate it
>
> Thanks!
>
>
>
> Sincerely
> Jose C Gomez
>
> http://www.josecgomez.com
>
>
> [Non-text portions of this message have been removed]
>
Hi,
Thanks for your help. I installed the BPM Server and such. But when creating
the VS Project to make the action I can't find the BPM.Action reference dll.
Where is that located?

Thanks!
Sincerely
Jose C Gomez

http://www.josecgomez.com


On Fri, Jul 24, 2009 at 9:50 AM, petecon77 <pconstan@...> wrote:

>
>
> There's really not that much involved in installing the BPMServer.
> The documentation is in the Vantage Help file. Just Search for BPM Server
> and you should get all the information you will need.
>
> This was enough to get me started.
> Check out Message #80239 and Message #80327.
> This will help you with how to actually implement an Action and working
> with the passed in DataSet once you have the BPM Server setup.
>
> Good Luck!
>
>
> --- In vantage@yahoogroups.com <vantage%40yahoogroups.com>, Jose Gomez
> <jose@...> wrote:
> >
> > Hello,
> > We are trying to use BPM to modify an action on Sales Order Update we
> have
> > used BPM's through 4GL in the past we are .NET programers and we figure
> it
> > would be easier to create it using the Call .NET Method Action. But we
> can't
> > figure out how to set up the BPM Server and where to get the references
> > from.
> > Anyone have a doc or something that walks you through setting up the BPM
> > Server with an example?
> >
> > We'd appreciate it
> >
> > Thanks!
> >
> >
> >
> > Sincerely
> > Jose C Gomez
> >
> > http://www.josecgomez.com
> >
> >
> > [Non-text portions of this message have been removed]
> >
>
>
>


[Non-text portions of this message have been removed]
Jose,
You will need to install the BPM Server on your local development environment as well. Once you do that the assembly reference you will need will be located here:
C:\Program Files\ComPlus Applications\{CB819E8D-DF90-4B54-B72C-51787B8A5091}\Epicor.Mfg.BPM.Server.CallContext.dll

This is the assembly you will need in order to build your project properly.

Regards,

Peter Constantinidis
Software Development Manager
-------------------------------------------------------
Global Packaging, Inc.
Phone: (484) 362-2149
Mobile: (610) 213-6322
Fax: (484) 831-1109
Email: pconstan@...<mailto:pconstan@...>



From: Jose Gomez [mailto:jose@...]
Sent: Monday, July 27, 2009 8:39 AM
To: vantage@yahoogroups.com; Peter Constantinidis
Subject: Re: [Vantage] Re: BPM Server .NET

Hi,
Thanks for your help. I installed the BPM Server and such. But when creating the VS Project to make the action I can't find the BPM.Action reference dll. Where is that located?

Thanks!
Sincerely
Jose C Gomez

http://www.josecgomez.com

On Fri, Jul 24, 2009 at 9:50 AM, petecon77 <pconstan@...<mailto:pconstan@...>> wrote:


There's really not that much involved in installing the BPMServer.
The documentation is in the Vantage Help file. Just Search for BPM Server and you should get all the information you will need.

This was enough to get me started.
Check out Message #80239 and Message #80327.
This will help you with how to actually implement an Action and working with the passed in DataSet once you have the BPM Server setup.

Good Luck!


--- In vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>, Jose Gomez <jose@...> wrote:
>
> Hello,
> We are trying to use BPM to modify an action on Sales Order Update we have
> used BPM's through 4GL in the past we are .NET programers and we figure it
> would be easier to create it using the Call .NET Method Action. But we can't
> figure out how to set up the BPM Server and where to get the references
> from.
> Anyone have a doc or something that walks you through setting up the BPM
> Server with an example?
>
> We'd appreciate it
>
> Thanks!
>
>
>
> Sincerely
> Jose C Gomez
>
> http://www.josecgomez.com<http://www.josecgomez.com/>
>
>
> [Non-text portions of this message have been removed]
>




[Non-text portions of this message have been removed]
vantage@yahoogroups.com wrote:
> Hi,
> Thanks for your help. I installed the BPM Server and such. But when
> creating the VS Project to make the action I can't find the
> BPM.Action reference dll. Where is that located?

Search in Program Files. It's different for Epicor 9 and Vantage depending
on the version.

Just a reminder, you will not have the "global" vars available in .Net BPMs
that you have in a 4GL BPM. You'll have to stuff any of that into a user def
var.

Mark W.


__________ Information from ESET NOD32 Antivirus, version of virus signature
database 4281 (20090727) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
Thanks!
Sincerely
Jose C Gomez

http://www.josecgomez.com


On Mon, Jul 27, 2009 at 8:48 AM, Mark Wonsil <mark_wonsil@...> wrote:

>
>
> vantage@yahoogroups.com <vantage%40yahoogroups.com> wrote:
> > Hi,
> > Thanks for your help. I installed the BPM Server and such. But when
> > creating the VS Project to make the action I can't find the
> > BPM.Action reference dll. Where is that located?
>
> Search in Program Files. It's different for Epicor 9 and Vantage depending
> on the version.
>
> Just a reminder, you will not have the "global" vars available in .Net BPMs
> that you have in a 4GL BPM. You'll have to stuff any of that into a user
> def
> var.
>
> Mark W.
>
>
> __________ Information from ESET NOD32 Antivirus, version of virus
> signature
> database 4281 (20090727) __________
>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.eset.com
>
>
>
>


[Non-text portions of this message have been removed]
Peter,
Thanks for all your help so far. I've got it working with a simple BPM but I
can't figure out of there is a way to debug it. I can write the code and
compile it and when its something simple like changing a field or something
llike ti just runs. But if its something more complicated and it generates
exceptions and such. It seems to jus crash even thogh I have try catches and
others to handle exceptions. Is there a way that you know of debuging it?


Sincerely
Jose C Gomez

http://www.josecgomez.com
Sent from Jacksonville, FL, United States

On Mon, Jul 27, 2009 at 8:44 AM, Peter Constantinidis
<pconstan@...>wrote:

> Jose,
>
> You will need to install the BPM Server on your local
> development environment as well. Once you do that the assembly reference you
> will need will be located here:
>
> C:\Program Files\ComPlus
> Applications\{CB819E8D-DF90-4B54-B72C-51787B8A5091}\Epicor.Mfg.BPM.Server.CallContext.dll
>
>
>
> This is the assembly you will need in order to build your project properly.
>
>
>
> Regards,
>
>
>
> *Peter Constantinidis***
>
> *Software Development Manager*
> -------------------------------------------------------
>
> *Global Packaging, Inc.*
>
> Phone: (484) 362-2149
>
> Mobile: (610) 213-6322
>
> Fax: (484) 831-1109
>
> Email: pconstan@...
>
>
>
>
>
>
>
> *From:* Jose Gomez [mailto:jose@...]
> *Sent:* Monday, July 27, 2009 8:39 AM
> *To:* vantage@yahoogroups.com; Peter Constantinidis
> *Subject:* Re: [Vantage] Re: BPM Server .NET
>
>
>
> Hi,
>
> Thanks for your help. I installed the BPM Server and such. But when
> creating the VS Project to make the action I can't find the BPM.Action
> reference dll. Where is that located?
>
>
>
> Thanks!
> Sincerely
> Jose C Gomez
>
> http://www.josecgomez.com
>
> On Fri, Jul 24, 2009 at 9:50 AM, petecon77 <pconstan@...> wrote:
>
>
>
> There's really not that much involved in installing the BPMServer.
> The documentation is in the Vantage Help file. Just Search for BPM Server
> and you should get all the information you will need.
>
> This was enough to get me started.
> Check out Message #80239 and Message #80327.
> This will help you with how to actually implement an Action and working
> with the passed in DataSet once you have the BPM Server setup.
>
> Good Luck!
>
>
>
> --- In vantage@yahoogroups.com <vantage%40yahoogroups.com>, Jose Gomez
> <jose@...> wrote:
> >
> > Hello,
> > We are trying to use BPM to modify an action on Sales Order Update we
> have
> > used BPM's through 4GL in the past we are .NET programers and we figure
> it
> > would be easier to create it using the Call .NET Method Action. But we
> can't
> > figure out how to set up the BPM Server and where to get the references
> > from.
> > Anyone have a doc or something that walks you through setting up the BPM
> > Server with an example?
> >
> > We'd appreciate it
> >
> > Thanks!
> >
> >
> >
> > Sincerely
> > Jose C Gomez
> >
> > http://www.josecgomez.com
> >
> >
>
> > [Non-text portions of this message have been removed]
> >
>
>
>
>
>


[Non-text portions of this message have been removed]
Jose,
The only way that I figured out how to debug is write to the log file where you installed your BPM Server. I haven't found a way to step through it in my local development environment. You will need to execute the BPM through Vantage and then go and check the log file on your BPMServer.

The log file should be located here on the server you installed the BPM Server:
C:\Program Files\Epicor\BPMServer\Logs\Action_Epicor.Mfg.BPM.Server.WinService.exe.log

Here's my sample code of how I write to the log. Basically you just use the Trace object.


namespace Bpm.Custom {
using System;
using System.Data;
using System.Diagnostics;
using Bpm.Action;



public class UD100 {


public 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")
{
Trace.WriteLine("RowValue1: " + " RowState: " + row.RowState.ToString() + ", CreateDate: " + row["Key1"].ToString() + ", CreateUserID: " + row["Date01"] + " " + row["Number01"] + ": DateTime.Now=" + DateTime.Now);
row.BeginEdit();
FixDBNulls objFix = new FixDBNulls();
objFix.FillDBNulls(row);
row["Date01"] = DateTime.Now;
row["Number01"] = 9999;
row.EndEdit();
Trace.WriteLine("RowValue:2 " + " RowState: " + row.RowState.ToString() + ", CreateDate: " + row["Key1"].ToString() + ", CreateUserID: " + row["Date01"] + " " + row["Number01"] + ": DateTime.Now=" + DateTime.Now);
}//end if
Trace.WriteLine("PeteTest .NET Action Process END...");
}
}//end class UD100

public class FixDBNulls
{
public void FillDBNulls(DataRow inRow)
{
Int32 iCol = 0;
for (iCol = 0; iCol < inRow.ItemArray.Length; iCol++)
{
if (inRow[iCol].Equals(DBNull.Value))
{
switch (inRow.Table.Columns[iCol].DataType.ToString())
{
case "System.Int32":
case "System.Int16":
case "System.Double":
inRow[iCol] = 0;
break;
case "System.String":
inRow[iCol] = "";
break;
case "System.DateTime":
inRow[iCol] = DateTime.MinValue;
break;
}//end switch
}//end if
}//end foreach

}//end FillDBNulls()
}//end Class FixDBNulls
}

Regards,

Peter Constantinidis
Software Development Manager
-------------------------------------------------------
Global Packaging, Inc.
Phone: (484) 362-2149
Mobile: (610) 213-6322
Fax: (484) 831-1109
Email: pconstan@...<mailto:pconstan@...>



From: Jose Gomez [mailto:jose@...]
Sent: Wednesday, July 29, 2009 11:26 AM
To: Peter Constantinidis
Cc: vantage@yahoogroups.com
Subject: Re: [Vantage] Re: BPM Server .NET

Peter,
Thanks for all your help so far. I've got it working with a simple BPM but I can't figure out of there is a way to debug it. I can write the code and compile it and when its something simple like changing a field or something llike ti just runs. But if its something more complicated and it generates exceptions and such. It seems to jus crash even thogh I have try catches and others to handle exceptions. Is there a way that you know of debuging it?


Sincerely
Jose C Gomez

http://www.josecgomez.com
Sent from Jacksonville, FL, United States
On Mon, Jul 27, 2009 at 8:44 AM, Peter Constantinidis <pconstan@...<mailto:pconstan@...>> wrote:

Jose,

You will need to install the BPM Server on your local development environment as well. Once you do that the assembly reference you will need will be located here:

C:\Program Files\ComPlus Applications\{CB819E8D-DF90-4B54-B72C-51787B8A5091}\Epicor.Mfg.BPM.Server.CallContext.dll



This is the assembly you will need in order to build your project properly.



Regards,



Peter Constantinidis

Software Development Manager
-------------------------------------------------------

Global Packaging, Inc.

Phone: (484) 362-2149

Mobile: (610) 213-6322

Fax: (484) 831-1109

Email: pconstan@...<mailto:pconstan@...>







From: Jose Gomez [mailto:jose@...<mailto:jose@...>]
Sent: Monday, July 27, 2009 8:39 AM
To: vantage@yahoogroups.com<mailto:vantage@yahoogroups.com>; Peter Constantinidis
Subject: Re: [Vantage] Re: BPM Server .NET



Hi,

Thanks for your help. I installed the BPM Server and such. But when creating the VS Project to make the action I can't find the BPM.Action reference dll. Where is that located?



Thanks!
Sincerely
Jose C Gomez

http://www.josecgomez.com<http://www.josecgomez.com/>

On Fri, Jul 24, 2009 at 9:50 AM, petecon77 <pconstan@...<mailto:pconstan@...>> wrote:



There's really not that much involved in installing the BPMServer.
The documentation is in the Vantage Help file. Just Search for BPM Server and you should get all the information you will need.

This was enough to get me started.
Check out Message #80239 and Message #80327.
This will help you with how to actually implement an Action and working with the passed in DataSet once you have the BPM Server setup.

Good Luck!


--- In vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>, Jose Gomez <jose@...> wrote:
>
> Hello,
> We are trying to use BPM to modify an action on Sales Order Update we have
> used BPM's through 4GL in the past we are .NET programers and we figure it
> would be easier to create it using the Call .NET Method Action. But we can't
> figure out how to set up the BPM Server and where to get the references
> from.
> Anyone have a doc or something that walks you through setting up the BPM
> Server with an example?
>
> We'd appreciate it
>
> Thanks!
>
>
>
> Sincerely
> Jose C Gomez
>
> http://www.josecgomez.com<http://www.josecgomez.com/>
>
>

> [Non-text portions of this message have been removed]
>







[Non-text portions of this message have been removed]