Skip to Content (Press Enter)
OutSystems.com
Personal Edition
Community
Support
Training
Training
Online Training
Developer Schools
Boot Camps
Certifications
Tech Talks
Documentation
Documentation
Overview
ODC
O11
Forums
Forge
Get Involved
Get Involved
Jobs
Ideas
Members
Mentorship
User Groups
Platform
Platform
ODC
O11
Search in OutSystems
Log in
Get Started
Back to Forums
Bob
154
Views
5
Comments
Extension to execute command line program or batch file
Question
I need an example of how to create an extension which can execute a comman line program or batch file. I have a program that executes from the comman prompt. This program takes two parameters on the command line and returns a file. OS documentation for extentions is very sparce and I have looked for information in the Community, but there is nothing that provides an actual example (at least I haven't found any). Can anyone help?
Is there a decent tutorial or other documentation that actually demonstrates how to create extentions? Everything I have found treats the subject at too high a level without enough detail.
Sometimes responses in this forum state the obvious with no real meat in them. I already know it can be done thru Integration Studio. I need to know HOW at a detailed level. Thanks to any help anyone can give.
Matthias Preuter
MVP
a Quick tutorial:
Create a New extension (File, New), and name it "ExecuteCommand".
Create 1 new actions, (right click on Action, Add action) named
ExecuteSynchronously
Now click "Edit Source Code .Net"
the .Net IDE starts (Visual Studio), with 1 action to be implemented.
I have found a implementation for this on CodeProject
here
(not tested it); copy the code from
ExecuteCommandSync
(with a litte change, replace the command variable with ssCommandString) into the actions, you will get something like this:
Now Build the project in the Visual Studio, return to Integration Studio and click 1-Click Publish.
This solutions, is just a small how-to and not tested, hope this helps...
Kind regards,
Matthias Preuter
Paulo Ramos
Staff
Nice post Matthias!
Just to give you an extra reference, the
Test Automator
solution includes an extension that I believe can be used for launching external programs (look for ProcessAutomator.xif).
André Vieira
Staff
Hi Bob,
Matthias gave you a great answer, well done Matthias!
Just keep in mind that running a command prompt executable / process is something usually not allowed to the user running the web application. You will need to set the Run As in Service Center on the eSpace page:
Cheers
Bob
Thanks to all of you. Matthias, that's the kind of answer that I was looking for. And with answers like that, this forum can be an invaluable asset to OS developers. I still feel that 'official' OS documentation needs to be beefed up in many areas. It doesn't make sense to use a RAD platform if you have to spend days trying to figure out how to use a tool or how to accomplish a task that is commonly needed.
Again, thanks for the solid info and the very timely response.
André Vieira
Staff
Hi Bob,
Oh but the OutSystems Platform so much more than a RAD.... :)
I'm glad you got your problem fixed.
Cheers
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
See the full guidelines
Loading...