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
Ricardo Evangelista
0
Views
8
Comments
Imported .Net Actions
Question
Hi again!
I'm not really sure on how to explain this, but here it goes:
I have successfully imported one .Net action into Service Studio, and I run that action to scan computers on my network and save some results to a file. All this is done using .Net, and not the Service Studio!
Curiously, the generated file name has a DateTime.Now() feature, and is something like this: Active-01-01-2008-12h59m.txt.
For the first turn, all runs like expected.
My problem is, for further runs, it seems that the .Net method is not ran correctly.
For example, the file name is the same as the created with the first run! And most surprisingly, the contents are exactly the same!!!
If I 1CP the eSpace the problem is solved...
Here goes the part that I'm not sure on how to explain: it seems that the results are somehow "cached" and the .Net method is not "cleared" to run subsequently...
Sorry if I'm not making myself clear, but this is what I "see" happening...
Am I forgetting some option??
Thanks again!
Ricardo Evangelista
Ricardo Evangelista
Do you think the TenantInvalidateCache built-in action solves the problem?
I'm not really sure on how to use it... How can I assign a Tenant ID with my imported .Net action to "reset" it?
Thanks again.
7 replies
Last reply 04 Apr 2008
Show thread
Hide thread
Ricardo Evangelista
This is really urgent... :(
Can someone help?
Thanks
Angelo Mestre
the TenantId value is under Site at the expression editor. when you define the TenantInvalidateCache, in the arguments, you can select the expression editor and there you will find the TenantId.
Hope this helps
Best regards
Angelo Mestre
Tiago Simões
Staff
Hi Ricardo,
That is strange...You know that every time you update an extension you need to republish the eSpace to update the version of the extension it will use, right? You can see if the eSpace is using the latest version in OutSystems Service Center or using the Add/Remove references window in OutSystems Service Studio.
Also could you be saving that date time in a static variable?
Cheers,
Tiago Simões
Ricardo Evangelista
Thanks for your help everyone!
The Extension is updated; I checked it using Service Center. The DateTime variable is not static :(
If I logout or close IT Asset Manager, the problem remains, that is, when I log on again and scan the network (using my personal .Net Action) the results inside the file and the file name are the same! This means my imported action doesn't run at all!
This may sound foolish, but as site properties are stored even if we logout, etc, doesn't the "state" of the imported action is also preserved?
Additionally, I have one timer that "calls" a certain action, which contains my referenced .Net action.
When I call the "Wake" timer action, my imported one is supposed to run again, but with a "clean" state...
I tried to stop using the Timer, but the problem is exactly the same!
The problem is solved only if I 1CP the eSpace........... Another file is successfully created, containing the correct results!
Any ideas? :( Don't know what to do next!
Thanks again!
Tiago Simões
Staff
Hi Again Ricardo,
Maybe this topic
How to audit from an extension?
can help you diagnose the problem. You'll be able to see the these logs in OutSystems Service Center under Monitoring\General Logs.
Cheers,
Tiago Simões
Ricardo Evangelista
Thanks again for your help!
(Edited at 00h59)
Results:
- I have 3 network elements;
- I disconnected one of them before the first scan;
- The application discovered (using my .Net imported action) 2 network elements, and generated Active-04-04-2008-00h39m.txt;
- Using the audit in my extension, I know I discovered those 2 network elements;
(So far, so good!)
- Then, after the entire scan, I connected the 3rd element;
- Using the audit, I discovered the previous 2 network elements (and not the 3rd one)!
- The results file name was also Active-04-04-2008-00h39m.txt, with the same previous content (omitting the 3rd node);
- Curiously, using Windows Explorer, I can see that the second file has a created date property of 00h41m!!!
This is really strange, right??
For example, on my .Net C# solution, I invoke the Windows Command Line, which was not run on my second network discovery!
It looks like the extension "magically" and instantly generated the file...
Maybe the problem is in my C# code... But it's strange how it works first, and not secondly...
(And I don't have any relevant static method or variable...)
Again, if I 1-CP the eSpace, the problem is solved... for once...
I'm desperate... Any clue? :(
Ricardo Evangelista
Well I figured it out!!
The problem was.... Me!
I was only using the constructor method to do the work.
When I separated things, it worked...... It really makes sense!
I'm sorry for the trouble I caused =(
And thanks again for your help!!
Best regards,
Ricardo Evangelista
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...