How to get Top most parent Taskflow Id at runtime?
Hi,
I am working on a portal site and I need to get the parent Id of the current taskflow at runtime.
Following is the code through which I get the current taskflow Id.
ControllerContext cctx = ControllerContext.getInstance();
ViewPortContext currentViewPort = cctx.getCurrentViewPort();
TaskFlowContext taskFlowCtx = currentViewPort.getTaskFlowContext();
TaskFlowId taskFlowId = taskFlowCtx.getTaskFlowId();
String taskFlowName = taskFlowId.getFullyQualifiedName();
But How can I get the parent Id if this taskflow is embedded within some taskflow(s). I want to get the top most parent Id.
Your help is appreciated.
Thanks,
Jaykishan
Hi, i tried this code but i'am getting ClassCastException.
ControllerContext cctx = ControllerContext.getInstance();
ViewPortContext currentViewPort = cctx.getCurrentViewPort();
ChildViewPortContextImpl c = (ChildViewPortContextImpl)currentViewPort; (get error here oracle.adfinternal.controller.state.RootViewPortContextImpl cannot be cast to oracle.adfinternal.controller.state.ChildViewPortContextImpl)
Object pViewPort = c.getParentViewPort();
ViewPortContext parentViewPort = (ViewPortContext)pViewPort;
String parentTaskFlowId = parentViewPort.getTaskFlowContext().getTaskFlowId().toString();
how did you manage to make work ?
Similar Messages
-
How to get Top most Manager in Org. Structure
Hi Experts,
I have an Organization Structure like the following:
[0] MAIN ORG. UNIT
MANAGER9
[1] SUB ORG. UNIT1
Manager1
[1.1] Department1
Manager2
Manager3
Supervisor1
Supervisor2
[2] SUB ORG. UNIT2
Manager6
[2.1] Department2
Manager4
Manager5
Supervisor3
Supervisor4
1. I want to get the top most manager in the org. structure by looping the org. structure in workflow.
Here MANAGER9!!
2. How can i get Manager1 by using the same.
Waiting for your valuable Answer
Thanks
Regards
Nizamudeen SM
Edited by: Nizamudeen SM on Aug 26, 2008 4:08 PMThese are the paramters to pass ..
CALL FUNCTION 'RH_STRUC_GET'
EXPORTING
act_otype = c_o
act_objid = w_orgunitid
act_wegid = 'ORGCHART'
act_plvar = '01'
act_begda = sy-datum
act_endda = '99991231'
TABLES
result_tab = t_restab
result_objec = t_resobj
result_struc = t_reslt
EXCEPTIONS
no_plvar_found = 1
no_entry_found = 2
OTHERS = 3.
IF sy-subrc NE 0.
ENDIF.
It is not the orgunit id should be passed hear in your case it is manin orgunit ..so that it picksup the managers of child Orgunit as well. -
How to get top most rows col into a vriable.
hi,
i want to get the smallest
"Tid" greater than v_Id1
into v_b
which method i should use both are working.
1)
SELECT *
INTO v_b
FROM ( SELECT TId
FROM tt_T
WHERE TId > v_Id1
ORDER BY TId )
WHERE ROWNUM <= 1;
2)
SELECT *
INTO v_b
FROM (SELECT Tid
FROM ( SELECT TId
FROM tt_T
WHERE TId > v_Id1
ORDER BY TId )
WHERE ROWNUM <= 1);
yours sinicerely
Edited by: 944768 on Apr 28, 2013 9:35 AMHi,
944768 wrote:
i wanted to know about the correctness of my sql.
so please tel me which one is correct . or both are correct.You said both give the results you want, so both are correct.
The ways Solomon posted are also correct, and they are better, because they are faster and/or easier to maintain.
and specially about one extra bracket which i have in my 2) stmt.What do you see as the advantages and disadvantages of the 2 ways you posted?
If 2) is better than 1), wouldn't this be even better han 2)?
SELECT *
INTO v_b
FROM (
SELECT TId
FROM (
SELECT TId
FROM (
SELECT TId
FROM (
SELECT TId
FROM tt_T
WHERE TId > v_Id1
ORDER BY TId
WHERE ROWNUM <= 1
;Why stop at 4 sub-queries? -
How to get the most of PowerBook G3 233Mhz
its been a while since I dint post on Apple discussions, about one year ago, I was thinking I would get a PowerBook G3 Pismo, one year later evry thing was diffrent, I ordered a 233Mhz PowerBook G3 Wallstreet (It was the only choice with the money I had) and now I really want to know how to get the most out of it.
I want to do the following
-Browse the web
-Listen to music
-do keynote presentations
-word proccesing
-storage
The powerBook that I am going to get comes with a nice 233Mhz G3 chip, 64MB of RAM a 12 inch screen and running Mac OS 9.2.2 (my favorite).
I have alot of knowledge on old Macintosh, and I know almost anything if some asks me things about acient macintosh, but you know, some times you need a little help from other mac fans and share your thoughts...
So what apps should I get? I do know that if you use the commom low requirements apps, It will run smoothly.iBook,
Yes, you can add a USB 1.1 or 2.0 PC card to the PCMCIA/CardBus slot. A few suggestions:
-Combo FireWire/USB CardBus PC cards do not work well with OS 9.x; either the USB or FireWire port does not work. This is a software problem in 9.x since these combos work fine under 10.x. My suggestion would be to buy a separate USB PC card and/or FireWire PC card for your connectivity.
-USB 2.0 PC cards will only run at the slower USB 1.1 speeds under 9.x but this is fine for printers, etc. If you wanted to connect an HD, I would use the FireWire interface.
-FireWire and USB PC cards supply insufficient bus power to power a FireWire or USB HD; any device like a printer or HD will have or should have its own power supply.
-Since FireWire and USB are not native to the Wallstreet, the necessary USB and FireWire extensions have not been installed. Open your Extensions Mananger and see if you have these extensions:
USB Mass Storage Extension
USB Support
USB Mass Storage Support
USB Software Locator
USB Device Extension
If the above are not present, I recommend you download this USB extension package from OWC; they assembled various version numbers of the Apple USB extensions to correct a problem OS 9.2.2 has with USB PC cards but they can be used with any version of OS 8.6 > 9.2.2.
http://eshop.macsales.com/tech/ftp/usb/usbextensions.sit
A file titled 'usbextensions.sit' will appear on your desktop assuming you have set the browser to download files to your desktop. Double-click the file to decompress it and you will have a folder on the desktop with these extensions:
USB Support v1.4.1
USB Software Locator v1.5.6
USB Device Extension v1.5.6
USB Mass Storage Support v2.0.4
USB Mass Storage Extension v2.0.4
Highlight all five extensions, then drag them on top of the closed System Folder icon; they will be automatically installed in the Extensions folder. Before restarting, go to Apple menu > Control Panels > Energy Saver > Advanced Settings and uncheck 'Allow Processor Cycling' for •BOTH• the power adapter and battery. If not unchecked (disabled), the powerbook will freeze with a USB PC card.
Now restart to make the USB extensions active. Insert the USB PC card; you should see a USB PC card icon on the desktop. Connect a USB mouse (there is sufficient power for it) and test the USB PC card.
If no desktop USB PC card icon appears, make sure the PC card is fully inserted. You may have to place a hand on the side of the powerbook opposite the PC card slot so you can push hard. If the card fails to seat, the card slot may be in the locked position. Push an opened paperclip into the small hole next to the slot to unlock, then try the card again.
http://docs.info.apple.com/article.html?artnum=16167 -
How to get the most current file based on date and time stamp using SSIS?
Hello,
Let us assume that files get copied in a specific directory. We need to pick up a file and load data. Can you guys let me know how to get the most current file based on date and time stamp using SSIS?
Thanks
thx regards dinesh vvhi simon
i excuted this script it is giving error..
Microsoft SQL Server Integration Services Script Task
Write scripts using Microsoft Visual C# 2008.
The ScriptMain is the entry point class of the script.
using System;
using System.Data;
using Microsoft.SqlServer.Dts.Runtime;
using System.Windows.Forms;
namespace ST_9a6d985a04b249c2addd766b58fee890.csproj
[System.AddIn.AddIn("ScriptMain", Version = "1.0", Publisher = "", Description = "")]
public partial class ScriptMain : Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTARTScriptObjectModelBase
#region VSTA generated code
enum ScriptResults
Success = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Success,
Failure = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Failure
#endregion
The execution engine calls this method when the task executes.
To access the object model, use the Dts property. Connections, variables, events,
and logging features are available as members of the Dts property as shown in the following examples.
To reference a variable, call Dts.Variables["MyCaseSensitiveVariableName"].Value;
To post a log entry, call Dts.Log("This is my log text", 999, null);
To fire an event, call Dts.Events.FireInformation(99, "test", "hit the help message", "", 0, true);
To use the connections collection use something like the following:
ConnectionManager cm = Dts.Connections.Add("OLEDB");
cm.ConnectionString = "Data Source=localhost;Initial Catalog=AdventureWorks;Provider=SQLNCLI10;Integrated Security=SSPI;Auto Translate=False;";
Before returning from this method, set the value of Dts.TaskResult to indicate success or failure.
To open Help, press F1.
public void Main()
string file = Dts.Variables["User::FolderName"].Value.ToString();
string[] files = System.IO.Directory.GetFiles(Dts.Variables["User::FolderName"].Value.ToString());
System.IO.FileInfo finf;
DateTime currentDate = new DateTime();
string lastFile = string.Empty;
foreach (string f in files)
finf = new System.IO.FileInfo(f);
if (finf.CreationTime >= currentDate)
currentDate = finf.CreationTime;
lastFile = f;
Dts.Variables["User::LastFile"].Value = lastFile;
Dts.TaskResult = (int)ScriptResults.Success;
thx regards dinesh vv -
How to get top 10 actively used TFS projects?
We have 100+ projects inside a TFS collection, how to find the (say to 10 or 15) most actively used projects? Idealy the activities will include any actions like CI/CO, build, member addition, etc.
ThanksHi Peter,
Thanks for your post.
As far as I know there’s no a default way to get such top 10 actively team projects report. You should create your custom report using TFS API to achieve that, pleas refer to the discussions in this similar post:
https://social.msdn.microsoft.com/Forums/vstudio/en-US/984d1796-e195-4765-9f55-e2a45bc37c80/how-to-get-a-list-of-active-projects-from-tfs-?forum=tfsgeneral.
For this scenario, please submit it to User Voice site at: http://visualstudio.uservoice.com/forums/121579-visual-studio. Microsoft engineers will evaluate them
seriously.
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
How to get top 10 records for each option in table prompt?
Hi,
I have created one report in which my requirement is to get top 10 highest salaries for each departments. I have created one table prompt which contains the names of all departments. On the salary column I have applied one filter i.e. TOP 10. Currently I am having 3 departments. I want to show the top 10 salaries for each department, but I am getting top 3 from first, 4 from second and 3 from third.They are calculating top 10 salaries based on all departments, not on individual department. How can I get top 10 salaries for each department?Hi,
Use TopN function in your column formula.
Ex: TOPN("Sales ,5 BY department)
Thanks,
Satya -
How to get TOP 5 results in version 7.3.4?
Hello,
I have try to use subquery in a query to get the top 5 result in Oracle version 7.3.4, it seems like not working. Can you please tell me how to get the TOP 5 results with Oracle 7.3.4??
For example,
REJECT CATEGORY QUANTITY
AA 100
BB 5
CC 20
DD 73
EE 88
FF 76
GG 43
HH 99
So i want to get the result as AA, HH, EE, FF, DD.
Thanks.I don't have that version available to me and I forgot if rownum was already available. See if this works:
select * from (
select category, quantity, rownum rn
from reject
order by quantity desc)
where rn <= 5;
Note that this is not the same as the TOP posibilities in 9i, but you example seems to suggest this should be enough.
Also note that on big tables, this query is performing porely because Oracle first needs to sort all records.
L. -
How to get top 10 employees in BEx Report
Hi all,
I am trying to get top 10 employees who have worked over 50 hrs of overtime in any pay period i choose in query.
How do i get it ??
right now my report gives me total of over 50hrs overtime in all chosen pay period employees list.
Any suggestions ??
Thank You,
KSmithCAN SOMEONE PLEASE HELP ME SOLVE THIS PROBLEM ??
Hi all,
The problem I have is even though i tried condition for top 10 employees who worked more than 50 hrs.
My report right now shows all employees overtime under "OT" key figure for each pay period. --> I just want to show employees and overtime which is > 50 for each different pay period
The condition works only if i display just one pay period...and user dont want it that way. they want to get more than one pay period displayed on the report and should have list of employees who work more than 50 hrs over time. HOW DO I GET THAT ??
Also there is another key figure count meaning if out of those chosen pay periods there are 3 periods when an employee worked more than 50 hrs of over time then it should show "3". if there 2 pay periods when employee work more than 50 hrs count should display 2 ---> right now i am not able to get that also.
Please can some one suggest something ??
Thank You,
KSmith
Edited by: Keral Smith on Jul 25, 2008 2:49 PM
Edited by: Keral Smith on Jul 25, 2008 3:08 PM -
How to go back to parents taskflow without using taskflow return activity
Hi all,
How can i go back to parents taskflow without using taskflow return activity?
With Regards,
Wai PhyoHi,
when you enter a sub flow, the parent flow is put on a stack for later resume. You ecit a bounded task flow that you called using task flow call activity by exiting the task flow (return activity). There is no other option to return to the parent flow. If the bounded task flow executes as a region, then you use a parent activity to navigate the enclosing flow, or the root flow. However, regions seldom use return activities anyway.
Hope this answers your question
Frank -
How to Extract top most position in any given Org Unit
Hi Experts,
I have a requirement to extract the highest position(or root position) in any given OrgUnit. See the below example for more info.
Eg: org1
-- position1
Org2
-- position2
Org3
--Org3A
-- position3
--Org3B
-- position4
As shown in the above structure, I need to extract the top most position in each Orgunit structure like postion1, position2, position3 and position4. Note that Org3 does not have a immediate position or chief position so we are reading position3 and 4 instead for org3.
Thanks in Advance,
VijayThe best way is to search until there is no more, in order to create the hierarchy.
To get all the B002 relationships for a respective Org. use parameter ACT_TDEPTH = 99 (i guess it won't go that deep) for the top Org.
The output table RESULT_STRUC will have a hierarchy structure, with all organizational units below the top one. Use the fields LEVEL and PDOWN (or PUP) to construct the hierarchy. Then for each ORG. just search for the manager position (B012).
Just a small look-in to what the fields in that table mean :
LEVEL - Level of the Org.
SEQNR - Index of ORG.
PDOWN - SEQNR of ORG below.
VCOUNT - Number of "brothers" (Orgs at the same level)
PNEXT - Brother to the RIGHT
PUP - Father
PPREV - Brother to the Left
Here is a sample program i made to insert this into a table that will later be used for creating an ALVTREE as an F4 for a field.
REPORT YHR00101UPDPG.
* TABELAS
TABLES: HRP1000, HRP1001.
* VARIAVEIS AUXILIARES
DATA: T_STRUC TYPE TABLE OF STRUC,
WA_STRUC TYPE STRUC,
WA_YTHR00035 TYPE YTHR00035.
DATA: W_PLVAR type OBJEC-PLVAR.
DATA: W_OBJID TYPE HRP1000-OBJID.
* ECRAN DE SELECCAO
SELECTION-SCREEN : BEGIN OF BLOCK bloco1 WITH FRAME TITLE text-001.
PARAMETERS : P_objid type hrp1000-objid MATCHCODE OBJECT PLOMA,
P_begda type hrp1000-begda DEFAULT sy-datum.
SELECTION-SCREEN END OF BLOCK bloco1.
START-OF-SELECTION.
* Get plan variant
call function 'RH_GET_ACTIVE_WF_PLVAR'
importing
act_plvar = w_plvar
exceptions
others = 1.
CALL FUNCTION 'RH_STRUC_GET'
EXPORTING
ACT_OTYPE = 'O'
ACT_OBJID = p_objid
ACT_WEGID = 'B002'
ACT_PLVAR = w_plvar
ACT_BEGDA = p_begda
ACT_ENDDA = p_begda
ACT_TDEPTH = 99
ACT_TFLAG = 'X'
ACT_VFLAG = 'X'
AUTHORITY_CHECK = 'X'
TABLES
RESULT_STRUC = T_STRUC
EXCEPTIONS
NO_PLVAR_FOUND = 1
NO_ENTRY_FOUND = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
if not t_struc[] is initial.
delete from YTHR00035.
endif.
* Agora temos a estrutura vamos criar a tabela YTHR00035
LOOP AT T_STRUC INTO WA_STRUC.
clear WA_YTHR00035.
WA_YTHR00035-NIVEL = WA_STRUC-LEVEL.
WA_YTHR00035-SEQNR = WA_STRUC-SEQNR.
WA_YTHR00035-ORGID = WA_STRUC-OBJID+0(8).
WA_YTHR00035-FILHO = WA_STRUC-PDOWN.
WA_YTHR00035-NR_IRMAOS = WA_STRUC-VCOUNT.
WA_YTHR00035-IRMAO_DIREITA = WA_STRUC-PNEXT.
WA_YTHR00035-PAI = WA_STRUC-PUP.
WA_YTHR00035-IRMAO_ESQUERDA = WA_STRUC-PPREV.
* Primeiro vamos buscar a descrição da Unidade Organizacional
select single MC_STEXT into WA_YTHR00035-NMORG from HRP1000 where
PLVAR = w_plvar and
OTYPE = 'O' and
OBJID = WA_YTHR00035-ORGID and
BEGDA <= p_begda and
endda >= p_begda.
clear hrp1001.
* Aqui verificamos se a Un. Organizacional tem uma posição de chefia associada
select single * from HRP1001 where
plvar = w_plvar and
OTYPE = 'O' and
ISTAT = '1' and
OBJID = WA_YTHR00035-ORGID and
RSIGN = 'B' and
RELAT = '012' and
BEGDA <= p_begda and
endda >= p_begda.
if sy-subrc = 0.
* Encontramos uma ligação com uma posição de chefia
WA_YTHR00035-POSID = HRP1001-SOBID+0(8).
* Primeiro vamos buscar a descrição da Unidade Organizacional
select single MC_STEXT into WA_YTHR00035-NMPOS from HRP1000 where
PLVAR = w_plvar and
OTYPE = 'S' and
OBJID = WA_YTHR00035-POSID and
BEGDA <= p_begda and
endda >= p_begda.
endif.
INSERT YTHR00035 FROM WA_YTHR00035.
ENDLOOP.
commit work.
END-OF-SELECTION.
Hope this helps.
Edited by: Pedro Guarita on Dec 16, 2010 2:30 PM -
How to get 'Top Sites' back?
I downloaded an Installer, but then deleted it, however what i didn't notice was that it had made itself my Safari Homepage, rather than 'Top Sites', how do i get 'Top Sites' back?
Open Safari and click Preferences on the menu named Safari. On the General tab set "New Windows Open with" and "New Tabs Open with" to Top Sites. It doesn't matter what the Homepage is set to if the above are set to Top Sites.
If New Windows Open With isn't a choice, go to Apple Menu > System Preferences > General and put a checkmark in front of "Close Windows when Quitting an app." -
How to get top downloaded or accessed content from ucm in webcenter
Hi,
How to get the top ucm accessed contents or downloads from ucm using ridc?
Is it possible to retrieve content tracker details using ridc?
Thanks,
Chandrasekar MLike anything else Content Tracker functionality is provided in a form of services, but it might require a bit search to find which services are to be called and how.
However, Content Tracker stores data in the database tables - (also to be available for External Report Generator), so why not to take data directly from the database? Alternatively, you could configure the system to send reports for you and take it from there.
What exactly is your use case? -
How to get top left stage corner coordinates after resize?
hi,
is there maybe a way to get top left stage corner coordinates
after resize?
or maybe get original stage size before resize? so i can
calculate it.
i know that you can collect the width and height before it is
resized but is it possible after?
--- sorry for the double post ---i donno exactly but try like this ,
data: i_logo type bds_typeid.
data: lr_logo type ref to cl_salv_form_layout_logo,
lr_content type ref to cl_salv_form_element.
i_logo = 'MY_SAP_LOGO'.
IF i_logo is not initial.
create object lr_logo.
lr_logo->set_left_content( i_logo ).
lr_content = lr_logo.
endif.
cl_salv_form_content=>set( lr_content ). -
How to get top three count(trap_text)
Hi,
Wrote file afiedt.buf
1 select gasid,count(trap_text) from kr_reported_alerts alerts
2 where exists (select * from kr_reported_alerts where gasid=alerts.gasid)
3* group by gasid
SQL> /
GASID COUNT(TRAP_TEXT)
HUNTER_TEST00001 2
HUNTER_TEST00003 83
HUNTER_TEST00011 4
HUNTER_TEST00024 12918
here i want to get top three count(trap_text) one 12918 and another is 83 and another is 4
Message was edited by:
user517983
Message was edited by:
user517983Note that the subquery within subquery is completely redundant; for every row in the outer query there is bound to be at least one row (the same row) in the correlated subquery. There could be more, of course (depending on the structure of kr_reported_alerts).
SELECT *
FROM (select gasid,count(trap_text) from kr_reported_alerts alerts
/* NOT NEEDED -- where exists (select * from kr_reported_alerts where gasid=alerts.gasid) */
group by gasid)
WHERE rownum < 4;
The results from this may be different from either RANK or DENSE_RANK. Consider this data set; rows
Gasid Count Rank Dense-Rank Rownum
G1 100 1 1 1
G2 90 2 2 2
G3 90 2 2 3
G4 90 2 2 4
G5 80 5 3 5
G6 80 5 3 6You can see that each will give a different result:
Rank: G1 through G4
Dense Rank: G1 through G5
Rownum: G1 through G3 (in fact the ROWNUM solution could give you any one of G3, G4 or G5 at random)
Regards Nigel
Maybe you are looking for
-
Is apple going to address the lack of alpha channel support in Keynote 6
Any updates of when Apple will address the lack of Alpha channel support for Keynote 6?
-
Faad2 w/xmms plugin won't compile
I've been attempting to get faad2 to compile a plugin for xmms according to http://davesource.com/Solutions/2004041 … ebian.html. To do so, I thought all that I really had to do was modify the ./configure line of the PKGBUILD as such ./configure --p
-
PO conversion during cutover (retaining legacy no.)
Hello ! We are planning on manually entering all open POs into SAP at the time of cutover. One idea that has been floated is to create a special number range that matches the legacy PO numbers... and ensure that the legacy PO number is retained in SA
-
will I have to reinstall all my plugins that I have in Photoshop CC into Photoshop CC 2014 since they did not migrate?
-
I just recently purchased the lastest version of Mountain Lion. I am currently running Snow Leopard 10.6.8 which is the lastest version, and should be compatiable to download Mountain Lion. My computer meets all the requirements in order for the oper