Using Rule 168, SWX_GET_MANAGER and Chief Position
We have enabled standard SAP Travel Workflow WS20000040 - Approve Trip. We are not currently using OM relationships A002 (Reports Line to) or B002 (Is Line Supervisor of). We currently identify the Line Manager of the employee using the Chief Position designation A 012 and would like to use this for Trip approvals in lieu of building all of these additional relationships.
Rule 168 is bound to the workflow. According to the documentation associated with the rule, it seems that the rule should work with either the A002 or A012 relationship. However, we only seem to be getting a superior identified when relationship A002/B002 exists.
Are there additional configuration or parameter settings that we might need to consider to make the manager (agent) determined properly exclusively with the Chief Position assignment?
Thanks for any guidance you can provide.
Regards,
Edited by: Bruce Hull on Jul 24, 2008 5:37 PM
Edited by: Bruce Hull on Jul 24, 2008 5:37 PM
Edited by: Bruce Hull on Jul 24, 2008 7:29 PM
What I found through trial and error is that rule 168 does indeed evaluate the A012 relationship by default with no change in the standard evaluation path. In our testing system, the "Chief" postion was not properly assigned. Once this was resolved, the workflow works properly.
As a side note, I also learned that you must have the parameter WFLOW VAPOS set for the rule to properly look up the organizational structure when a position (and chief) are vacant.
Similar Messages
-
Difference between Relationship A/B002 (Reports to) and Chief Position?
Hi Everyone,
What is the difference between relationship A/B002 (Position X reports to Position Y) as opposed to everyone in the same org unit reporting to the chief? What is the difference between these 2 types of reporting relationship? If both the relationship exist at the same system, what does the system recognizes?Hi Lee,
To Get the managers id from HRP1001, where the employee with
object id (p0001-plans) reports to(A-002) a managers id - v_mangid.
check the following code snippet***************
IF NOT p0001-orgeh IS INITIAL .
SELECT SINGLE sobid
FROM hrp1001
INTO v_sobid_1
WHERE otype EQ c_o
AND objid EQ p0001-orgeh
AND rsign EQ c_a
AND relat EQ c_002
AND plvar EQ c_plvar
AND istat EQ c_istat
AND begda LE sy-datum
AND endda GE sy-datum
AND sclas EQ c_o.
IF sy-subrc = 0 .
SELECT SINGLE sobid
FROM hrp1001
INTO v_sobid_2
WHERE otype EQ c_o
AND objid EQ v_sobid_1
AND rsign EQ c_b
AND relat EQ c_012
AND plvar EQ c_plvar
AND begda LE sy-datum
AND endda GE sy-datum
AND sclas EQ c_s .
If the above statement is successful.(i.e if the employee has a manager)
IF sy-subrc EQ 0.
SELECT SINGLE pernr
FROM pa0001
INTO v_pernr "wa_pa0002
WHERE plans EQ v_sobid_2
AND begda LE sy-datum
AND endda GE sy-datum.
IF sy-subrc = 0 .
SELECT SINGLE
nachn
vorna
FROM pa0002
INTO (wa_output-reportsto_last_name , wa_output-reportsto_first_name)"wa_pa0002
WHERE pernr EQ v_pernr
AND begda LE sy-datum
AND endda GE sy-datum.
ENDIF. " End of IF sy-subrc EQ 0.
ENDIF.
ENDIF.
ENDIF.
or even u can check this FM too.
To find Level 1, Level2, Level 3 Reporting Manager for an employee.
Pernr--> Leve1 Manager --> Leve2 Manager --> Leve3 Manager .
Use Function Module RH_STRUC_GET by passing positions.
OR You can Use this scenario also.
For fetching Level 1 manager, there are 2 options:
1.You can use FM RH_GET_LEADER for PERNR,Position or User
2.Use FM RH_READ_INFTY with Subtype = A008.
For Fetching Level2 manager,
1. Fetch Level 1 manager.
2. Get Level1 manager's Org.
3. Get Level2 manager using FM RH_GET_LEADER.
Try this ...
Regards
Rohini Devi B G -
SWX_GET_MANAGER and Vacant position
Hi All,
I am working on a approval workflow for Budget Distribution Request. When a person requests for a budge, it has to go to the Manager and his superiors of that department who will either approve or reject it. (I have employee SAP USER ID).
I am using the Rule 00000168 but when the superior is on vacation or the position is vacant the FM attached to this rule will not fetch me the details there by stopping my approval process.
So how to proceed in this scenario.
Any inputs in this regard are welcome.
Thank you,
Lakshmi Narayana.SHi Lakshmi Narayana.S,
another option to use the function RH_ACT_LEADING_POSITION or SWX_GET_MANAGER as implemented in rule 157 or in 168.
But:
- in the previous node you call this function to evaluate the manager
- if there is no manager/result you can throw an exception which is implemented in your method - then in the workflow as a new outcome
- react to your exception as you wish in the outcome
Regards
Tibor -
Rule 168 to work with org structure and not relationships
Hi,
I would like to use rule 168 to work with the organizartional structure and not the relationships maintained in PO10 organizational unit.
this is because i want the agent to be the person with the red hat and not the a002 relationship maintained in organizational unit. i tried using rule 157 but it does the same thing and determines agent based on relationships maintained in org unit.
basically i dont want the agent to be any of the line mangers which may have been set up, i want it to be the red hat of the org structure
does anyone know how i can do this, or will i need to delete the relationships between staffing?
Thanks
ForhadHere is a code example to read from the tables in base to the personnel number emulating the SWE_GET_MANAGER function, I hope this helps. Regards.
Z GET MANAGER *******************
***Gets the position for the creator of the requisition
clear V_OBJID.
select single objid into V_OBJID from HRP1001
where otype = 'S' and
plvar = '01' and
rsign = 'A' and
relat = '008' and
begda <= sy-datum and
endda >= sy-datum and
infty = '1001' and
sclas = 'US' and
sobid = pt_cont-VALUE+2.
if sy-subrc = 0.
valid if the user has personnel number don't proceed to look for the chief
clear V_OBJID2.
select single objid into V_OBJID2 from HRP1001
where otype = 'S' and
objid = V_OBJID and
plvar = '01' and
rsign = 'A' and
relat = '008' and
begda <= sy-datum and
endda >= sy-datum and
infty = '1001' and
sclas = 'P'.
if sy-subrc <> 0.
if the user exist in the correspondant date gets the chief position
clear V_POS_SOBID_CH.
select single sobid into V_POS_SOBID_CH from HRP1001
where otype = 'S' and
objid = V_OBJID and
plvar = '01' and
rsign = 'A' and
relat = '002' and
begda <= sy-datum and
endda >= sy-datum and
infty = '1001' and
sclas = 'S'.
if sy-subrc = 0.
if the relationship with a chief position exist gets the chief user id
clear V_US_SOBID_CH.
select single sobid into V_US_SOBID_CH from HRP1001
where otype = 'S' and
objid = V_POS_SOBID_CH and
plvar = '01' and
rsign = 'A' and
relat = '008' and
begda <= sy-datum and
endda >= sy-datum and
infty = '1001' and
sclas = 'US'.
IF sy-subrc = 0.
clear pt_actor.
refresh pt_actor.
pt_actor-otype = 'US'.
pt_actor-objid = V_US_SOBID_CH.
append pt_actor.
endif.
endif.
endif.
endif.
***************End of Z GET MANAGER.***************************** -
Agent Not Found for rule 168 in Travel Management WF WS20000040
Hi,
I got a strange error occurring that I can not quite figure out. I am using a copy of a standard delivered SAP Work flow for Trip Approval (WS20000040) that is identical to the SAP delivered workflow except without the expense department tasks (we only need manager approval). I also updated the agent assignment for tasks TS20000131, TS20000139, and TS20000189 to be General Tasks. When an employee creates a trip, the workflow is started properly and goes to the first workflow step which is user decision step 416. It uses rule 168 to determine the manager of the workflow initiator. This works properly. The manager goes to their inbox and executes this workflow step. The trip changed and trip approved buttons work fine, but if the manager chooses the reject button, the form is closed and the workflow stops with an error. The next step down the reject path is an activity step 476 - enter and send message. This runs task TS20000139. The agent assignment also uses rule 168 to determine the manager of the workflow initiator. The same agent should be choosen for both this step and the previous step since the workflow initiator is the same for both and the same rule is being used. The advance with dialog check box is checked in both steps. Both step refer to tasks that are both marked as synchronus object methods and object method with dialog.
For testing purposes, I changed the agent determination in both workflow steps to be the workflow initiator and ran it. The workflow stopped at the approve trip facts step as expected and when I choose reject trip, I was taken immediately to the create mail task that task TS20000139 runs as it should. I tried creating a trip as the employee and the manager and it work properly in both occasions regardless of which user the trip was created under when just workflow initiator is used for agent determination.
I ran SWI2_DIAG to look at the errors that occurred when it stopped in error when I used rule 168. According to the error message, the approve trip fact step completed successfully, but the enter and send message step failed with no agent found. Following is the error message:
Workflow WS90000048 no. 000000277688 activity 0000000476 role 'AC00000168': No agent found
What I don't understand is that the agent determination for the approve trip facts step which works perfectly uses the same agent determination as the enter and send message step which is terminating with an error. Also when I change both steps to use workflow initiator as the agent, then they both work perfectly.
Help, Please
Gregg
Edited by: Gregg Hinkle on Feb 12, 2008 4:48 PMThanks Martin,
I used your suggestion and passed the actual agent from the prior task to the container and then used this value as an expression to determine the agent for the step that was causing me pain. Now the workflow step is continuing properly and automatically bringing up the create message step as expected.
Arghadip,
I tried your idea about creating a copy of the standard delivered workflow and even set it as a general task and I got the same result as with the standard SAP (error with no agent found).
Thanks again for everyone's assistance -
Org Unit with more than one Chief Position
Hi,
we have implemented MSS via the portal using a one-to-one relationship between Org Units and Chief Positions, and we would now like to have multiple Chief positions attached to one Org Unit.
As far as I can tell from the SAP documentation, this should be straightforward, but the results we are getting do not seem correct.
I have an Org Unit that has position 1 and position 2 assigned to it with relationship A/B 012 denoting that they are Chief Positions.
User 1 is holder of position 1 and user 2 is holder of position 2.
Both users have the same security roles.
The views used on the portal are configured using the MSS Object and Data Provider functionality, using the standard ORGEH view, evaluation path for root objects SAP_MANG and evaluation path objects SBES. The checkbox 'Excl. Managers' is ticked.
The problem is this - both users can see all the subordinate employees in the Org Unit when they log on to MSS but user 1 can also see user 2 in his list of employees, which is not correct as user 1 and user 2 are both chiefs. User 2 cannot see user 1 in his list of employees, which we would expect.
The only logic we can see for user 1 being able to see user 2's details is that user 1 must be somehow defined as the 'superior' Chief Position, but we have not defined this as far as we know.
Any ideas as to why this is happening for us?
Many thanks,
Fran.Hi Fran,
Sounds like you have set up the reporting structures and MSS properly. I do question why two chiefs for one org unit. As you stated, both can see all employees and so both can approve time, give pay increases, etc. without the approval of the other. If this is want you want, then you have set it up properly. Usually, one has to approve the actions of the other, thus, is in a superior relationship. This can be handled by having a higher level new org unit with the higher person as chief and the lower stay as head of the lower org unit which reports to it.
As you have it now, both individuals have the same rights and access. They should both be excluded from iViews if you checked the "Excl. Managers" box. Since, you just recently made one a manager, have you checked for any date dependencies? If the Chief #1 is selecting a view for "Current Year", for example, he would be able to see all persons who reported to him for this year, which includes Chief #2. There are no 'superior chief' designations (except by structure), so without being able to view your configuration, my suggestion is to check all dates for the assignments and relationships vs. dates of the view. -
Delegation using A999 Relationship from Chief Position to Person ID
Hi
We have occasions in which we have managers in chief positions that need to delegate duties to others in their organisation. This is enabled via the set-up of an A999 delegate relationship that goes from the Chief Position to the person that they wish to delegate responsibility to.
Is there a report or transaction that can be used to understand what A999 delegation rules are in place to determine who the delegates are possibly. Example I set-up A999 relationship on a chief position # and indicate (P) Person related object, specifying the person id to undertake delegation. If someone asks me to tell them which position # a particular person is delegate for I have know way of knowing, unless I can find this via a report some way.
Is it possible?
Thanks
NicolaHi,
Yes.. check it out the document in the Evaluation Path transaction OOAW. Select the info button of A999. You will get the doc about that relationship. If that is customized one, you need to maintain the relationship doc.
Good luck.
Om
Reward it, if feels helpful. -
How to use rule and send the same email to multiple recipents
Hi,
My requirement is to send the workitem to the multiple recipents. one of my reiend suggest me to use the rule but i don't know how to use that .
can any one of you suggest me how to use rule in workflow.
Also i want to send the same email to multiple recipent .how can i do it by using the multiline variable...please advice me with example if possible..
Note :- Is it necessary to saparate the email id with comma or i will add all the email next one another..
Please suggest.
Thanks in advance ,
AnandHi Anand,
I would suggest you first follow the guidelines of the forum and a little searching. One of your questions has been asked just a few threads below.
Regards,
Martin -
How to use rules and roles in workflow?
Hi experts,
I am a beginner in workflow. Could any one tell me how to use rules and roles in workflow ?
Can u pls tell me the steps to follow?
and more over what are all the <b>important things</b> we have to learn in workflow module ??
I shall be thankful to u.
Thanks
umaHi
Workflow automates the steps and activities in a business process according to predefined procedures and rules.
Workflow presents information and documents to the appropriate knowledge worker or agent (another entity such as a program) to make a decision or perform an activity.
Workflow tracks each and every step in the process flow and maintains an ongoing status.
Workflow also collects and reports all of the metrics associated with the execution and completion of the process.
Check the below links u will get lot of info..
http://www.sap-press.com/product.cfm?account=&product=H950
Workflow
http://www.sap-img.com/workflow/sap-workflow.htm
http://help.sap.com/saphelp_47x200/helpdata/en/a5/172437130e0d09e10000009b38f839/frameset.htm
For examples on WorkFlow...check the below link..
http://help.sap.com/saphelp_47x200/helpdata/en/3d/6a9b3c874da309e10000000a114027/frameset.htm
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PSWFL/PSWFL.pdf
http://help.sap.com/saphelp_47x200/helpdata/en/4a/dac507002f11d295340000e82dec10/frameset.htm
http://www.workflowing.com/id18.htm
http://www.e-workflow.org/
http://web.mit.edu/sapr3/dev/newdevstand.html
Go through the following links on FORK :
http://help.sap.com/saphelp_nw04/helpdata/en/24/e2283f2bbad036e10000000a114084/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/8d/25f1e7454311d189430000e829fbbd/frameset.htm
http://help.sap.com/saphelp_46c/helpdata/en/c5/e4a930453d11d189430000e829fbbd/content.htm
http://www.insightcp.com/res_23.htm
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCBMTWFMSTART/BCBMTWFMSTART.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCBMTWFMDEMO/BCBMTWFMDEMO.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCBMTWFMPM/BCBMTWFMPM.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PSWFL/PSWFL.pdf
For more reference on workflow: http://****************/Tutorials/Workflow/Workflow.htm
http://help.sap.com/saphelp_erp2005vp/helpdata/en/04/9277a346f311d189470000e829fbbd/frameset.htm
Check these links.
http://www.sapgenie.com/workflow/index.htm
/people/ginger.gatling/blog/2005/12/01/link-workflow-business-objects-to-your-collaboration-tasks
http://help.sap.com/saphelp_nw04/helpdata/en/92/bc26a6ec2b11d2b4b5006094b9ea0d/content.htm
http://help.sap.com/saphelp_bw33/helpdata/en/92/bc26a6ec2b11d2b4b5006094b9ea0d/content.htm
http://help.sap.com/saphelp_bw31/helpdata/en/8d/25f94b454311d189430000e829fbbd/content.htm
http://www.sap-press.com/product.cfm?account=&product=H950
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PSWFL/PSWFL.pdf
http://www.workflowing.com/id18.htm
http://www.e-workflow.org/
Workflow
http://www.sap-img.com/workflow/sap-workflow.htm
http://help.sap.com/saphelp_47x200/helpdata/en/a5/172437130e0d09e10000009b38f839/frameset.htm
For examples on WorkFlow...check the below link..
http://help.sap.com/saphelp_47x200/helpdata/en/3d/6a9b3c874da309e10000000a114027/frameset.htm
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PSWFL/PSWFL.pdf
http://help.sap.com/saphelp_47x200/helpdata/en/4a/dac507002f11d295340000e82dec10/frameset.htm
http://www.workflowing.com/id18.htm
http://www.e-workflow.org/
http://web.mit.edu/sapr3/dev/newdevstand.html
http://www.sap-img.com/workflow/sap-workflow.htm
http://help.sap.com/saphelp_47x200/helpdata/en/a5/172437130e0d09e10000009b38f839/frameset.htm
For examples on WorkFlow...check the below link..
http://help.sap.com/saphelp_47x200/helpdata/en/3d/6a9b3c874da309e10000000a114027/frameset.htm
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PSWFL/PSWFL.pdf
http://help.sap.com/saphelp_47x200/helpdata/en/4a/dac507002f11d295340000e82dec10/frameset.htm
http://www.workflowing.com/id18.htm
http://www.e-workflow.org/
http://web.mit.edu/sapr3/dev/newdevstand.html
Workflow tutorials with step-by-step and with screenshots are available at http://www.****************/Tutorials/Workflow/Workflow.htm
http://help.sap.com/saphelp_erp2005vp/helpdata/en/42/c14a9b55103116e10000000a1553f7/frameset.htm
http://help.sap.com/saphelp_erp2005vp/helpdata/en/c5/e4a930453d11d189430000e829fbbd/frameset.htm
http://www.sapgenie.com/workflow/
http://www.sap-img.com/workflow/sap-workflow.htm
http://help.sap.com/saphelp_47x200/helpdata/en/3d/6a9b3c874da309e10000000a114027/frameset.htm
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PSWFL/PSWFL.pdf
http://help.sap.com/saphelp_47x200/helpdata/en/4a/dac507002f11d295340000e82dec10/frameset.htm
http://www.sap-basis-abap.com/wf/sap-business-workflow.htm
https://forums.sdn.sap.com/click.jspa?searchID=791580&messageID=2857887
https://forums.sdn.sap.com/click.jspa?searchID=791580&messageID=2855919
https://forums.sdn.sap.com/click.jspa?searchID=791580&messageID=2735228
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCBMTWFMSTART/BCBMTWFMSTART.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCBMTWFMDEMO/BCBMTWFMDEMO.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCBMTWFMPM/BCBMTWFMPM.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PSWFL/PSWFL.pdf
Debug a workflow.
This has a step by step procedure :
http://fuller.mit.edu/workflow/debugging.pdf
www.erpgenie.com/sap/workflow/debugging.htm
http://www.erpgenie.com/workflow/debugging.htm?2b5de440
Workflow tutorials with step-by-step and with screenshots are available at
http://www.****************/Tutorials/Workflow/Workflow.htm
http://www.sapgenie.com/workflow/
http://www.sap-img.com/workflow/sap-workflow.htm
http://help.sap.com/saphelp_47x200/helpdata/en/3d/6a9b3c874da309e10000000a114027/frameset.htm
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PSWFL/PSWFL.pdf
http://help.sap.com/saphelp_47x200/helpdata/en/4a/dac507002f11d295340000e82dec10/frameset.htm
http://www.workflowing.com/id18.htm
http://www.e-workflow.org/
http://web.mit.edu/sapr3/dev/newdevstand.html
http://www.sap-basis-abap.com/wf/sap-business-workflow.htm
https://forums.sdn.sap.com/click.jspa?searchID=791580&messageID=2857887
https://forums.sdn.sap.com/click.jspa?searchID=791580&messageID=2855919
https://forums.sdn.sap.com/click.jspa?searchID=791580&messageID=2735228
http://www.sapbrain.com/TUTORIALS/TECHNICAL/WORKFLOW_tutorial.html
Regarding Work Flow
work flow scenarios.
1. applying for a leave.
2. approval process.
3. material creation process.
4. mainly work flow is for notification purpose.
chk this links
http://help.sap.com/saphelp_erp2005/helpdata/en/fb/135962457311d189440000e829fbbd/frameset.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/c5/e4a930453d11d189430000e829fbbd/frameset.htm
Workflow
http://www.sap-img.com/workflow/sap-workflow.htm
http://help.sap.com/saphelp_47x200/helpdata/en/a5/172437130e0d09e10000009b38f839/frameset.htm
For examples on WorkFlow...check the below link..
http://help.sap.com/saphelp_47x200/helpdata/en/3d/6a9b3c874da309e10000000a114027/frameset.htm
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PSWFL/PSWFL.pdf
http://help.sap.com/saphelp_47x200/helpdata/en/4a/dac507002f11d295340000e82dec10/frameset.htm
http://www.workflowing.com/id18.htm
http://www.e-workflow.org/
http://web.mit.edu/sapr3/dev/newdevstand.html
http://www.erpgenie.com/workflow/index.htm
http://www.sap-basis-abap.com/wf/sap-business-workflow.htm
http://www.insightcp.com/res_23.htm
A good tutorial
http://www.thespot4sap.com/articles/Invoice_Verification_Automation_Using_SAP_Workflow.asp
http://www.sap-basis-abap.com/wf/sap-business-workflow.htm
/people/alan.rickayzen/blog
/people/jocelyn.dart/blog/2006/06/19/why-use-abap-oo-with-workflow
a good book
http://www.sap-press.com/product.cfm?account=&product=H950
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PSWFL/PSWFL.pdf
http://help.sap.com/saphelp_47x200/helpdata/en/4a/dac507002f11d295340000e82dec10/frameset.htm
http://www.sap-press.com/downloads/h950_preview.pdf
Check the following PDF
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCBMTWFMSTART/BCBMTWFMSTART.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCBMTWFMDEMO/BCBMTWFMDEMO.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCBMTWFMPM/BCBMTWFMPM.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PSWFL/PSWFL.pdf
also seach the workflow forum: SAP Business Workflow
Regards
Anji -
What is "Remediate non Compliant Rule when supported" and how to use it ?
Hi,
now i have created around 10 baselines for the driver compliance check for different make and model of laptops and desktops, the os platform on the computer will be Win 7 X 64 computers
CI's working fine and iam curious to learn what is the ( Remediate non Compliant Rule when supported ) option actually ment for , what all we can use it for ?
and i need a example with complete steps too please
all i can understand from the word Remediate is that it will either run a query or initiate a process such as install the correct version of driver etc , please correct me if iam wrong
Thank you
OSLM ENGINEER - SCCM 2007 & 2012When creating a CI you can also configure a remediation script, that script will be used to remediate a non-compliant system. Also, some simple things like change the value of an existing registry key from 0 to 1 are supported out-of-the-box for compliance
and remediation.
An example:
http://www.petervanderwoude.nl/post/allow-direct-installation-of-windows-8-apps-via-compliance-settings-in-configmgr-2012/
Another example:
http://www.petervanderwoude.nl/post/go-to-desktop-on-sign-in-on-windows-8-1-via-compliance-settings-in-configmgr-2012/
My Blog: http://www.petervanderwoude.nl/
Follow me on twitter: pvanderwoude -
Delete blob column in source and rename schema using rule
Hi
I have blob column in source table, which i am deleting while capturing through rule based tranformation and also renaming the schema through the same rule.
SET SERVEROUTPUT ON
DECLARE
v_dml_rule VARCHAR2(80);
v_ddl_rule VARCHAR2(80);
BEGIN
DBMS_STREAMS_ADM.ADD_TABLE_RULES(
table_name => 'ENGINE.ACTIVATIONS',
streams_type => 'CAPTURE',
streams_name => 'CAPTURE_TO_&destsid',
queue_name => '&source_strmadmin_user..&sourcesid._TO_&destsid',
include_dml => true,
include_ddl => false,
include_tagged_lcr => false,
source_database => 'MMSTG.DEMOWORLD.COM',
dml_rule_name => v_dml_rule,
ddl_rule_name => v_ddl_rule,
and_condition => ':lcr.get_command_type() != ''DELETE''',
inclusion_rule => true);
DBMS_STREAMS_ADM.DELETE_COLUMN(
rule_name => v_dml_rule,
table_name => 'ENGINE.ACTIVATIOINS',
column_name => 'INSTANCE_DATA',
value_type => '*',
step_number => 0,
operation => 'ADD');
DBMS_STREAMS_ADM.RENAME_SCHEMA(
rule_name => v_dml_rule,
from_schema_name => 'ENGINE',
to_schema_name => 'ENGINE_WEST',
step_number => 0,
operation => 'ADD');
DBMS_OUTPUT.PUT_LINE('Capture DML Rule for ENGINE.ACTIVATIOINS => ' || v_dml_rule);
END;
I use step_number 0 for both rename schema and delete column. Some how, delete column transformation is not firing and it replicates the blob column with some bytes instead of zero bytes.
How do we execute this both rule based transformation with correct step_number to fire both transformations. Please do let me know..
Thanks
BalaIn what version?
Step 0 is the default so that is not the issue.
Can you also post the DDL for your table and the results of the following query:
SELECT *
FROM dba_streams_unsupported
WHERE owner = <schema owner>
AND table_name = <your table name>; -
How to use Hashtable in Rules Engine. And objects within objects in rules
This is something to do with the JBoss Rules Engine.
I have an object called 'Employee' containing variables name(string), age(int), sex(string), an object Skill and other fields not relevant.
Now the Skill object contains name and desc as variables.
And now i have another seperate object called Test containing two hashtable: inputHT and outputHT.
i have appropriate data in each of the objects and the hashtable:
Employee e = new Employee();
e.setName("Name");
e.setAge(18);
e.setSex("f");
e.getSkill().setSkill("Trainer");
Hashtable ht = new Hashtable();
ht.put("age", new Integer(e.getAge());
ht.put("sex", e.getSex());
Test t = new Test();
t.setInputHT(ht);
Since this is something to do with drools rules: I have the appropriate code even for that.
Like obtaining the rules defined(.drl files) in a stream, constructing the package builder, rulebase and the working memory.
I will now explain u my .drl files(ie the rules that i have defined) and the error that i am encountering
when I have the rule as the following there is no error:
rule "testRule1"
when
e:Employee(age >= 18, sex == "f")
then
System.out.println("The lady can marry");
end
In the above rule we can see that only two simple variables contained in the employee object is being accessed and there is no error encountered.
But when I try to access the object "skill" in the employee object, the rule throws me an error when i am constructing the packageBuilder:
rule "testRule2"
when
e:Employee(skill.name == "Trainer")
then
System.out.println("The skill is trainer");
end
The error thrown is : unexpected token 'skill' and many other dump errors and also error: expected token ')'
I tried changing the when clause as the following:
when
e:Employee(skill.getName() == "Trainer")
and also
when
e:Employee(skill.getName().equals("Trainer"))
All of them throws the same above error.
But at the same time if i access only object without its variables, it is working fine. Like:
rule "testRule2"
when
e:Employee(skill == "Trainer")
then
System.out.println("The skill is trainer");
end
The above rule works properly and does not throw any error. But it is not a valid rule. But syntactically it is correct. and does not throw any error during packageBuilder.
Similarly, the problem is with the Hashtable
The below code works fine, but rulewise it is not valid, but syntactically correct. and does not throw any error
rule "testHT1"
when
t:Test(inputHT == "f")
then
System.out.println("Print this");
end
But the following code throws error, telling unexpected token 'inputHT' :
rule "testHT1"
when
t:Test(inputHT.get("sex") == "f")
then
System.out.println("Lady");
end
I even changed the when clause, but did not get the appropriate result and it threw me error.
when
t:Test(((String)input.get("sex")) == "f")
and also many other variants but of no use.
It would be of great help if u or anyone else could reply to this with some solution
Thank you in advancehttp://forum.java.sun.com/thread.jspa?threadID=774018
-
Difference between use of decision table and if/then in business rules
Hello ,
Could some one please explain me difference between use of decision table and if/then in business rules in short.
- ShirishHi,
They are equivalent, pretty much what you can do with a decision table you can also do with if/then...
However, decision tables provide automated features that can reduce the number of required rules, as compared to the if/then rules (this is called rule coalescing).
Have a look on this document... Search for 5.1.1 What is a Decision Table?
http://docs.oracle.com/cd/E23943_01/user.1111/e10228/decision.htm#CJHFIAHG
Cheers,
Vlad -
Oracle Bussiness rules - Can we download and use rule engine independently
Hello ,
I have seen and used oracle business rules with SOA and BPM projects , but recently one of the client requested to see if we can download and use oracle rules engine independently .
Does anyone have any idea if it possible ? Have checked oracle downloads and it says OBR 11g is part of SOA or BPM suite .
Thanks in advance
RupeshThanks for the reply Arun .
So just to reconfirm if a client wants to use Oracle Business rules they would need to buy license either of SOA suite or BPM suite ?
Edited by: Rupesh Somani on Jul 15, 2011 1:15 AM -
OM evaluation path showing chief position and subordinates
Hi experts, is there any standard OM evaluation path showing the reporting structure in Org chart like this?
OU
I
Chief
_____I_____
I I
Position Position
if there is no standard evaluation path, do I need to create extra relationship like S A002 Chief to every position??
What else solution would you suggest??
Many thanks!!Your drawing (and last message) indicates a relationship between O and "Chief" and between "Chief" and S (Position). As others have mentioned, this is not SAP standard - and to me it doesn't make sense either. The chief position (A12 relationship) and the regular positions (A003 relationship) all belong to the same org.units don't they?
For your need you would actually have to create your own "Chief" object type, make your own relations and your own evaluation paths. I would strongly advise against this. What is the business need for this requirement?
In PPOME you can move the manager (chief) position so it is the first position in the in the Org.Unit. This will give a better visual of the org.sturcture. Also, check the priority field in the relationship, and check the documentation for this.
Hope this is of some help.
Maybe you are looking for
-
Bom dia Alguém sabe qual o status do desenvolvimento da automatização de MIGO e MIRO através do arquivo XML? A previsão dada era para início de dezembro, mas não consegui achar nenhuma nota liberada para isso. Obrigado
-
I can't remove Bing. I've tried Control Panel, the article "Removing the Search Helper Extension and Bing Bar," and I have had no luck for Windows 7 and Firefox. I wish I could share the two screen shots I took, but this question site doesn't have th
-
How do i confirm data is "backed up" on external Hard Drive?
I'm a PC user so i hope i'm doing this right....Christmas present for my wife's MacBook Pro, I purchased a Seagate 1Tb external hard drive. Pretty simple. Connected it, and Time Machine takes over and backs up automatically via the USB connection. E
-
How can I set the insert date to auto update in Pages 5.2.2
how can I set the insert date to auto update in Pages 5.2.2 I am attempting to have the date in header auto update in a Pages file. I can insert it, but where is the AUTO UPDATE selection OS10.9.4 thank you
-
Flickering line on top of MacBook screen
I have a thin white flickering line (about 2" long) at the top of my MacBook screen -- in the area just to the right of the iSight, along the top of the screen, to be precise. It's a white flicker, so only visible when I dim the screen or there's a d