What does Siebel Error SBL-BPR-00176 mean? - jboss

My webapp talks to Siebel just fine in one test environment, but in another we are getting the following error message:
<Exception>
<Major No.>256</Major No.>
<Minor No.>6750384</Minor No.>
<Message>
The workflow/task engine cannot determine a next step while executing
process definition 'Dynamic Pricing Procedure'. The last step that it
executed was 'Start'.(SBL-BPR-00176)
</Message>
<DetailedMessage>Unknown<DetailedMessage>
</Exception>
Any idea about what the error message means and what we might do to get around it?

In short: There is something wrong with your workflow process 'Dynamic Pricing Procedure'
Specifically the conditions (branch of type 'Condition') for the next step (after a decision step) are not setup properly. Can not decide the 'next step' based on conditions setup thus you have SBL-BPR-00176.
You should fix your workflow: Try to do a validation on the workflow process or try to edit the conditional expressions in the Workflow Process Designer.

Related

mysqli_query($conn, $sql) On adding this, giving an error of 500 INTERNAL SERVER ERROR, No detailed error shown [duplicate]

In my local/development environment, the MySQLi query is performing OK. However, when I upload it on my web host environment, I get this error:
Fatal error: Call to a member function bind_param() on a non-object in...
Here is the code:
global $mysqli;
$stmt = $mysqli->prepare("SELECT id, description FROM tbl_page_answer_category WHERE cur_own_id = ?");
$stmt->bind_param('i', $cur_id);
$stmt->execute();
$stmt->bind_result($uid, $desc);
To check my query, I tried to execute the query via control panel phpMyAdmin and the result is OK.
TL;DR
Always have mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT); in your mysqli connection code and always check the PHP errors.
Always replace every PHP variable in the SQL query with a question mark, and execute the query using prepared statement. It will help to avoid syntax errors of all sorts.
Explanation
Sometimes your MySQLi code produces an error like mysqli_fetch_assoc() expects parameter 1 to be mysqli_result, boolean given..., Call to a member function bind_param()... or similar. Or even without any error, but the query doesn't work all the same. It means that your query failed to execute.
Every time a query fails, MySQL has an error message that explains the reason. In the older PHP versions such errors weren't transferred to PHP, and all you'd get is a cryptic error message mentioned above. Hence it is very important to configure PHP and MySQLi to report MySQL errors to you. And once you get the error message, fixing it will be a piece of cake.
How to get the error message in MySQLi
First of all, always have this line before MySQLi connect in all your environments:
mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);
After that, all MySQL errors will be transferred into PHP exceptions. An uncaught exception, in turn, makes a PHP fatal error. Thus, in case of a MySQL error, you'll get a conventional PHP error. That will instantly make you aware of the error cause. And the stack trace will lead you to the exact spot where the error occurred.
How to get the error message from PHP
Here is a gist of my article on PHP error reporting:
Reporting errors on a development and live servers must be different. On the development server it is convenient to have errors shown on-screen, but on a live server error messages must be logged instead, so you could find them in the error log later.
Therefore, you must set corresponding configuration options to the following values:
On a development server
error_reporting should be set to E_ALL value;
log_errors should be set to 1 (it is convenient to have logs on a development PC too)
display_errors should be set to 1
On a production server
error_reporting should be set to E_ALL value;
log_errors should be set to 1
display_errors should be set to 0
After that, when MySQL query fails, you will get a PHP error that explains the reason. On a live server, in order to get the error message, you'll have to check the error log.
In case of AJAX call, on a dev server open DevTools (F12), then Network tab. Then initiate the request which result you want to see, and it will appear in the Network tab. Click on it and then the Response tab. There you will see the exact output. On a live server check the error log.
How to actually use it
Just remove any code that checks for the error manually, all those or die(), if ($result), try..catch and such. Simply write your database interaction code right away:
$stmt = $this->con->prepare("INSERT INTO table(name, quantity) VALUES (?,?)");
$stmt->bind_param("si", $name, $quantity);
$stmt->execute();
Again, without any conditions around. If an error occurs, it will be treated like any other error in your code. For example, on a development PC it will just appear on-screen, while on a live site it will be logged for the programmer, whereas for the user's convenience you could use an error handler (but that's a different story which is off topic for MySQLi, but you may read about it in the article linked above).
What to do with the error message you get
First of all you have to locate the problem query. The error message contains the file name and the line number of the exact spot where the error occurred. For the simple code that's enough, but if your code is using functions or classes you may need to follow the stack trace to locate the problem query.
After getting the error message, you have to read and comprehend it. It sounds too obvious if not condescending, but learners often overlook the fact that the error message is not just an alarm signal, but it actually contains a detailed explanation of the problem. And all you need is to read the error message and fix the issue.
Say, if it says that a particular table doesn't exist, you have to check spelling, typos, and letter case. Also you have to make sure that your PHP script connects to a correct database
Or, if it says there is an error in the SQL syntax, then you have to examine your SQL. And the problem spot is right before the query part cited in the error message.
If you don't understand the error message, try to google it. And when browsing the results, stick to answers that explain the error rather than bluntly give the solution. A solution may not work in your particular case, but the explanation will help you to understand the problem and make you able to fix the issue by yourself.
You have to also trust the error message. If it says that number of tokens doesn't match the number of bound variables then it is so. The same goes for the absent tables or columns. Given the choice, whether it's your own mistake or the error message is wrong, always stick to the former. Again it sounds condescending, but hundreds of questions on this very site prove this advise extremely useful.
A list of things you should never ever do in regard of error reporting
Never use an error suppression operator (#)! It makes a programmer unable read the error message and therefore unable to fix the error
Do not use die() or echo or any other function to print the error message on the screen unconditionally. PHP can report errors by itself and do it the right way depends on the environment - so just leave it for PHP.
Do not add a condition to test the query result manually (like if($result)). With error exceptions enabled such condition will just be useless.
Do not use the try..catch operator for echoing the error message. This operator should be used to perform some error handling, like a transaction rollback. But never use it just to report errors - as we learned above, PHP can already do it, the right way.
P.S.
Sometimes there is no error, but no results either. Then it means, there is no data in the database to match your criteria. In this case you have to admit this fact, even if you can swear the data and the criteria are all right. They are not. You have to check them again.
I've got an article that can help in this matter, How to debug database interactions. Although it is written for PDO, the principle is the same. Just follow those instructions step by step and either have your problem solved or have an answerable question for Stack Overflow.

Phoenix / Elixir testing when setting isolation level of transaction

I have a chunk of code that looks something like this:
Repo.transaction(fn ->
Repo.query!("set transaction isolation level serializable;")
# do some queries
end)
In my test suite, I continually run into the error:
(Postgrex.Error) ERROR 25001 (active_sql_transaction): SET TRANSACTION ISOLATION LEVEL must be called before any query
I'm wondering if I'm doing something fundamentally wrong, or if there's something about the test environment that I'm missing.
Thanks!
Not sure if you are still looking for the answer to this but I found a nice solution for this. For the case I have setup block like so:
setup tags do
:ok =
if tags[:isolation] do
Sandbox.checkout(Repo, isolation: tags[:isolation])
else
Sandbox.checkout(Repo)
end
unless tags[:async] do
Sandbox.mode(Repo, {:shared, self()})
end
:ok
end
then on the test that is in the path of the serializable transaction you have to tag it with "serializable" like so:
#tag isolation: "serializable"
test "my test" do
...
end
this will let you run your tests that come across serializable in the path and still use sandbox.
The problem is for testing purposes all of the tests are wrapped in a transaction so they can be rolled back so you don't pollute your database with tons of old test data. Which could result in failures that should have passed and passes that should have failed depending on how you've written your tests.
You can work around it but it will, again, pollute your test database and you'll have to clean it up yourself:
setup do
[Other set up stuff]
Ecto.Adapters.SQL.Sandbox.checkin(MyApp.Repo) #This closes any open transaction, effectively.
Ecto.Adapters.SQL.Sandbox.checkout(MyApp.Repo, [sandbox: false]) # This opens a new transaction without sandboxing.
end
This setup task goes in the test file with your failing tests if you don't have a setup. If you don't do the checkin call you'll (most likely) get an error about other queries running before the one setting the transaction level because you are inserting something before the test.
See here for someone essentially calling out the same issue.

Enterprise Architect Rule Task: Rule Composer Validation warns "Same action logic is bound to different rules"

I am using EA 14.0.1422 and I am having trouble getting Business Rules to work or to understand them how they are supposed to work.
I have 2 business rules and a rule task as seen in the following image:
Now when I start the "Rule Composer" and bind the rules to the decision table and assign values my table looks like this:
For Person.Birthday I have defined the following "allowable values":
However, when I start validation I get the following warning (and error):
Warning: Same action logic is bound to different rules!
Error: Conflicting rule as different condition logics found for same rule!
Validation complete - 1 error(s), 1 warning(s)
When I click on the warning the following parts are being highlighted:
When I click on the error the following parts are being highlighted:
This is how I defined the supporting classes:
My questions if anyone could give me a hint:
What am I doing wrong?
How is this supposed to work?
Thank you very much for your help!

Error handling in activiti

I am trying to handle the web service exception in the workflow (activiti).Here I just created a sample process,where I am calling one of the web service through Service Task which throws an exception(no Sub process).
In order to handle that exception I have added the Boundary error event and gave the error reference as "myError"(same as in code). While I'm trying to deploy ,getting an error as
Attribute 'attachedToRef' must appear on element 'boundaryEvent'.
In activiti modeler i didn't find the attribute as 'attachedToRef'.
Here is the workflow process,which i want to deploy
Can anyone please help me out to resolve this error.
I don't think you can handle such exception in Activiti in such way. alternatively, what you can do is create a class, call your web service via this class and enter the same in the service task.
hope it helped...
You can create sub-process for error handling:
<process id="1" isClosed="false" isExecutable="true" processType="None">
**main process tasks**
<subProcess activiti:exclusive="true" id="eventSP" triggeredByEvent="true">
<startEvent id="startError" name="StartErrorEvent">
<errorEventDefinition id="_5"/>
</startEvent>
<serviceTask>
**tasks for error**
</serviceTask>
</subProcess>
</process>
For error sub-process you've to create separate class(or smth) and execute logic for error.
Or if you want to make exception like boundary read activiti user guide
This is basically because of activiti not able to figure out to which task the boundary event is attached.
To solve this try any one of the following:
Delete the boundary event and re-drag it on to the task again.
Try to add something like this to the xml file based on your id of the task and event.
<boundaryEvent id="BoundaryEventId" attachedToRef="ServiceTaskId">

How to produce business rule output that can be examined in the ODM Rule Execution Server Console?

I am new to ODM 8.5 (the successor to JRules), and I am trying to test some rules in the ODM Rule Execution Server Console. At this point, I'm merely trying to confirm that my rule changes have been deployed to the RES successfully. According to ODM's Testing Ruleset Execution help page, I should be able to examine the Output text box to see "strings that are written to print.out" from the web page under Explorer > RuleApps > RuleApp > Ruleset > Test Ruleset. I've deployed a rule containing the following snippet:
However, after executing the rule, I don't see the output of the println in the Output box. Is println what the documentation refers to when they say "print.out"? I get syntax errors if I try to replace "System.out.println" with "print.out". How can I get simple debug output to appear in the Output box?
The note method will cause output to go to the Output text box of the ODM Rule Execution Server Console, e.g., use:
note("*** This is the rule modification ***");
You can use the Decision warehouse(DW), in RES console.
First you need to activate the tracing in the ruleset properties.
Then after an execution, you can search in DW for execution informations such as, rule executed, data values, etc... Check online documetation details(look for ODM IBM 8.5)
Please note that this may slow down your decisions, so better not use this feature in production systems. Hope this helps.