JBO-25005 implementing multi-entity business rules (solved)
Hi guys,
I've been following through some examples in the "businessrules in adf" whitepaper you recently updated. I'm attempting a multi-entity collection within parent (6.1.4.2) on page 42.
I have two entities defined as a composition and as a simple test I have added the following code to my parent EntityImpl class
public void brCheckStockAvailability() {
throw new JboException("Stock check has failed");
public void beforeCommit(TransactionEvent e) {
brCheckStockAvailability();
super.beforeCommit(e);
}As per document I have updated the jbo.txn.handleafterpostexc property to true. Whenever this code fires however I receive a rather unfriendly error message
oracle.jbo.InvalidObjNameException: JBO-25005: Object name 1 for type Variable is invalid
at oracle.jbo.common.VariableImpl.validateName(VariableImpl.java:234)
at oracle.jbo.common.VariableImpl.setVariableKind(VariableImpl.java:301)
at oracle.jbo.server.ViewObjectImpl.activateParams(ViewObjectImpl.java:13306)
at oracle.jbo.server.ViewObjectImpl.doActivateSettings(ViewObjectImpl.java:13368)
at oracle.jbo.server.ViewObjectImpl.doActivateSettings(ViewObjectImpl.java:13217)
at oracle.jbo.server.ApplicationModuleImpl.activateVOs(ApplicationModuleImpl.java:7173)
at oracle.jbo.server.ApplicationModuleImpl.doActivateState(ApplicationModuleImpl.java:6996)
at oracle.jbo.server.ApplicationModuleImpl.doActivateAMState(ApplicationModuleImpl.java:6961)
at oracle.jbo.server.Serializer.activate(Serializer.java:274)
at oracle.jbo.server.DOMSerializer.activateRootAMFromDOM(DOMSerializer.java:49)
at oracle.jbo.server.DBTransactionImpl.restoreTmpPostState(DBTransactionImpl.java:1876)
at oracle.jbo.server.DBTransactionImpl.commitInternal(DBTransactionImpl.java:2039)
at oracle.jbo.server.DBTransactionImpl.commit(DBTransactionImpl.java:2173)
..........What does this mean ? I have no idea where to even start looking !
I am using JDeveloper 10.1.3.3 (4157) and JHeadstart 10.1.3.1.26
Cheers,
Brent
Message was edited by:
Brent Harlow
Dont' mind me ! Seems the problem came down to one of my tables having a column called "ID". I ran into other SQL issues with this and had to change the column - once I had and had synchronised the business objects - it works fine !! :)
Hi Jeroen,
The fix for me was simple - the problem was being caused by a column name on the underlying table being "ID". Once I changed this name, it worked fine. Check the column names for any reserved words that really shouldn't be used as column names !
Cheers,
Brent
Similar Messages
-
How to make multi-tenant business rules
hi'
I want to write tenant specific Business rules in multi-tenant application, please give me some tips of making multi-tenat business rule.
I know how to write common business rule for all the tenants.
thanks
YatanI'd suggest using Flash Media Interactive Server if you wish to make this type of application and use Flash as the interface. I can't give you the details on exactly how to implement it, but using Remote Shared Object and FMIS would serve as the basis. I believe that the package comes with examples of Shared Objects that can serve as a simple basis from which to proceed. After that you might want to see if you can find an available whiteboard app that can be leveraged to do as you wish.
I apologize in advance if using this type of solution is a non-starter, I've been using FMIS locally and have plans to eventually implement something similar to this type of drawing app as well. -
Business Rules Error when Decision Function surfaced as WebService in BPM
To use a BusinessRule as from a Business Rules activity,it needs to be surfaced as a WebService.
I've run into an issue where as soon as I check that box and save, the BusinessRule in question goes into a error mode when viewed from the BPM Project Manager (which is why this question is posted here).
The scenario is this:
My types are defiend in XSD. There is a SimpleType - FooStepTypeType - which is a retricted xs:string, the common way top create an enumeration. I import this as an XML fact, it creates a Enum bucketset, which is perfect. I create a decision function - DecisionFunction1 - which has an input parameter of this type and a boolean output. I set up a simple decision table to use the input and assert the output. The editor is happy.
At this point, I can't use the DF in my process, as it's not exposed a service, and won't be selectable via the the Properties/Implementation of a Business Rules activity.
A soon as I mark the DF as a WebService and save it, an the rule disappears from the Rules section of the Business Catalog and reappears at the root of the catalog in error. In some cases it can't be edited.
Hovering over the error file produced this error message:
The argument ‘step’ of decision function ‘DecisionFunction1’ could not build because of ‘BPM-71517: Unable to identify the parameter QName. Cause: ‘FooStepTypeType. Action: Make sure that the decision function parameter is of XML type and exactly one XML Schema Element exists that represents the parameter’.
My XSD previously did not contain a freestanding element of this type, but had elements defined in another complex type of this type. Adding a freestanding element didn't change anything. In fact it seems that elements are not avaialble to be imported as XMLFacts, only types.
At this point, if the Rules editor is still open, the DF can be "unserviced" and after saving may be recoverable with a JDev restart. If not, manually removing the DF from the .rules xml file can help recover the file so that it can be edited again.
SO: THE QUESTIONS.
Why can't I use a simpleType as an input parameter for a DF exposed as a WebService? What is BPM-71517 asking me to do exactly? I can't find any references to it via searching. Why does eveything seem fine until I expose it?
Addendum - using JDev 11.1.1.4.0 with BPM tools 11.1.1.4.0.5682
Addendum2 - upgraded to 11.1.1.5.0 and the problem is still there.....
TIA,
Bill
Edited by: wylderbeast on May 20, 2011 9:38 AM
Edited by: wylderbeast on May 20, 2011 10:09 AM
Edited by: wylderbeast on May 31, 2011 3:22 PMFurther invesitgation bears this problem out.
Oracle support recommend wrapping the SimpleType in a ComplexType. This does work, but now I have an extra wrapper element to deal with. I either have to use the wrapped type in my other complex, composed Types and/or add an external wrapping element when trying to create Business Services in BPM to call the BusinessRules I've created.
This is a bit messy.
To be clear, this does not seem to be an issue with Business Rules; the BR editor and generation of Facts (including simple restricted types -> JAXB 2.0/Java Enumerations) seems to work correctly. There seems to be an issue exposing DFs as Services. The code which generated the WSDL and its supporting types seems to choke on restricted SimpleTypes.
As a side note, it seems that HumanTasks have a similar limitation
Edited by: wylderbeast on May 31, 2011 3:27 PM -
Is it possible to have business rules as a table
Hello Friends,
I have an application where in which I had altogether some x procedures, y fucntions and z triggers .
Right now I have implemented all the business rules in the procedures, triggers , and fucntons. Is it possible to have
the implementatkon of business rules as a table so that i can use the table as a rules engine .
I have done with java technologory usaing the business rules as a seperate external file and reading the file for business rules. How about oracle is it possible. If yes can any one give a scenario how i can implement.
thanks/kumarAs posted, your whole procedure could be replaced with:
procedure update_paycheck_deductions is
cursor c1 is select * from MINC ;
cursor c2 is select * from FINC ;
v_flag_boolean boolean := false;
v_famid number ;
BEGIN
for i in c2 loop
for j in c1 loop
if ( i.famid = j.famid ) then
v_flag_boolean := true;
v_famid := j.famid;
end if ;
end loop ;
if ( v_flag_boolean = true ) then
update FINC set famtfedx = 0 WHERE famid = v_famid ;
update FINC set fgovretx = 0 WHERE famid = v_famid ;
update FINC set fpripenx = 0 WHERE famid = v_famid ;
update FINC set frrdedx = 0 WHERE famid = v_famid ;
update FINC set fsltaxx = 0 WHERE famid = v_famid ;
end if;
v_temp_sum_anfedtx := 0;
v_temp_sum_angovrtx := 0;
v_temp_sum_anprvpnx := 0;
v_temp_sum_anrrdedx := 0;
v_temp_sum_ansltx := 0;
end loop;
end;Since none of the j.column != null and predicates will ever be true. This is roughly equivalent to your code:
SQL> WITH t AS (
2 SELECT 10 amount, 'Y' col2 FROM dual UNION ALL
3 SELECT null, 'Y' FROM dual UNION ALL
4 SELECT 25, 'N' FROM dual)
5 SELECT amount, col2, CASE WHEN amount != NULL and
6 col2 != 'N' THEN amount
7 ELSE 0 END eval_amount
8 FROM t;
AMOUNT C EVAL_AMOUNT
10 Y 0
Y 0
25 N 0This would simplify Toon's merge statement to:
merge
into FINC f
using (select distinct j.famid, 0 amount
from MINC j) m
on (f.famid = m.famid)
when matched then
update set f.famtfedx = m.amount
,f.fgovretx = m.amount
,f.... = m.amount
,f.... = m.amount
,f.... = m.amountWhich could be further simplified to:
update finc
set famtfedx = 0,
fgovretx = 0,
where famid in (select famid from minc)Whiich strikes me as an odd business rule, specially for one dealing with (apparently) payroll.
I won't go into the fact that you will scan every record in once for every record in minc. I hope these are not large tables.
I have seen a number, and even worked on a a couple of payroll systems based on "business" rules in tables to avoid putting the rules in code. None of them were very good and perfomance tended to lag when there were more than a few people to pay.
You need to explain a lot more about what sort of business rules you want to put into tables.
John -
Solving "COMMIT business rules" on the database server
Headstart Oracle Designer related white paper
"CDM RuleFrame Overview: 6 Reasons to get Framed"
(at //otn.oracle.com/products/headstart/content.html) says:
"For a number of business rules it is not possible to implement these in the server
using traditional check constraints and database triggers. Below you can find two examples:
Example rule 1: An Order must have at least one Order Line ..."
But, one method exists that allows solving "COMMIT rules" completely on the database level.
That method consists of the possibility of delaying the checking of the declarative constraints (NOT NULL, Primary Key, Unique Key, Foreign Key, Check Constraints) until the commit
(that method was introduced first in the version 8.0.).
E.g. we add the field "num_emps" to the DEPT table, which always has the value of the number
of the belonging EMP rows and add DEFERRED CK which uses the values from that field:
ALTER TABLE dept ADD num_emps NUMBER DEFAULT 0 NOT NULL
UPDATE dept
SET num_emps = (SELECT COUNT (*) FROM emp WHERE emp.deptno = dept.deptno)
DELETE dept WHERE num_emps = 0
ALTER TABLE dept ADD CONSTRAINT dept_num_emps_ck CHECK (num_emps > 0) INITIALLY DEFERRED
Triggers that insure the solving of the server side "COMMIT rules" are fairly simple.
We need a packed variable that is set and reset in the EMP triggers and those value
is read in the bur_dept trigger (of course, we could have place the variable in the package
specification and change/read it directly, thus not needing the package body,
but this is a "cleaner" way to do it):
CREATE OR REPLACE PACKAGE pack IS
PROCEDURE set_flag;
PROCEDURE reset_flag;
FUNCTION dml_from_emp RETURN BOOLEAN;
END;
CREATE OR REPLACE PACKAGE BODY pack IS
m_dml_from_emp BOOLEAN := FALSE;
PROCEDURE set_flag IS
BEGIN
m_dml_from_emp := TRUE;
END;
PROCEDURE reset_flag IS
BEGIN
m_dml_from_emp := FALSE;
END;
FUNCTION dml_from_emp RETURN BOOLEAN IS
BEGIN
RETURN m_dml_from_emp;
END;
END;
CREATE OR REPLACE TRIGGER bir_dept
BEFORE INSERT ON dept
FOR EACH ROW
BEGIN
:NEW.num_emps := 0;
END;
CREATE OR REPLACE TRIGGER bur_dept
BEFORE UPDATE ON dept
FOR EACH ROW
BEGIN
IF :OLD.deptno <> :NEW.deptno THEN
RAISE_APPLICATION_ERROR (-20001, 'Can''t change deptno in DEPT!');
END IF;
-- only EMP trigger can change "num_emps" column
IF NOT pack.dml_from_emp THEN
:NEW.num_emps := :OLD.num_emps;
END IF;
END;
CREATE OR REPLACE TRIGGER air_emp
AFTER INSERT ON emp
FOR EACH ROW
BEGIN
pack.set_flag;
UPDATE dept
SET num_emps = num_emps + 1
WHERE deptno = :NEW.deptno;
pack.reset_flag;
END;
CREATE OR REPLACE TRIGGER aur_emp
AFTER UPDATE ON emp
FOR EACH ROW
BEGIN
IF NVL (:OLD.deptno, 0) <> NVL (:NEW.deptno, 0) THEN
pack.set_flag;
UPDATE dept
SET num_emps = num_emps - 1
WHERE deptno = :OLD.deptno;
UPDATE dept
SET num_emps = num_emps + 1
WHERE deptno = :NEW.deptno;
pack.reset_flag;
END IF;
END;
CREATE OR REPLACE TRIGGER adr_emp
AFTER DELETE ON emp
FOR EACH ROW
BEGIN
pack.set_flag;
UPDATE dept
SET num_emps = num_emps - 1
WHERE deptno = :OLD.deptno;
pack.reset_flag;
END;
If we insert a new DEPT without the belonging EMP, or delete all EMPs belonging to a certain DEPT, or move all EMPs of a certain DEPT, when the COMMIT is issued we get the following error:
ORA-02091: transaction rolled back
ORA-02290: check constraint (SCOTT.DEPT_NUM_EMPS_CK) violated
Disvantage is that one "auxiliary" column is (mostly) needed for each "COMMIT rule".
If we'd like to add another "COMMIT rule" to the DEPT table, like:
"SUM (sal) FROM emp WHERE deptno = p_deptno must be <= p_max_dept_sal"
we would have to add another column, like "dept_sal".
CDM RuleFrame advantage is that it does not force us to add "auxiliary" columns.
We must emphasize that in real life we would not write PL/SQL code directly in the database triggers, but in packages, nor would we directly use RAISE_APPLICATION_ERROR.
It is written this way in this sample only for the code clarity purpose.
Regards
Zlatko SiroticZlatko,
You are right, your method is a way to implement "COMMIT rules" completely on the database level.
As you said yourself, disadvantage is that you need an extra column for each such rule,
while with CDM RuleFrame this is not necessary.
A few remarks:
- By adding an auxiliary column (like NUM_EMPS in the DEPT table) for each "COMMIT rule",
you effectively change the type of the rule from Dynamic (depending on the type of operation)
to a combination of Change Event (for updating NUM_EMPS) and Static (deferred check constraint on NUM_EMPS).
- Deferred database constraints have the following disadvantages:
When something goes wrong within the transaction, then the complete transaction is rolled back, not just the piece that went
wrong. Therefore, it becomes more important to use appropriate commit units.
There is no report of the exact row responsible for the violation nor are further violations either by other rows or of other
constraints reported.
If you use Oracle Forms as a front end application, the errors raised from deferred constraints are not handled very well.
- CDM discourages the use of check constraints. One of the reasons is, that when all tuple rules are placed in the CAPI,
any violations can be reported at the end of the transaction level together with all other rule violations.
A violated check constraint would abort the transaction right away, without the possibility of reporting back other rule violations.
So I think your tip is a good alternative if for some reason you cannot use CDM RuleFrame,
but you'd miss out on all the other advantages of RuleFrame that are mentioned in the paper!
kind regards, Sandra -
ADF BC, how implements business rules?
Hi.
I am new in oracles technology. Please help me understand how implements business rules.
For example: I have two tables operation(id,code) and operation_item(id, operation_id, code). I create entities objects for it: OperationEntity, OperationItemEntity and association: OperationItemToOperation. Then create entity-based view object OperationById which have bind parameter id for find operation by id. I also create entity-based view object OperationItem and view link OperationItemToOperationLink.
My ApplicationModule contains OperationById and OperationItem via OperationItemToOperationLink
I want implements "clone" method at OperationById view for current row. This method create copy selected row from operation table and copy all rows from operation_item table where operation_item.operation_id = operation.id.
I add method createCurrentRowClone to OperationById:
public void createCurrentRowClone() {
OperationByIdRowImpl currentRow =
(OperationByIdRowImpl ) getCurrentRow();
OperationByIdRowImpl newRow = (OperationByIdRowImpl ) createRow();
insertRow(newRow);
newRow.setAttributes(currentRow);
//TODO create copy for all rows from OperationItem
//??? how get OperationItem instance
and I add method clone to OperationItem:
public void createClone {
// for all row from OperationItem create clone
but I don't understand how get OperationItem instance in OperationById scope. I have method getOperationItems() in OperationByIdRowImpl class which return RowIterator, and it give me instances of OperationItemRowImpl class, but not OperationItem with rows where operation_item.operation_id = operation.id
Thanks in advanceFor realizations "clone" method which make copy for current row from OPERATION table and all rows from OPERATION_ITEM table where
operation_item.operation_id = operation.id I moved realisation business logic from View Object to Entity.
For it enough:
1) entities objects: OperationEntity, OperationItemEntity;
2) association for this entities: OperationItemToOperation;
3) entity-based view object: OperationById which have bind parameter "id" for find operation by ID;
4) application module: ApplicationModule;
I add method createCurrentRowClone to OperationByIdImpl class. It just call createClone method for current row:
public void createCurrentRowClone() {
OperationByIdRowImpl currentRow = (OperationById) getCurrentRow();
currentRow.createClone();
method createClone in OperationByIdRowImpl class call createClone method from entity layer:
public void createClone() {
getOperationEntity().createClone();
method createClone in OperationEntityImpl class make new row and call createClone for all row from OperationItemEntity:
public void createClone() {
OperationEntityImpl newRow = (OperationEntityImpl) getDefinitionObject().createInstance2(
getDBTransaction(),null);
newAtm.setCode(getCode());
//create copy for all rows atm_operation
RowIterator itemIterator = getOperationItemEntities();
while ( itemIterator .hasNext() ) {
OperationItemEntity itemRow = (OperationItemEntity ) itemIterator.next();
itemRow.createClone(newRow);
and finally method createClone(OperationEntityImpl operation) in OperationItemEntityImpl class make new row in OPERATION_ITEM table
public void createClone(OperationEntityImpl operation) {
OperationItemEntityImpl newItem = (OperationItemEntityImpl) getDefinitionObject().createInstance2(
getDBTransaction(), operation);
newItem.setCode(getCode());
If you have another solution, please post it here. -
Business rules to implement - BEST way - triggers and mutating table
I have the following table where it has Foreign Key defined on itself(self reference for parent_id column which can be null or valid site_id)
create table test_virtual_site
site_id number CONSTRAINT site_id_pk primary key,
parent_id number CONSTRAINT parent_site_id_unq UNIQUE ,
closed_date date default NULL ,
CONSTRAINT check_self_ref CHECK(parent_site_id <> site_id), --avoid self refernce
CONSTRAINT check_valid_site foreign key(parent_site_id) references test_virtual_site(site_id)
I have the following business rules to implement and my problem is related to their implementation
1) A check should be made that Site_id specified as parent_id should not be a child of any other store (parent should have its parent_id column as NULL)
Site_id Parent_id
1
2 1
3 2 =>NOT VALID 2 is a child of another store
2) Parent is not closed
Site_id Parent_id Closed_date
1 10-May-2005
3 1 =>NOT VALID 1 is a closed
3)
when parent store is closed - updated so at closed_date is not null
Want to set the parent_id as NULL for the child store.
OR
SET the closed_date for child store too same as the parent_store.
Example
Site_id Parent_id Closed_date
1
1 2
Update test_virtual_site
SET closed_date = sysdate
Where site_id = 1 ;
Through Trigger
Site_id Parent_id Closed_date
1 22-Mar-06
1 2 22-Mar-06
OR
Site_id Parent_id Closed_date
1 22-Mar-06
1
When I am trying to do the above mentioned through constraints I am running into mutating trigger problem. Can you please guide me what is the best way to handle the above-mentioned scenarios.
I am aware that I can avoid the 3rd problem using the following
-- - Initialize an array in the before statement trigger.
-- - Add the processed rowid to the array in the after row
-- trigger.
-- - In the after statement trigger: get each rowid from the
-- array and process it. When all rowids are processed, clear
-- the array.
BUT for 1 and 2 I need to look at the parent specified , the parent exists in the same table BUT I can not perform the lookup from the BEFORE INSERT ROW LEVEL trigger but I want to ensure at the row level , so if the parent store is closed or parent specifed itself is a child(not permissible) I want to rollback the insert RAISE_APPLICATION_ERROR.
Can you please guide me what is the best way to handle the above mentioned conditions .I have the following table where it has Foreign Key defined on itself(self reference for parent_id column which can be null or valid site_id)
create table test_virtual_site
site_id number CONSTRAINT site_id_pk primary key,
parent_id number CONSTRAINT parent_site_id_unq UNIQUE ,
closed_date date default NULL ,
CONSTRAINT check_self_ref CHECK(parent_site_id <> site_id), --avoid self refernce
CONSTRAINT check_valid_site foreign key(parent_site_id) references test_virtual_site(site_id)
I have the following business rules to implement and my problem is related to their implementation
1) A check should be made that Site_id specified as parent_id should not be a child of any other store (parent should have its parent_id column as NULL)
Site_id Parent_id
1
2 1
3 2 =>NOT VALID 2 is a child of another store
2) Parent is not closed
Site_id Parent_id Closed_date
1 10-May-2005
3 1 =>NOT VALID 1 is a closed
3)
when parent store is closed - updated so at closed_date is not null
Want to set the parent_id as NULL for the child store.
OR
SET the closed_date for child store too same as the parent_store.
Example
Site_id Parent_id Closed_date
1
1 2
Update test_virtual_site
SET closed_date = sysdate
Where site_id = 1 ;
Through Trigger
Site_id Parent_id Closed_date
1 22-Mar-06
1 2 22-Mar-06
OR
Site_id Parent_id Closed_date
1 22-Mar-06
1
When I am trying to do the above mentioned through constraints I am running into mutating trigger problem. Can you please guide me what is the best way to handle the above-mentioned scenarios.
I am aware that I can avoid the 3rd problem using the following
-- - Initialize an array in the before statement trigger.
-- - Add the processed rowid to the array in the after row
-- trigger.
-- - In the after statement trigger: get each rowid from the
-- array and process it. When all rowids are processed, clear
-- the array.
BUT for 1 and 2 I need to look at the parent specified , the parent exists in the same table BUT I can not perform the lookup from the BEFORE INSERT ROW LEVEL trigger but I want to ensure at the row level , so if the parent store is closed or parent specifed itself is a child(not permissible) I want to rollback the insert RAISE_APPLICATION_ERROR.
Can you please guide me what is the best way to handle the above mentioned conditions . -
Business rules implementation: suggestions
Hi all,
my customer has asked me to implement a set of screens that would allow him to enter new rules or modify existing business rules for his company. Currently, they are sort of hard-coded into the software he uses.
The software he used is a java application combined with an Oracle database.
One way to do this would be just to put together some clever tables in the database with columns and rows indicating what parameters to use for a specific business rule. But how to assess whether a "clever" Oracle table is going to be enough and how far could it be used with more complicated rules ?
OTher suggestions ?
Thank you .
G.Well, there was an official API (meaning from Sun) for a rules engine in Java... Java Rule ( or Rules) Engine API. No idea how mature it is , since I've never used it.
Search for it and find out if it can help.. -
Business Rules Framework (BRF) Implementation
Hi Gurus,
We are in SRM 7.0 (EHP2) ,Extended Classic and planning to migrate from Application Controlled workflow to Business Rules Framework( BRF) workflow.
As of now we have BBP_WFL_APPROV_BADI to determine approvers dynamically based on Approval limits custom table and based on cost center for SCs.
For POs its based on Purchasing Hierarchy
Please let me know how to handle dynamic approvals for SC and PO.
Also please let me know how to handle the opens SCs and POs and their migration,switch back to application controlled if things doesn't work fine.
Thanks in advance
RajHello,
many wiki and documents explain what you are asking for...
I let you look for those documents.
Wiki
Blog
Documents
Regards.
Laurent. -
[solved] JBO-25005: Object name 1 for type Variable is invalid
Hi All
When Deploying our Application to Oracle Application server we got this Exception on the Application log after while
JBO-30003: The application pool (model.setup.SetupAppModuleLocal) failed to checkout an application module due to the following exception:
oracle.jbo.JboException: JBO-29000: Unexpected exception caught: oracle.jbo.InvalidObjNameException, msg=JBO-25005: Object name 1 for type Variable is invalid
at oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(ApplicationPoolImpl.java:2002)
at oracle.jbo.common.ampool.ApplicationPoolImpl.useApplicationModule(ApplicationPoolImpl.java:2793)
at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:453)
at oracle.jbo.http.HttpSessionCookieImpl.useApplicationModule(HttpSessionCookieImpl.java:233)
at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:424)
at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:419)
at oracle.adf.model.bc4j.DCJboDataControl.rebuildApplicationModule(DCJboDataControl.java:1543)
at oracle.adf.model.bc4j.DCJboDataControl.beginRequest(DCJboDataControl.java:1404)
at oracle.adf.model.BindingContext.beginRequest(BindingContext.java:683)
at oracle.adf.model.BindingRequestHandler.invokeBeginRequest(BindingRequestHandler.java:346)
at oracle.adf.model.BindingRequestHandler.beginRequest(BindingRequestHandler.java:166)
at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:161)
## Detail 0 ##
oracle.jbo.InvalidObjNameException: JBO-25005: Object name 1 for type Variable is invalid
at oracle.jbo.common.VariableImpl.validateName(VariableImpl.java:234)
at oracle.jbo.common.VariableImpl.setVariableKind(VariableImpl.java:301)
at oracle.jbo.server.ViewObjectImpl.activateParams(ViewObjectImpl.java:13306)
at oracle.jbo.server.ViewObjectImpl.doActivateSettings(ViewObjectImpl.java:13368)
at oracle.jbo.server.ViewObjectImpl.doActivateSettings(ViewObjectImpl.java:13217)
at oracle.jbo.server.ApplicationModuleImpl.activateVOs(ApplicationModuleImpl.java:7173)
at oracle.jbo.server.ApplicationModuleImpl.doActivateState(ApplicationModuleImpl.java:6996)
at oracle.jbo.server.ApplicationModuleImpl.doActivateAMState(ApplicationModuleImpl.java:6961)
What does this mean ??Hi Mahmoud,
from the stack trace, it appears the error occurs at AM activation.
Check your application is activation-safe by setting the parameter jbo.ampool.doampooling=false in your development environment.
See "Set jbo.ampool.doampooling=false to Reproduce Problems Related to AM Passivation / Activation"
URL: http://blogs.oracle.com/Didier/2006/11/12
Does the error reproduces there ?
You will then be able to diagnose the issue further, f.ex. by switching on the BC4J diagnostics, with the java option -Djbo.debugoutput=console:
in your Project properties , in the Run/Debug panel, select a run configuration and click Edit to edit it.
Then add the string -Djbo.debugoutput=console to the Java Options field.
Then run your application and reproduce the error.
You'll then probably know the VO that has the problem.
At activation, ADF BC has to reset the bind variables, and it seems there is a problem at that time.
What kind of bind variables do you use ?
Positional bind variables or named bind variables ?
Regards,
Didier. -
How to get rid of Business Rule in JhsModel: JHS-00128 Allowable Values req
JHeadstart 10.1.3.2
We are using FlexItems in our application.
The JhsModel implementation, shipped in Jar file jhsadfrt-10.1.3.jar, contains the underlying ADF BC objects for the FlexItem functionality.
When we try to create (or remove) a FlexItemDefinition of type Dropdown List, we are stopped by the error: JHS-00128: Allowable Values are required for this Item Display Type.
We do not want that - we have a UID that does not allow editing of master and details on the same page. Therefore, we will never be able to successfully create a dropdown list item since we cannot in the same transaction create the allowable values as well.
How could we disable this business rule - or remove it altogether? I suppose it is implemented somewhere in the jar file that contains the JhsModel project. What is the recommended way of disabling this constraint?
thanks for your help
LucasHi Lucas,
This error is raised if the number of allowable values is zero and the allowable values query of the flexitemdefinitions entity is 'empty'. You could write a (temporary) dummy allowable values query in the flexitemdefinitions entity in order to save the master, and then once you've input the allowable values in the details page, remove or reset the value in the allowable values query attribute of the flexitemdefinitions entity.
Hope this helps,
Regards,
Ibrahim -
DataExport Syntax Error in Business Rules
I am having issues trying to create a data export business rule in version 9.3.1. The syntax works fine as a calc script but when I copied it to a business rule I get a syntax error at the first bracket ({) after the 'DATAEXPORTOPTIONS.' The error says it was expecting "\", "]]", <SUBST_VARIABLE>...
The script is pretty simple:
SET DATAEXPORTOPTIONS
DataExportColFormat ON;
DataExportColHeader "Account";
DataExportOverwriteFile ON;
FIX(&ActYear, "Plan","Working.DIV","Local","USD","EUR""HSP_InputValue",@LEVMBRS("Entity",0),"Patch_US","Total Employees")
FIX(@REMOVE(&LastClosedMonth:"Dec",&LastClosedMonth))
FIX("RegularWages","MeritInc","FICATax","FUTATax","SUTATax","IntlTax",@DESCENDANTS("HCFT"),@DESCENDANTS("HCPT"),@DESCENDANTS("HCInt"))
DATAEXPORT "File" "," "F:\Hyperion\AnalyticServices\app\AOLWFP\WrkForce\Exp_WrkForce_ActYear.txt";
ENDFIX
ENDFIX
ENDFIX
I know the data export would not work with business rules unless you have at least patch version 9.3.1.1.5. This shouldn't be an issue:
EAS - 9.3.1.4
BR - 9.3.1.1.11
Planning - 9.3.1.1.12.5
Has anyone come across this before? Any help would be greatly appreciated.
-JohnThank you for pointing this out.
I'm currently browsing metalink kb but "7021469 - Business Rules should support dataexport and dataimportbin functionality" provides no results.
hbr_93300_readme.pdf refers indeee to that issue but I cannot upgrade to that version (because, as stated in that pdf, I should upgrade all prouducts to 9.3.3)
You said it might be solved in Administration Services release 9.3.1.5 (I believe 9.3.1.1.5 was a typo), but the readme does not mention it... -
Validation - Business Rule or/and UJ_Validation
Hi experts,
I'm on BPC 7.5 NW, I'm facing problem to construct a simple validation where I need to compare the amount from one parent account against to other. Let's explain the business scenario and after the technical solutions.
Business Scenario
Compare the Total Assets is equal to the Total Liabilities. The Total Assets is represented by a parent account "1", the Total Liabilities is represented by a parent account "2". If it is different show a warning.
This is need to trigger, after the Actual Transactional Data Load + Journals.
Technical Solution
Application: Legal
Dimensions: Empresa (Entity), Conta (Account), Fonte (C_DataScr), Versao (C_Category), Groups, Intco, MesAno (Time), TipMov (Flow), CCusto (User Defined), CLucro (User Defined)
1 - Business Rule
Validation Definition
Validation Account Remark Validation Operand Other destination dimension Members Validation Tolerance
ZATIVO_X_PASSIVO Ativo x Passivo = CONTA=VALIDATIVPASS,INTCO=SPTOTAL,CLucro=ACTEDUMMY,CCusto=ACTENONE 0
Account 1 Flow 1 Sign 1 Account 2 Flow 2 Sign 2 Remark
1 TMTOTAL* 1 2 TMTOTAL* 1 Ativo x Passivo
*The TMTotal Flow is a parent from every data on the master data TipMov (flow)
Validation.lgf
*RUN_PROGRAM VALIDATION
CATEGORY = %VERSAO_SET%
CURRENCY = %GROUPS_SET%
TID_RA = %MESANO_SET%
OTHER = [ENTITY=%EMPRESA_SET%]//For More than one other scope parameters: OTHER = [ENTITY=%ENTITY_SET%;INTCO=%INTCO_SET%...]
*ENDRUN_PROGRAM
Result
When I run with this parameters I receive the message : "UJP_PROCESS_EXCEPTION:Data for category not found in application LEGAL"
2 - Validation with UJ_Validation
Assign the driver dimension to Legal - in case I used the CONTA (Account)
Rule Maintenance
Assigned Member: "1" and "2"
Use Logic Table
Dimension = Empresa (Entity)
Operator "="
Members = TECSA - This is a parent from every Entities.
Result
When I run with this parameters I receive the message : "UJP_PROCESS_EXCEPTION:Data for category not found in application LEGAL"
3 - Validation with UJ_Validation and BADI
Assign the driver dimension to Legal - in case I used the CONTA (Account)
Rule Maintenance
Assigned Member: "1" and "2"
Use BAdI Implementation
BADI_UJ_VALIDATION_RULE_LOGIC
Create a Enhancement ZATIVO_X_PASSIVO
Filter
Rule_Num = 1
APPSET_ID = ZTECSA
DIMENSION = CONTA
Class
METHOD if_uj_validation_rule_logic~do_validation_logic.
FIELD-SYMBOLS:
<field1> TYPE ANY,
<field2> TYPE ANY.
ASSIGN COMPONENT 'FIELD1' OF STRUCTURE is_data TO <field1>.
ASSIGN COMPONENT 'FIELD2' OF STRUCTURE is_data TO <field2>.
IF <field1> NE <field2>.
es_message-message = 'Error in Validation'.
es_message-recno = 1.
es_message-MSGTY = 'W'.
ENDIF.
ENDMETHOD.
And add this line to the script
*START_BADI_UJ_VALIDATION_RULE_LOGIC~DO_VALIDATION_LOGIC
QUERY = ON
WRITE = ON
*END_BADI
Result
Data Region:
[WARNING!] NO MEMBER SPECIFIED FOR DIMENSION:CCUSTO WILL QUERY ON ALL BASE MEMBERS.
[WARNING!] NO MEMBER SPECIFIED FOR DIMENSION:CLUCRO WILL QUERY ON ALL BASE MEMBERS.
[WARNING!] NO MEMBER SPECIFIED FOR DIMENSION:CONTA WILL QUERY ON ALL BASE MEMBERS.
[WARNING!] NO MEMBER SPECIFIED FOR DIMENSION:FONTE WILL QUERY ON ALL BASE MEMBERS.
[WARNING!] NO MEMBER SPECIFIED FOR DIMENSION:INTCO WILL QUERY ON ALL BASE MEMBERS.
[WARNING!] NO MEMBER SPECIFIED FOR DIMENSION:TIPMOV WILL QUERY ON ALL BASE MEMBERS.
[WARNING!] MEASURES IS NOT SPECIFIED!
So what could I make to maintain all my options to do what I need ?
I appreciate any help
Best Regards
Alexandre Mendoza CollepicoloHi,
Just to check, can you try and hardcode the category in the rules itself...just for a test to see if it is working.
You can have the category mentioned as CATEGORY=ACTUAL in the rules itself for Other source dimension members and other destination members. J
This is to check if the validation package runs successfully or not.
Thanks,
Sreeni -
Is it possible to use "not" logical operator in a Business Rule Condition?
This seems like a very simple request to me, but I cannot see any other questions/answers about it.
Can I add a "not" to my Conditions in a Business Rule?
My scenario is that I have a core Entity with a Type. The Type is a domain attribute with a Code and Name. The Code of the core Entity should in the form 'AA-9999', where 'AA' is the Code from Type.
The idea is that I have a business rule with the condition "not
Code starts with DBA.Type.Code" and the Action would be "Code is not valid".
Is this possible? Is there a better way of implementing this?
Thanks,
MichaelYeah! This is the board in question! But it has lots of versions, like K7T Pro, K7T Pro2 (my one!), K7T Turbo, K7T Turbo Limited Edition and K7T Turbo2, all of then are WS-6330 Lite... They phisically diferent, but the BIOS seens to be the same... I want to know is this feature in the newer version is going to work or not on my board (MS 6330 Lite K7T Pro2 Ver:1) ....
Doesn´t matter what board you choose (PRO, PRO2, Turbo, Turbo2) the MSI page shows all the same BIOS to Download... But I think that this feature is only applicable for K7T Turbo2, but will make no difference in my! At least that´s what I think...
But you´re right! The board that I have is the one on the link you said!
Thanks! -
Oracle Rules Manager vs Oracle Business Rules
Hi
Can someone explain the difference between Oracle Rules Manager and Oracle Business Rules.
Is Oracle Promoting both the products?
What I understand is that Oracle Rules Manager comes a part of the Oracle Database 10g R2 (and 11g) and Oracle Business Rules is a part of the SOA suite.
Is there any difference in the positioning of both these products?
Our client is evaluating various Rules engines in the market and we want to make sure that we choose the correct product.
Thanks, SriniIgor S. wrote:
He solves the same problem with rules and without. My question was what would be better? Why would you chose one over the other. I prefer rules that is easy to state, easy to read, and easy to implement. Clear text rules in Prolog being a firm favourite. :-)
Using a rules engine, with a fairly complex API, in order to define rules? I would want very sound and very robust justification for that.
Taking this EMP table example. If there is a single AddEmp() PL/SQL procedure interface for adding employees, it is simple matter to see what it does, how it does that, and test and debug that. The only knowledge needed is the ability to read and understand the source code. The same cannot be said of rules engines.
As for the issue of updating AddEmp() with new rules. Edition redefinition takes care of versioning database objects. And in a far more controlled fashion than dealing with a rules engine that is dynamically update now! while the database is in use - and you have no real idea or real control over when exactly now! was.
Maybe you are looking for
-
Stuck with waiting for changes to be applied to syncing?
Am stuck with waiting for changes to be applied to syncing? what can I do?
-
Using function key instead of mouse click to control as bsp form
Hello, Is it possible to use functionkeys or a keystroke (the arrowkeys) to control a BSP form? Greetings, Edwin
-
Jsp implementation of the worklist client for weblogic 6.0
Hi Please find attached a demo version of how you can implement a JSP based worklist client. This code is simply for demonstration/reference purposes only but it illustrates how to implement a JSP client to the BPM product. This application is not co
-
Oracle 11.1.0.6 RDBMS Upgrade to 11.2 What Patch Number for Linux?
I have Oracle RDBMS 11.1.0.6 on 64bit Linux two node RAC and trying to find out what is the patch number to upgrade the database to R2. Thanks
-
How do I install Classic on my iBook G4 (1Ghz)? I already have 10.4.10 installed. I have the Mac OS X Tiger Install DVD, but cannot find Classic to install. I booted from the DVD, but there were no options to install Classic. Is Classic not available