Running a BO process from outside my SF app. ( like a VFP app as com object )


Running a BO process from outside my SF app. ( like a VFP app as com...
Author
Message
Charles R Hankey
Charles R Hankey
StrataFrame VIP (1.3K reputation)StrataFrame VIP (1.3K reputation)StrataFrame VIP (1.3K reputation)StrataFrame VIP (1.3K reputation)StrataFrame VIP (1.3K reputation)StrataFrame VIP (1.3K reputation)StrataFrame VIP (1.3K reputation)StrataFrame VIP (1.3K reputation)StrataFrame VIP (1.3K reputation)
Group: Forum Members
Posts: 524, Visits: 30K
If I have an SF C# app connected to SQL Server and there is process in a business object that interacts with other business objects and changes data :

In my SF UI the interaction of the BOs is done in a winform code. 

The connections are made in the startup of the app. 

How would I call this same BO process from outside of my SF app ( or automatically run my SF app to invoke that process with no UI ) and take advantage of connections and bo interaction etc ? 

The idea is that a backnend process is going to run an SSIS package to get CSV data into a staging table ( one of the bos in my app ) and then bo logic is going to create or update reocords in three other tables based on the new staging records. 

I may also want to pass into the app the id of the staging record batch to process.

Suggestions greatly appreciated.
Reply
Fabian R Silva, -
Fabian R Silva, -
StrataFrame User (317 reputation)StrataFrame User (317 reputation)StrataFrame User (317 reputation)StrataFrame User (317 reputation)StrataFrame User (317 reputation)StrataFrame User (317 reputation)StrataFrame User (317 reputation)StrataFrame User (317 reputation)StrataFrame User (317 reputation)
Group: StrataFrame Users
Posts: 153, Visits: 1.2K
Greetings, after you call SetDataSources() can call anything you want before that.  I still not implemented  this but I suppose that this can work....


For example in c#: you can call the exe with a parameter from a bat if you like, to do this you have to add an "args" string array as a string[] parameter on program.cs (something like that in vb, check creating an application console and check how do it VB)

in c#
static void Main(bstring[] args) <-- this is the starting point of the app, I added string[] args array to receive a parameter with name of the process that wants to execute...

put the value of args[0] on a static public "callerArgument" property and when StrataFrame event SetDataSources() is called, at the end of this method you can see the callerArgument property and if it have some string, call a method that do the processing that you want.

after you call your processing method you can call
Environment.Exit(0);
to exit from the exe without do anything more.

As Ivan says, it too can be accomplished creating another project (can be an console app) and adding the dll references to the BOs library(s) projects/dlls needed.


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search