StrataFrame Forum
Back
Login
Login
Home
»
StrataFrame Application Framework - V1
»
Business Objects and Data Access (How do I?)
»
Running a BO process from outside my SF app. ( like a VFP app as com...
Running a BO process from outside my SF app. ( like a VFP app as com object )
Post Reply
Like
1
Running a BO process from outside my SF app. ( like a VFP app as com...
View
Flat Ascending
Flat Descending
Threaded
Options
Subscribe to topic
Print This Topic
RSS Feed
Goto Topics Forum
Author
Message
Charles R Hankey
Charles R Hankey
posted 12 Years Ago
ANSWER
Topic Details
Share Topic
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
Like
1
Ivan George Borges
Ivan George Borges
posted 12 Years Ago
ANSWER
Post Details
Share Post
Group: StrataFrame MVPs
Posts: 1.9K,
Visits: 21K
Hi Charles.
The BOs should be in a library of itself, so you can reference this DLL in as many projects as you need.
The connection string can be shared by many EXEs. Just set the ConnectionManager.ApplicationKey to the same key and they will share the same connection originally set.
Reply
Like
1
Fabian R Silva, -
Fabian R Silva, -
posted 12 Years Ago
ANSWER
Post Details
Share Post
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.
Reply
Like
1
Charles R Hankey
Charles R Hankey
posted 12 Years Ago
ANSWER
Post Details
Share Post
Group: Forum Members
Posts: 524,
Visits: 30K
Thanks guys, as soon as I got the idea of console app and BO library into my head ( as well as searching here for the connection info etc) I started to fall into place - except that now management wants me to do it all from within my SSIS package with SPs. Oh well.
Reply
Like
1
Ivan George Borges
Ivan George Borges
posted 12 Years Ago
ANSWER
Post Details
Share Post
Group: StrataFrame MVPs
Posts: 1.9K,
Visits: 21K
Great Charles. Come back here if you need anything else.
Reply
Like
1
GO
Merge Selected
Merge into selected topic...
Merge into merge target...
Merge into a specific topic ID...
Open Merge
Post Reply
Like
1
Similar Topics
Post Quoted Reply
Reading This Topic
Login
Login
Remember Me
Reset Password
Resend Validation Email
Login
Explore
Messages
Mentions
Search