This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

M-Files Configuration Frequency Interval

I am working on setting up something in my configuration that includes a RecurringOperationConfiguration

I have it working for schedule without any issue but when I try and lookup Interval it seems a bit vague and I don't really understand what the Time Value in the configuration is for.

It says it is configurable but I don't quite understand how to control the interval from the admin if it's giving me a Time Value. I've ready the following and haven't clued in on what I should be doing to allow the admin to decide what the interval should be/

https://developer.m-files.com/Frameworks/Vault-Application-Framework/Task-Queues/Recurring-Tasks/

What do I need to do for the admin to be able to set something like run every 2 hours?

Parents
  • Hi,

    The editor seems to render differently depending on...  Something.  Possibly your local PC settings.  In a lot of systems it renders as a 24-hour clock (which then makes more sense as an interval), but when it renders as an AM/PM time it's awkward.

    In your instance "every two hours" would be "2am".  Every 14 hours would be "2pm".  As I said: awkward.

    This hasn't come up as a significant issue thus far, but I will raise it with the VAF/configuration-editor team at some point to see whether there's a way we can force it to always be in 24-hour mode.

    Regards,

    Craig.

  • That is what we figured but additionally you cannot enter a 0 for the first hour so you cannot set an interval less than 1 hour with this issue.

  • I added an update after it all to see if it completes properly. I should add that it completes the job successfully(changes the workflow/state) and always has, just never runs again. 

    Also I see your comment in my code referring to "newObject", it's a class I wrote years ago to facilitate creating propertyValues and Objects, nothing special. 

    Looks like it completes without any issues:

    I've got that line right at the bottom of the function:

  • My suspicion is that this is a bug in an older release.

  • I'll spend a bit of time fighting with updating the code base, want anything I run into posted here?

  • So after running an update in NuGet I run into this exception when installing the application after building. This is what we ran into previously too, after building successfully it won't install.

    DlgClientApplications.cpp, 539, Starting the application "ConformityVaultApplication (1.6.7)" failed. (0x80040120)
    Item_DocumentVault.cpp, 1780, Starting the application "ConformityVaultApplication (1.6.7)" failed. (0x80040120)
    RPCMethodCallWithRetry.h, 151, Starting the application "ConformityVaultApplication (1.6.7)" failed. (0x80040120)
    RPCMethodCallWithRetry.h, 151, Starting the application "ConformityVaultApplication (1.6.7)" failed. (0x80040120)
    RPCClientScript.cpp, 1021, Starting the application "ConformityVaultApplication (1.6.7)" failed. (0x80040120)
    RPCClientScript.cpp, 406, Starting the application "ConformityVaultApplication (1.6.7)" failed. (0x80040120)
    RPCClientScriptHelper.cpp, 625, Starting the application "ConformityVaultApplication (1.6.7)" failed. (0x80040120)
    RPCClientScriptHelper.cpp, 1159, Starting the application "ConformityVaultApplication (1.6.7)" failed. (0x80040120)
    RPCClientScriptHelper.cpp, 1722, Starting the application "ConformityVaultApplication (1.6.7)" failed. (0x80040120)
    ExtensionManager.cpp, 648, Starting the application "ConformityVaultApplication (1.6.7)" failed. (0x80040120)
    ExtensionManager.cpp, 648, Exception has been thrown by the target of an invocation. (0x80131604)
    ExtensionManager.cpp, 782, Exception has been thrown by the target of an invocation. (0x80131604)
    ExtObjectPlatform.cpp, 177, Exception has been thrown by the target of an invocation. (0x80131604)
    ExtObjectPlatform.cpp, 439, Exception has been thrown by the target of an invocation. (0x80131604)
    CoMFAppPlatform.cpp, 322, Exception has been thrown by the target of an invocation. (0x80131604)
    CoDynamicCLRObjectWrapper.cpp, 127, Exception has been thrown by the target of an invocation. (0x80131604)
    ManagedError.cpp, 150, Exception has been thrown by the target of an invocation. (0x80131604)
    mscorlib: [CManagedError* CRuntimeObjectWrapper.InitAndCreateObject(CRuntimeObjectWrapper*, CManagedError*, Char**, Char**)], IL:45, Exception has been thrown by the target of an invocation. (0x80131604)
    mscorlib: [System.Object CreateInstance(System.Type)], IL:0, Exception has been thrown by the target of an invocation. (0x80131604)
    mscorlib: [System.Object CreateInstance(System.Type, Boolean)], IL:58, Exception has been thrown by the target of an invocation. (0x80131604)
    mscorlib: [System.Object CreateInstanceSlow(Boolean, Boolean, Boolean, System.Threading.StackCrawlMark ByRef)], IL:106, Exception has been thrown by the target of an invocation. (0x80131604)
    mscorlib: [System.Object CreateInstance(System.RuntimeType, Boolean, Boolean, Boolean ByRef, System.RuntimeMethodHandleInternal ByRef, Boolean ByRef)], IL:-1, Exception has been thrown by the target of an invocation. (0x80131604)
    VaultApplication.cs, 31 (IL:17), The type initializer for 'MFiles.VaultApplications.Logging.LogManager' threw an exception. (0x80131534)
    MFiles.VaultApplications.Logging: [Void .ctor()], IL:49, The type initializer for 'MFiles.VaultApplications.Logging.LogManager' threw an exception. (0x80131534)
    ConfigurableVaultApplicationBase.cs, 46 (IL:17), The type initializer for 'MFiles.VaultApplications.Logging.LogManager' threw an exception. (0x80131534)
    MFiles.VaultApplications.Logging: [MFiles.VAF.Configuration.SecureConfigurationManager`1[TSecureConfiguration] GetConfigurationManager()], IL:28, The type initializer for 'MFiles.VaultApplications.Logging.LogManager' threw an exception. (0x80131534)
    MFiles.VaultApplications.Logging: [Void .ctor(Boolean, System.Resources.ResourceManager[])], IL:7, The type initializer for 'MFiles.VaultApplications.Logging.LogManager' threw an exception. (0x80131534)
    MFiles.VaultApplications.Logging: [Void .ctor(Boolean)], IL:0, The type initializer for 'MFiles.VaultApplications.Logging.LogManager' threw an exception. (0x80131534)
    MFiles.VaultApplications.Logging: [MFiles.VaultApplications.Logging.ILogger GetLogger(System.Type, MFiles.VaultApplications.Logging.ILoggingContext)], IL:0, The type initializer for 'MFiles.VaultApplications.Logging.LogManager' threw an exception. (0x80131534)
    MFiles.VaultApplications.Logging: [Void .cctor()], IL:5, Method not found: 'Void NLog.Config.LoggingConfiguration.AddRule(NLog.LogLevel, NLog.LogLevel, NLog.Targets.Target, System.String, Boolean)'. (0x80131513)
    MFiles.VaultApplications.Logging: [Void UpdateConfiguration(MFiles.VaultApplications.Logging.NLog.NLogLoggingConfiguration)], IL:-1, Method not found: 'Void NLog.Config.LoggingConfiguration.AddRule(NLog.LogLevel, NLog.LogLevel, NLog.Targets.Target, System.String, Boolean)'. (0x80131513)
    (M-Files 22.9.11816.9 2022-09-27T14:46:39.729Z)

  • Yes.  I'm happy to help.  Want to give it a go and if you have problems then either post here or, if it's complex, drop me an email and we'll arrange a suitable time for a call?

  • I ran into the following error after building and then attempting to install(so this happened when installing the application):

    DlgClientApplications.cpp, 539, Starting the application "ConformityVaultApplication (1.6.7)" failed. (0x80040120)
    Item_DocumentVault.cpp, 1780, Starting the application "ConformityVaultApplication (1.6.7)" failed. (0x80040120)
    RPCMethodCallWithRetry.h, 151, Starting the application "ConformityVaultApplication (1.6.7)" failed. (0x80040120)
    RPCMethodCallWithRetry.h, 151, Starting the application "ConformityVaultApplication (1.6.7)" failed. (0x80040120)
    RPCClientScript.cpp, 1021, Starting the application "ConformityVaultApplication (1.6.7)" failed. (0x80040120)
    RPCClientScript.cpp, 406, Starting the application "ConformityVaultApplication (1.6.7)" failed. (0x80040120)
    RPCClientScriptHelper.cpp, 625, Starting the application "ConformityVaultApplication (1.6.7)" failed. (0x80040120)
    RPCClientScriptHelper.cpp, 1159, Starting the application "ConformityVaultApplication (1.6.7)" failed. (0x80040120)
    RPCClientScriptHelper.cpp, 1722, Starting the application "ConformityVaultApplication (1.6.7)" failed. (0x80040120)
    ExtensionManager.cpp, 648, Starting the application "ConformityVaultApplication (1.6.7)" failed. (0x80040120)
    ExtensionManager.cpp, 648, Exception has been thrown by the target of an invocation. (0x80131604)
    ExtensionManager.cpp, 782, Exception has been thrown by the target of an invocation. (0x80131604)
    ExtObjectPlatform.cpp, 177, Exception has been thrown by the target of an invocation. (0x80131604)
    ExtObjectPlatform.cpp, 439, Exception has been thrown by the target of an invocation. (0x80131604)
    CoMFAppPlatform.cpp, 322, Exception has been thrown by the target of an invocation. (0x80131604)
    CoDynamicCLRObjectWrapper.cpp, 127, Exception has been thrown by the target of an invocation. (0x80131604)
    ManagedError.cpp, 150, Exception has been thrown by the target of an invocation. (0x80131604)
    mscorlib: [CManagedError* CRuntimeObjectWrapper.InitAndCreateObject(CRuntimeObjectWrapper*, CManagedError*, Char**, Char**)], IL:45, Exception has been thrown by the target of an invocation. (0x80131604)
    mscorlib: [System.Object CreateInstance(System.Type)], IL:0, Exception has been thrown by the target of an invocation. (0x80131604)
    mscorlib: [System.Object CreateInstance(System.Type, Boolean)], IL:58, Exception has been thrown by the target of an invocation. (0x80131604)
    mscorlib: [System.Object CreateInstanceSlow(Boolean, Boolean, Boolean, System.Threading.StackCrawlMark ByRef)], IL:106, Exception has been thrown by the target of an invocation. (0x80131604)
    mscorlib: [System.Object CreateInstance(System.RuntimeType, Boolean, Boolean, Boolean ByRef, System.RuntimeMethodHandleInternal ByRef, Boolean ByRef)], IL:-1, Exception has been thrown by the target of an invocation. (0x80131604)
    VaultApplication.cs, 31 (IL:17), The type initializer for 'MFiles.VaultApplications.Logging.LogManager' threw an exception. (0x80131534)
    MFiles.VaultApplications.Logging: [Void .ctor()], IL:49, The type initializer for 'MFiles.VaultApplications.Logging.LogManager' threw an exception. (0x80131534)
    ConfigurableVaultApplicationBase.cs, 46 (IL:17), The type initializer for 'MFiles.VaultApplications.Logging.LogManager' threw an exception. (0x80131534)
    MFiles.VaultApplications.Logging: [MFiles.VAF.Configuration.SecureConfigurationManager`1[TSecureConfiguration] GetConfigurationManager()], IL:28, The type initializer for 'MFiles.VaultApplications.Logging.LogManager' threw an exception. (0x80131534)
    MFiles.VaultApplications.Logging: [Void .ctor(Boolean, System.Resources.ResourceManager[])], IL:7, The type initializer for 'MFiles.VaultApplications.Logging.LogManager' threw an exception. (0x80131534)
    MFiles.VaultApplications.Logging: [Void .ctor(Boolean)], IL:0, The type initializer for 'MFiles.VaultApplications.Logging.LogManager' threw an exception. (0x80131534)
    MFiles.VaultApplications.Logging: [MFiles.VaultApplications.Logging.ILogger GetLogger(System.Type, MFiles.VaultApplications.Logging.ILoggingContext)], IL:0, The type initializer for 'MFiles.VaultApplications.Logging.LogManager' threw an exception. (0x80131534)
    MFiles.VaultApplications.Logging: [Void .cctor()], IL:5, Method not found: 'Void NLog.Config.LoggingConfiguration.AddRule(NLog.LogLevel, NLog.LogLevel, NLog.Targets.Target, System.String, Boolean)'. (0x80131513)
    MFiles.VaultApplications.Logging: [Void UpdateConfiguration(MFiles.VaultApplications.Logging.NLog.NLogLoggingConfiguration)], IL:-1, Method not found: 'Void NLog.Config.LoggingConfiguration.AddRule(NLog.LogLevel, NLog.LogLevel, NLog.Targets.Target, System.String, Boolean)'. (0x80131513)
    (M-Files 22.9.11816.9 2022-09-27T14:46:39.729Z)

  • We will have to communicate via email or another way(teams maybe?) since the forum is flagging my posts with an error message I am running into as spam. I will send an email your way.

  • Mitchell and I dug into this.

    It appears that some other software on that machine has installed a different version of NLog into the GAC.  In general doing this for libraries is frowned upon because it can cause serious issues for other applications.  Quite simply: once you have a signed version in the GAC it will always be loaded by .NET, even if the local installation folder contains a different version.  So application A installs the version it needs into the GAC, but application B can never specify a different version.

    The issue here is that the version we target (4.7) uses a method that does not exist in the version in the GAC (4.5).  When the code gets loaded it attempts to use this method and fails.

    There's not a huge amount we can do here as this is how .NET is designed to load assemblies.  To my knowledge there's no way to override it.  If anyone knows how then please do let me know.

    The only option may be to update our logging to target a 5.x release, as I believe that NLog changed the strong name signature with the major version update.  The chances of anyone having another of those in the GAC, and for it to be significantly different to the one we target, is probably small.

  • Small update: looks like the next release of the logging elements will target 5.x.  My understanding is that the issue related to NLog and the GAC is limited within major version numbers (e.g. 4.x will all be served the version from the GAC, but 5.x will not), so hopefully this will reduce the chances of this happening moving forward.

  • I did force NLog to update to version 5.0.4 for testing purposes and I still got the same issue(maybe because the publickeytoken is the same?). It does read version 5.0.0.0 though, maybe I was missing something to force version 5.x

Reply Children