Community forum

Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


MarkG
  •  MarkG
  • No customer Topic Starter
2009-09-18T00:17:16Z
Three issues I've observed - two being what I believe is best described as a bug, and the other is a challenge that seems to have arisen when I try my alternative method of solving the problem.

Item 1 - Probably User Error

As I've been testing VisualCron, I've build a handful of jobs, but I want to disable all but one of them at any time, just so that if I do something that would normally trigger multiple jobs, only one goes off. I'd expect that I could achieve this by setting the Status on all the jobs except for the one I'm working on to "Inactive". However, if I have three jobs watching a folder for an XML file to be created there, and two appear with their 'Next Run' as "Inactive" and one is set to "Event Trigger (file)" - if I create that file, all three triggers will fire. The two 'Inactive' jobs will wake up and start processing.

Is this me, or is it a bug? If it's me, how the heck can I force those Jobs to stay inactive?


Item 2 - Read XML task functionality.

I want to create a task that reads an XML file and evaluates the count() of items in an XML tree. Normally when doing old-fashioned scripting, I'd do this using XQuery; but it looked as though an XML Read task type might do it within VisualCron.

However, when I try something like:

declare namespace cr='urn:crystal-reports:schemas';count(//cr:FormattedAreaPair[@Level='3'])

.. with a specific file selected (a mapped drive of 'Z:', I selected a file I know is valid) with suitably lax credentials, I get an unhandled exception:

************** Exception Text **************
System.IO.DirectoryNotFoundException: Could not find a part of the path 'Z:\Inbox\-elev-2009-07.xml'.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)
at System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials credentials)
at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn)
at System.Xml.XmlTextReaderImpl.OpenUrlDelegate(Object xmlResolver)
at System.Threading.CompressedStack.runTryCode(Object userData)
at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at System.Threading.CompressedStack.Run(CompressedStack compressedStack, ContextCallback callback, Object state)
at System.Xml.XmlTextReaderImpl.OpenUrl()
at System.Xml.XmlTextReaderImpl.Read()
at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)
at System.Xml.XmlDocument.Load(XmlReader reader)
at System.Xml.XmlDocument.Load(String filename)
at UCTaskXMLNodeRead.DisplayTask()
at UCTaskXMLNodeRead.PreLoad()
at ubE55whN25V0eOGWPPZ.MBndt0h31w6BQExJO8A.PreLoad()
at ubE55whN25V0eOGWPPZ.MBndt0h31w6BQExJO8A.EDTL4r2Pq(Object , EventArgs )
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll

VisualCronClient
Assembly Version: 5.3.1.33574
Win32 Version: 5.3.1.33574
CodeBase: file:///C:/Program%20Files/VisualCron/VisualCronClient.exe

System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll

System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll

System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll

System.Data
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll

VisualCron
Assembly Version: 1.0.1.33564
Win32 Version: 1.0.1.33564
CodeBase: file:///C:/Program%20Files/VisualCron/VisualCron.DLL

Infragistics2.Win.v9.1
Assembly Version: 9.1.20091.1000
Win32 Version: 9.1.20091.1000
CodeBase: file:///C:/Program%20Files/VisualCron/Infragistics2.Win.v9.1.DLL

Infragistics2.Shared.v9.1
Assembly Version: 9.1.20091.1000
Win32 Version: 9.1.20091.1000
CodeBase: file:///C:/Program%20Files/VisualCron/Infragistics2.Shared.v9.1.DLL

VisualCronAPI
Assembly Version: 1.0.3.33569
Win32 Version: 1.0.3.33569
CodeBase: file:///C:/Program%20Files/VisualCron/VisualCronAPI.DLL

Microsoft.VisualBasic
Assembly Version: 8.0.0.0
Win32 Version: 8.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll

System.Xml
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll

System.Configuration
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll

9dorxb0t
Assembly Version: 1.0.1.33564
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll

hid8csxx
Assembly Version: 1.0.3.33569
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll

maj_pi8x
Assembly Version: 1.0.3.33569
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll

mehvgalf
Assembly Version: 5.3.1.33574
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll

SecureBlackbox
Assembly Version: 7.1.0.160
Win32 Version: 7.1.0.160
CodeBase: file:///C:/Program%20Files/VisualCron/SecureBlackbox.DLL

SecureBlackbox.IDEA
Assembly Version: 7.1.0.160
Win32 Version: 7.1.0.160
CodeBase: file:///C:/Program%20Files/VisualCron/SecureBlackbox.IDEA.DLL

Infragistics2.Win.UltraWinToolbars.v9.1
Assembly Version: 9.1.20091.1000
Win32 Version: 9.1.20091.1000
CodeBase: file:///C:/Program%20Files/VisualCron/Infragistics2.Win.UltraWinToolbars.v9.1.DLL

Infragistics2.Win.UltraWinEditors.v9.1
Assembly Version: 9.1.20091.1000
Win32 Version: 9.1.20091.1000
CodeBase: file:///C:/Program%20Files/VisualCron/Infragistics2.Win.UltraWinEditors.v9.1.DLL

Infragistics2.Win.Misc.v9.1
Assembly Version: 9.1.20091.1000
Win32 Version: 9.1.20091.1000
CodeBase: file:///C:/Program%20Files/VisualCron/Infragistics2.Win.Misc.v9.1.DLL

Infragistics2.Win.UltraWinGrid.v9.1
Assembly Version: 9.1.20091.1000
Win32 Version: 9.1.20091.1000
CodeBase: file:///C:/Program%20Files/VisualCron/Infragistics2.Win.UltraWinGrid.v9.1.DLL

Infragistics2.Win.UltraWinStatusBar.v9.1
Assembly Version: 9.1.20091.1000
Win32 Version: 9.1.20091.1000
CodeBase: file:///C:/Program%20Files/VisualCron/Infragistics2.Win.UltraWinStatusBar.v9.1.DLL

Infragistics2.Win.AppStylistSupport.v9.1
Assembly Version: 9.1.20091.1000
Win32 Version: 9.1.20091.1000
CodeBase: file:///C:/Program%20Files/VisualCron/Infragistics2.Win.AppStylistSupport.v9.1.DLL

System.Design
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Design/2.0.0.0__b03f5f7f11d50a3a/System.Design.dll

Accessibility
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3a/Accessibility.dll

System.Web.Services
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Web.Services/2.0.0.0__b03f5f7f11d50a3a/System.Web.Services.dll

bxgcck8l
Assembly Version: 5.3.1.33574
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll

System.Management
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Management/2.0.0.0__b03f5f7f11d50a3a/System.Management.dll

System.ServiceProcess
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.ServiceProcess/2.0.0.0__b03f5f7f11d50a3a/System.ServiceProcess.dll

hlelz9hc
Assembly Version: 1.0.1.33564
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll

-cisvz6j
Assembly Version: 1.0.3.33569
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll

Infragistics2.Win.UltraWinTree.v9.1
Assembly Version: 9.1.20091.1000
Win32 Version: 9.1.20091.1000
CodeBase: file:///C:/Program%20Files/VisualCron/Infragistics2.Win.UltraWinTree.v9.1.DLL

Infragistics2.Win.UltraWinTabControl.v9.1
Assembly Version: 9.1.20091.1000
Win32 Version: 9.1.20091.1000
CodeBase: file:///C:/Program%20Files/VisualCron/Infragistics2.Win.UltraWinTabControl.v9.1.DLL

Infragistics2.Win.UltraWinListView.v9.1
Assembly Version: 9.1.20091.1000
Win32 Version: 9.1.20091.1000
CodeBase: file:///C:/Program%20Files/VisualCron/Infragistics2.Win.UltraWinListView.v9.1.DLL


************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.


I've tried the same query using Saxonica, XMLSpy and a bunch of other parsers, and it evaluates fine.
The problem is, I believe that you're just passing whatever text is in the "XPath expression" textbox to the .NET Framework System.XML. Microsoft's implementation isn't particularly rich and it bombs spectacularly when you just feed it a raw query, which is something to watch for.

Furthermore, even trying to edit the task to supply a file name arising from a trigger, is a real pain, and when that runtime error fires, it results in the task becoming corrupted.



Which led me to

Item 3. Parsing XML using Saxonica within VisualCron

This problem doesn't seem to be really a VisualCron bug, but more a problem with the way that Saxonica works.

If I invoke Saxonica's QUERY.EXE command-line program, which performs xquery on files or streams, I can do it directly from an Execute Task, and I get results back in the OUTPUT and OUTPUT(STDERR) fields as I would expect.

The problem is that when I create Conditions to analyze the results, the only path that the logic follows is the 'On Match Error' path.

If write a query, and it returns "2" (without the quotes) in the Output Window, and create a single condition in the condition set, with the condition being a VisualCron condition, with the Match being a Task match with Output of "2" (again, without the quotes), I'd expect the Action 'On Match All' or 'On Match Any' to trigger - but they don't.

I even created 4 separate tasks to branch to, for each of the Action matches, so I could explicitly follow the logic path.

All I could think of was is that the Saxonica tools don't condition the exit code when their executables complete (as far as I know, they always issue exit(0), even if the xquery is invalid).

This means that while I can execute the queries, I can't direct the process path.




Followup: after some aditional research.

Problem 1: One thing I didn't note was that that I have VisualCron running on a server, and all code, files etc that are being referenced are on our corporate SAN. The problems I observed happened whether I had set the File Trigger up with polling or not. However, when I moved the whole thing to a development machine, and replicated the environment using //localhost/ instead of the SAN, the problem didn't occur - so the issue is obviously environment-dependent. I'll do more research on this and post any more evidence I see.



Sponsor
Forum information
Support
2009-09-18T14:55:20Z
Item 1

You can click on Stop server button to disable all

Item 2

Use a UNC path like \\servername\folder\file.xml. Then also add a Credential that has access to that file. The VisualCron service that runs as SYSTEM account does not now anything about logical drives (that are not shared across users) like X: , Z: and so on.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
MarkG
  •  MarkG
  • No customer Topic Starter
2009-09-21T19:08:17Z
I've tried a 'Stop Server' and it seems to take a LONG time for queued jobs to stop.

Secondly, yes, I'm using UNCs thru'out, and the credentials seem correct. I tried VisualCron Network Drive mapping out of sheer desperation.

Support
2009-09-21T19:11:19Z
I think the problem might be Credentials - if you moved it from one environment to another (maybe that user does not exist globally)?
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
MarkG
  •  MarkG
  • No customer Topic Starter
2009-09-22T16:21:00Z
Problem solved. Didn't turn out to be credentials in the end. The problem is that I'm invoking a batch file, and using Visualcron to supply the argument.

Assume an Execute Task, triggered by a file being dropped in a folder.

I want to execute a batch file, with one argument. The argument is a {TRIGGER(Active,LastTrigger,File.Result.FullPath)}. If that fullpath has whitespace in it, then the execute will chop that argument string up into '%1', '%2', '%3' etc.

The issue is that even if I enclose the {TRIGGER()} in quotes, this still happens. The only way I can currently make it work is if I build the batch file to have ONLY one parameter, and I access it in the batch file with '%*'. For this particular batch file, I can do that. However, I may want to pass multiple parameters, so VisualCron apparently stripping the quotes out is going to be a problem, unless there's some way of escaping the quotes to avoid them being stripped.

You can replicate this by building a batch file like this
echo %0
echo %1
echo %2
echo %3
echo %4
echo %*

And then execute that based on a trigger that watched for a file being created in a folder somewhere below 'c:\Documents and settings' and watching the STDOUT. I did leatrn something though - I never realized that '%*' existed.
Scroll to Top