In the screenshot below you can see that actions are running even though the preceding condition failed. How (should) I stop this happening? Improving the screenshot in this version of the question.
According to my test, this error message in "condition" doesn't mean the condition fail. It seems your condition passed successfully. There is an action under the "if ture" which failed, so the "condition" will show this message. So I think you should check the actions under the "if true" and improve it but not the "condition".
It is really a false-positive statement as it has actually run correctly. There are several reasons why the orchestration still runs despite the failure.
Try to play around with the "Configure run after" option. You can find this by clicking the three dots on the respective action.
Related
I have a SSIS package with lots of containers and logic. I am running an additional task (which I want to run independently) let's say it acts as an Event Listener. When this separate task is errored, I want to error out the entire package. I thought, it should work by default but to my surprise, it's not:-
I have tried setting both FailPackageOnFailure & FailParentOnFailure properties on both the parent container & the child container but it's not working.
I was about to ask exactly the content of your last comment.
Failure of one piece of a package won't make another, unconnected piece stop executing. Once the executing piece is done, the package will fail, but Sequence Container 3 has no way to know what's happening in Sequence Container 2.
Which, honestly, is what we want. If Sequence Container 3 is doing DML, you could leave your data in an unfortunate state if an unrelated failure elsewhere in the package suddenly made everything come to a screeching halt.
If you don't want Sequence Container 3 to run if Sequence Container 2 fails, then just run a precedence constraint from Sequence Container 2 to Sequence Container 3, #3 won't execute until #2 succeeds and the Execute SQL Task succeeds.
I completely agree with Eric's answer. Let me explain to you why raising a flag on error won't work.
I redesign the package so it includes the flag check.
Let's say we have a success flag as user variable which is by default False.
Now we set this variable as True at the end of sequence 2 execution marking the success of all the other tasks in that sequence.
The second part is put into a for loop which runs only once(if at all). It checks if the success variable is true and only then run the inner tasks. It looks like below:
The problem is, the success variable check at the start of the for loop will always have the inital value which is false(because it runs in parallel with seq 2 and doesn't wait till seq 2 ends). Hence the second part is never executed. Now change the initial value of success variable to true and run the package again. Play by disabling the error prone tasks and run the package. You will understand how it works.
I have to execute "Start" and "Finish" Commands in the Sequential Order in my program and synchronize everything at the end. So I'm inserting the Offline commands in the order first and assuming they will execute in the same order. I'm using "List" with "Iterator" for this.
Problem here is: Finish Command will be missed execution in some strange scenarios in the middle and "start" commands will execute next to each other and sending all wrong data and mapped it in a wrong way.
As action will get ID when command executes at the server, I'm keeping tempory id's to map the offline commands in storage(localID). Instaead of List if I use anyother collection will this gets any better? It is hard to reproducing this on simulator. Please review both scenarios and advise where can this approaches go wrong. Thanks
I will add the OfflineCommands into the List and save in the Storage. After that user can perform delete delete operation in the App so that I will retrieve the list and remove the commands which got deleted from storage so now I have filtered list.
Don't synchronize.
That's nearly always a mistake in Codename One. Your code deals with the UI so it should be on the EDT and Display.getInstance().isEDT() should be true.
My guess is that one of the commands in the middle uses one of the following invokeAndBlock() derivatives:
addToQueueAndWait
Modal dialogs
Which triggers a second round of synchronization to run.
You can trace that by reproducing the issue and checking which command in the list is specifically there at each time. Then fix that command so it doesn't block in this way.
Another approach to fixing it is to remove the list immediately when you start processing which will prevent a duplicate execution of commands.
I'm trying to catch "nrpe unable to read output" output from plugin and send an email when this one occurs and I'm a little bit stuck :) . Thing is there are different return codes when this error occurs on different plugin:
Return code Service status
0 OK
1 WARNING
2 CRITICAL
3 UNKNOWN
Is there a way either to unify return codes of all plugins I use(that there always will be 2[CRITICAL] when this problem occurs), or any other way to catch those alerts? I want to keep return codes for different situations as is(i.e. filesystem /home will be warning(return code 1) for 95% and critical(return code 2) for 98%
Most folks would rather not have this error sending alert emails, because it does not represent an actual failed check. Basically it means nothing more than:
The command/plugin (local or remote) was ran by NRPE, but
failed to return any usable status and/or text back to nrpe.
This most often means something went wrong with the command/plugin and it hasn't done the job it was expected to perform. You don't want alerts being thrown for checks, when the check wasn't actually performed - as this would be very misleading. It's also important to note that the Return Code is not even be coming from the command/plugin.
In my experience, the number one cause of this error is a bad check. And as the docs for NPRE state, you should run the check (with all its options!) to make sure it runs correctly. Do yourself a favor and test both working AND not working states. About 75% of the time, this has happened because the check only works correctly when it has OK results, and blows up when something not-OK must be reported.
Another issue that causes these are network glitches. NRPE connects and runs the check; but the connection is closed before any response is seen. Once again, not a true check result.
For a production Nagios monitoring system, these should be very rare errors. If they are happening frequently, then you likely have other issues that need to be fixed.
And as far as I can tell, all built-in Nagios plugins use the exact same set of return codes. Are you certain this isn't a 'custom' check?
Ok, I think I've found the solution for my problems-I will try to check nagios.log on each node for those errors.
I have a package that has a loop in it, that loops through a few connections. Each iteration through the loop is a new connection. The problem is though that sometimes these connections are down at package run time. So I've added an on error, send us an email notification, and then continue with the loop.
This works fine, using the Event Handlers and changing the Propagate value to False. But the issue is, if a connection fails, it will finish the loop, but report the entire package fails. This is an issue because inside a job in SSMS, it will stop the job after that package is complete, and report it failed, when it really did not.
Is there a way to have the package report success even if this loop kicks out the failed e-mail? I don't want it "Continue to next step on fail" because there are other parts to that package that could legit fail, and need to be notified on.
EDIT:
Here are screen shots of what I'm doing. Inside the loop there is a dataflow task, the first dataflow has the connection that sometimes fails. When it does, it triggers the email task to notify us, then will continue with the loop.
Unfortunately the FailPackageOnFailure is already set to false.
On the task that fails (or its parent container if applicable), change the value of FailPackageOnFailure to false.
If you are doing this to a task in a loop, you may want to consider whether you also need to set FailParentOnFailure to false as well.
EDIT: If none of your tasks or containers are causing the package to fail with FailPackageOnFailure=true, then probably you are setting the package to fail in a script. Maybe in your event handlers you are keeping a count of errors, and then at the end of the package you are setting the package state to failure if the error count <> 0.
Examine all the points at which you could be setting the package to fail, either through a script or through the FailPackageOnFailure property.
You can fake the execution result to success by setting the property ForceExecutionResult to Success (Default value of this property is None) for the Foreach Loop Container.
I need open a transaction, and wait the return for do commit or rollback.
But, how can I get return (true/false - not exception or any "break process") of this query?
$this->query('update checks set discount = 100 where check_num = 3001');
In my tests, when an error occurs, it stops the whole process and returns an exception.
I do not want it, just want to know: has successfully executed or error? (true / false)
What mark said in the comments seems accurate, an updateAll() call would seem more appropriate to achieve what you want. If you ever find yourself in a situation where you actually do need transactions, there are examples on how to achieve that in the documentation as well.