Firing all missed triggers along with using XMLSchedulingDataProcessorPlugin - quartz-scheduler

I am using quartz jobs.xml to declare jobs and triggers in my setup
(http://www.quartz-scheduler.org/documentation/quartz-2.2.2/cookbook/JobInitPlugin.html)
The option to use misfire-instruction MISFIRE_INSTRUCTION_IGNORE_MISFIRE_POLICY seems to be missing in the xsd. It only has the option to use MISFIRE_INSTRUCTION_SMART_POLICY,MISFIRE_INSTRUCTION_FIRE_ONCE_NOW or MISFIRE_INSTRUCTION_DO_NOTHING
I have a requirement to fire all triggers that were missed for some of the cron-triggers defined in the xml.
Is there any way to achieve this along with using the xml?

Related

Define custom field formulas in QuickFIX/J

Does QuickFIX/J provide any way to specify field->values mappings in config files that should be used on specific sessions?
For example on SESSION_UAT I want to send on every NewOrder customTag1="Test", and on SESSION_PROD I want customTag1="Real"? The values may change over time and should be maintained by non-developers so I don't want to do that part in code.
I could myself add support for this but I wonder if there's anything like that already so I won't reinvent the wheel. I was looking at codegen package in QuickFIX/J for this but the code generating step is something I want to avoid.
No, this is not something that QF/j explicitly offers.
However, you could put a custom value in the QF/j session config file (see docs) and set your value according to that. That's a pretty easy way to do it.
Or if you don't want users to be able to edit the session config, it would be simple to roll your own config file format and reader.

Workflow Foundation: Error when resuming a persistent workflow after activity changes

the context of the problem is like this: we create workflows, we save it and after a while a new implementation request comes and we change an activity. After this the workflow instances that were saved cannot run anymore. We get this error:
StateMachine Error : Cannot convert object 'True' to type 'System.String'.
It seems that the new argument added brakes the serialization order?
You'll have to implement Dynamic Update in some fashion.
We are currently in the process of getting some infrastructure set up to update existing instances, and having lots of issues. Hopefully your scenario is easier to solve than ours!
Start here: https://msdn.microsoft.com/en-us/library/hh314052(v=vs.110).aspx
Word of caution: I've found various issues with Microsoft's provided code that required a lot of investigation to fix.

Sails.js Can I add sort functionality to default find action without overriding it?

I was just curious to know if it's by any means possible to add a sort functionality to the default find action of a model without overriding the same in the controller ?
We do have beforeCreate and afterCreate features in the models which is quite useful in many cases. Similarly beforeFetch or something like that, if exists can be really useful when we want some pre/post processing on the result set while doing a get request.
An example of this would be: localhost:1337/user?sort=id desc

How to Edit/Update Nant script

I need to update an Nant script automatically by fetching some data from database. The solution I can think of is to be done through a service which fetches the data from DB and update the Nant script.
Can this be done? If yes, how?
In theory, if you need to change how the script works then you could create a program to generate the NAnt build file, run it with the exec task, include that file and then call a target.
That seems a bit over-complicated though. I suppose it depends on how much the script will change based on the data.
If the data is simply configuration, then you can use the data to set properties in your build script (either by the same mechanism above, or by creating a custom task to create a property value based on the result of a SQL statement). Then use those properties to determine control flow in the build script using standard things like if statements and foreach loops.
I don't think that there's anything built-in that will do this for you, but custom tasks are very easy to create if you can program.
If you update/edit a nant script it does not change the current execution. Instead you can generate .build files and execute them via <nant> task, for example using a <foreach> loop or <style> xsl-transformation. An alternative would be to write a small <script>, in particular if you can program it comfortably in C#. If you wish more specific answers more information would be helpful. (database used, what tools you can use to extract data)

Windows Workflow - IfElse branch

I am trying to use Windows Workflow and have a model that looks similar to the image in the link below:
After each of the Send Activities (GetSomthing, GetSomthingElse, GetSomeMoreStuff) the same custom activity is being called (LogSomthingBadHappened).
While it might not look so bad in this picture in my real model the custom activity is a SequenceActivty, has quite a few nodes, and when its repeated 3 times starts to make the workflow look very ugly.
I would like to do something like this:
Can the IfElse branches be merged like this?
Should I be using a State Machine work flow instead (haven't figured these out yet)?
Use a FaultHandler on the workflow and throw a specific exception type that the handler will catch. Not the most graceful, but I think it should work.
In sequential workflows all steps must appear in a specific order, and the execution path is regulated exclusively by control structures (IF, WHILE).Altering the execution path in the way you describe would be like using a GOTO statement in imperative code, which we know leads to unnecessary complexity.
If the activities contained in the SequenceActivity that you need to execute at different stages of your workflow are exacty the same, you could embed them in a custom activity. This way it is easier to manage them since they are contained in a single logical unit.In imperative code, this would be like refactoring out a portion of duplicated code into a method, which is then invoked multiple places.
Another alternative that might work is to put your LogSomthingBadHappened activity into a custom workflow and include that several time. Several things to watch out for: Subworkflow are executed asynchronously, if the LogSomthingBadHappened activity needs state information from the main workflow, copying it to the sub workflow might be hard.
I have not tried this, so it might not even work.
I think the answer by gbanfill points to the right direction.
To generalize, I define the problem as:
Is there a way to define a group of activities that will be executed in several places of a workflow?
Further requirements are:
The group of activities should be defined in XAML only ie no code.
Type of input to this group will, of course, be fixed but actual values should depend on call (like calling a function).
Maybe the way to do it is define sub-workflows and build a custom activity that would instantiate the sub-workflow and wait for it to complete before continuing.
This custom activity should have at least two parameters: the sub-workflow id and input parameters.