How to get Process Task Retry Count using API (OIM 10g)
Hi ,
I want to get all the process task which are failed after retried 5 times.
For e.g Create user task in AD retried for 5 times but still it is in failed state. I want to get all such process task.
I am stuck at point how to get process task retry count from process definition?
Thanks
You can reference the code in the "Task Timed Retry" scheduled task to get what you are looking for. Here is the decompiled code:
>
package com.thortech.xl.schedule.tasks;
import Thor.API.Operations.tcScheduleTaskOperationsIntf;
import com.thortech.util.logging.Logger;
import com.thortech.xl.dataaccess.tcDataSetException;
import com.thortech.xl.dataobj.tcDataSet;
import com.thortech.xl.scheduler.tasks.SchedulerBaseTask;
import com.thortech.xl.util.logging.LoggerMessages;
import java.sql.Date;
import java.util.Hashtable;
public class tcTskTimedRetry extends SchedulerBaseTask
private static Logger logger = Logger.getLogger("Xellerate.Scheduler.Task");
Date isCurrentDate;
public void init()
logger.debug(LoggerMessages.getMessage("EnteredMethodDebug", "tcTskTimedRetry/init"));
this.isCurrentDate = new Date(System.currentTimeMillis());
logger.debug(LoggerMessages.getMessage("LeftMethodDebug", "tcTskTimedRetry/init"));
public void execute()
logger.debug(LoggerMessages.getMessage("EnteredMethodDebug", "tcTskTimedRetry/execute"));
tcDataSet localtcDataSet1 = new tcDataSet();
tcDataSet localtcDataSet2 = new tcDataSet();
tcDataSet localtcDataSet3 = new tcDataSet();
try
if (isStopped())
return;
localtcDataSet2.setQuery(getDataBase(), "select osi_retry_on from osi where 1=2");
localtcDataSet2.executeQuery();
if (isStopped())
return;
localtcDataSet2.setDate("osi_retry_on", this.isCurrentDate);
localtcDataSet1.setQuery(getDataBase(), "select osi.sch_key, osi.mil_key, osi.orc_key, osi.osi_rowver, sch.sch_rowver, osi.osi_retry_for, osi.osi_retry_on, osi.osi_retry_counter, sch.sch_note from osi osi,sch sch where osi.osi_retry_on <=" + localtcDataSet2.getSqlText("osi_retry_on") + " and osi.sch_key = sch.sch_key" + " and sch.sch_status='R'" + " and osi_retry_counter>0 order by osi.sch_key");
localtcDataSet1.executeQuery();
if (isStopped())
return;
int i = localtcDataSet1.getRowCount();
logger.debug("tcTskTimedRetry:execute:Number of Process tasks retrieved is=" + i);
tcScheduleTaskOperationsIntf localtcScheduleTaskOperationsIntf = (tcScheduleTaskOperationsIntf)getUtility("Thor.API.Operations.tcScheduleTaskOperationsIntf");
tcDataSet localtcDataSet4 = new tcDataSet();
localtcDataSet4.setQuery(getDataBase(), "select osi_retry_for, osi_retry_counter from osi where 1=2");
localtcDataSet4.executeQuery();
Hashtable localHashtable = new Hashtable();
if (isStopped())
return;
for (int j = 0; j < i; j++)
if (isStopped())
return;
localtcDataSet1.goToRow(j);
localtcDataSet3.setQuery(getDataBase(), "select count(*) as counter from osi osi,sch sch where osi.sch_key = sch.sch_key and osi_retry_for=" + localtcDataSet1.getLong("sch_key"));
localtcDataSet3.executeQuery();
if (isStopped())
return;
if (localtcDataSet3.getInt("counter") > 0)
continue;
localHashtable.put("osi_retry_for", String.valueOf(localtcDataSet1.getLong("sch_key")));
localHashtable.put("sch_note", localtcDataSet1.getString("sch_note"));
long l = localtcDataSet1.getLong("osi_retry_counter");
if (isStopped())
return;
try
localtcScheduleTaskOperationsIntf.createScheduleItem(localtcDataSet1.getString("orc_key"), localtcDataSet1.getString("mil_key"), localHashtable, l - 1L);
catch (Exception localException2)
logger.error(LoggerMessages.getMessage("ErrorMethodDebug", "tcTskTimedRetry/execute", localException2.getMessage()), localException2);
catch (tcDataSetException localtcDataSetException)
logger.error(LoggerMessages.getMessage("ErrorMethodDebug", "tcTskTimedRetry/execute", localtcDataSetException.getMessage()), localtcDataSetException);
logger.debug("PJ:tcTskTimedRetry:execute:DataSetexception has occured");
catch (Exception localException1)
logger.error(LoggerMessages.getMessage("ErrorMethodDebug", "tcTskTimedRetry/execute", localException1.getMessage()), localException1);
logger.debug(LoggerMessages.getMessage("LeftMethodDebug", "tcTskTimedRetry/execute"));
public boolean stop()
logger.debug("tcTskTimedRetry:stop:Task being stopped");
return true;
>
-Kevin
Similar Messages
-
How to get the Report Page count using crystal reports 2008
Hi,
I have to implement a business logic where in i will have to display the no. of pages generated for the report
Say for e.g. crytal report that's generated spans 25 pages in the report.
Then i will have to display a message to the user after the report generation something like "25 Pages generated"
So, how would i get this report page count so that i can fetch the value and display the same to the user.
Any sample code snippet would be of great help.
Thanks in Advance
Regards,
RamnathHi,
I am using crystal reports 2008 and i visited the link forwarded in your previous mail and got the solution for getting the lastpagenumber of the report.
nPages = crReport.FormatEngine.GetLastPageNumber(New CrystalDecisions.Shared.ReportPageRequestContext)
but, i don't find FormatEngine property for ReportDocument object.
I just wanted to know whether this property is availale in crystal reports 2008 or should i even install any service packs for this.
Please find below the namespaces that importing in my class
Imports System.Windows.Forms
Imports System.Drawing.Printing
Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared
Imports CrystalDecisions.Windows.Forms
Imports CrystalDecisions.CrystalReports.ViewerObjectModel
Imports CrystalDecisions.Shared.ReportPageRequestContext
Please let me know how can i get the formatEngine property for reportdocument object
Thanks in Advance
Regards,
Ramnath -
How to get administrations of distribution list using api?
I want get all administrations of a distribution list using api, how to do that?
anybody knows? Thank you very much!!there is a standard function in mdm wd component
https://help.sap.com/saphelp_nwmdm71/helpdata/en/loio30bf76947bb64c48a2e835fda42c5183_30bf76947bb64c48a2e835fda42c5183/4…
"Note The Compare to Original button on the Items Detail component opens a Compare component enabling a user to compare a checked out record with an original record (if the user has authorization for the checked out group).
If the checked out record is a result of a merge action, then the Compare view displays all the original records prior to the merge. When a merge action is executed on a number of checked out records, the merged record is also checked out." -
How to get workflow task list ID?
I created simple workflow in Office 365 SharePoint 2013 using SharePoint Designer 2013.
The action Assign a task to user (Task outcome to Variable: Outcome |Task ID to Variable: TaskID) was used.
The variable TaskID had a value something look like
902aa0e9-0d58-47c0-a3ba-da96ebd47651, but I need ID from a task list.
How to get the task list ID in SharePoint Designer Workflow?
I am very grateful in advance for any help.
bnossovI created dictionary and create two variables:
Name: Accept; Type: string; Value:
application/json;odata=verbose;
Name: Content-Type ; Type: string; Value: application/json;odata=verbose;
Output variable: JSonRequestHeader.
I called HTTP web service:
https://xxxxxx/_api/web/Lists/getbytitle('WorkflowTaskList')/items?$select=ID
I used Count Items in Variables: JsonRequestHeader(Output to Variable: count)
The output variable count had value equals 2.
When I printed service url in browser it gave me xml with all the items ID in the
WorkflowTaskList. There were eight .
How can I take data from web service and put them in dictionary?
I would be grateful for any help.
bnossov -
How to get Default Activity(Infotype 0315) using BAPI
Hi Everyone,
I have a task to get Default Activity by Personal number for my third party application. Unfortunately function HR_READ_INFOTYPE is not allowed for Remote Call.
Is there any simple way how to get this value from system using BAPI? E.e. using RFC_READ_TABLE function(but i don't know table name ).
Thanks,
Roman.Table -> PA0315 Field ->LSTAR (Activity Type)
Class :CL_HRPT_INFOTYPE_0315
You can also use FM "CATS_GET_INFOTYPE_0315" RFC Enable
Good luck !
~Saquib -
How to Start process in ProcessChain Without using Repeat option?
How to Start process in ProcessChain Without using Repeat option?
Se16 -- table:RSPCPROCESSLOG - click on display entries.
Entet the variant, instance start date (this info you can get from the "display message" of PC.
Now execute to display the table entries of RSPCPROCESSLOG.
Next goto SE37 transaction --enter RSPC_PROCESS_FINISH
Take the entries from the above table to set the input parameters of the FM.
I_logid = log_id(from above table)
I_type = type(from above table)
i_variant = varaint (from above table)
i_instance = (from above table)
Click on F8(EXECUTE)
now the actual process is set to gree and the process chain will be triggered (rest of the PC with out repeating the step from where is was red). -
How to get list of buttons count
how to get list of buttons count in the oracle web page (similar to child objects concept in QTP for getting buttons count in a page)
Hi Rakesh,
I think you are looking for something like this:
Using Powershell to list all users that had completed
a password reset within the last 30 days
If you found my post helpful, please give it a Helpful vote. If it answered your question, remember to mark it as an Answer. -
How to get a total record count before grouping?
I need to group a report on a formula that does roughly the following:
[record count] / ( [total record count] / 20 )
What this acheives is to label each record with a number of 1 - 20 which I want to group on. Getting this figure is the easy part, what is not working is the fact that I cannot group from a formula that is calculated after grouping. I overcame a portion of this by using "Whilereadingrecords" (rather than "count", running totals, or while printing records) to acheive a record count.
I can't figure out how to get a total record count done before grouping. Is there a way to do this with "WhileReadingRecords"?? Is this even possible?
Thanks
JohnHi John,
The order of how Crystal does things dictates the order of which features you can use. Crystal has a two pass method. In the first pass it does things like passing the query, grouping, summarizing. In the second pass it does formulas, formatting, etc.
Unfortunately Crystal does the Grouping before summarizing so what you want to do can't be done in Crystal. The best way to get around this to either create a SQL Command or view/stored procedure that will do the summarizing for you. Then in the report you can use it.
Hope this helps,
Brian -
How to get resultset from oracle procedure use ejb3
how to get resultset from oracle procedure use ejb3
i know oracle procedure should like this
Create or replace PROCEDURE resultset_test(
aaa IN NUMBER,
bbb OUT sys_refcursor) ....
but what s the ejb3 scripts looks like? please give me an example or link~
ths- there are no EJB3 scripts, only compiled application code
- the part of the EJB spec that deals with databases is called the Java Persistence API, but likely you are just looking for the JDBC API.
Now you should know what to Google to get your "example script": "java jdbc oracle procedure" -
How to get inputtext's inputvalue by using javascript
how to get inputtext's inputvalue by using javascript?
and how to judge whether its be filled or empty stringWhy do you want to use javascript..? Why not action listener..? You can check whether its an empty string by checking
if(str != null && !str.equals("")) {..}
where str is the variable for inputText value.
If this is not helpful, do provide more details on which version of JDev you are using and what are you trying (your usecase).
regards,
~Krithika -
When I open a pdf file, after a few seconds, it hides the toolbar and I don't know how to get it back. I use multiple monitors and, without being able to grab the toolbar, I am unable to move the pdf file to a different monitor. How do I stop this?
Does Firefox switch to full screen if you press F11 ?
You can also try the F10 key to see if that brings up the menu bar.
* If the above steps didn't help then see http://kb.mozillazine.org/Corrupt_localstore.rdf
Note: Do not delete localstore.rdf in the program folder (Windows: "C:\Program Files\Mozilla Firefox\defaults\profile\") (Mac: "/Applications/Firefox.app/defaults/profile/") -
Urgent:How to get the Sqltext for Oracle Sumbitted Jobs in 10g
Dear All,
Could you help me out in sorting the below problem.
I use to get the current running sql's with following below query in 9i.
SELECT A.SID,B.HASH_VALUE, OSUSER, USERNAME, SQL_TEXT
FROM V$SESSION A, V$SQLTEXT B
WHERE B.HASH_VALUE = A.SQL_HASH_VALUE
AND USERNAME LIKE upper('%SCHEMA%')
ORDER BY B.HASH_VALUE, B.PIECE;
This is will work in 10g also for user-triggered sqls,stored procedures etc.
But when oracle submits job i'm not able find which qurery is running.
Seems For oracle jobs in 10g for V$session contain column SQL_HASH_VALUE as Zero and hence i'm not able find the any sql's running.
Could you please any of you help me out how to get the Sqltext for Orcle submited Jobs in 10g.
Please revert asap as this is very urgent for me.
Thanks in Advance
Anil.Have you tried to query WF_ITEMS? -- http://etrm.oracle.com/pls/et1211d9/etrm_pnav.show_object?c_name=WF_ITEMS&c_owner=APPLSYS&c_type=TABLE
bde_wf_item.sql - Runtime Data of a Single Workflow Item [ID 187071.1]
Thanks,
Hussein -
How to get Unapplied Amount with SQL or API in AR/ORACLE RECEIVABLES
Hi ,
how to get Unapplied Amount with SQL or API in AR/ORACLE RECEIVABLES.
who can help me ? Thank you very much !i get it from private API.
SELECT SUM(decode(ra.status, 'UNAPP', nvl(ra.amount_applied, 0), 0)) unapplied_amount
FROM ar_receivable_applications ra
WHERE ra.cash_receipt_id = 1820
AND ra.status IN ('UNAPP', 'ACTIVITY') -
How to get current task ID in BPM
Hi guys,
I have a requirement where I need to get the current active UWL task id in BPM context. I have seen the following code to create a direct execution url for a BPM task.
// begin session
IUWLSession uwlSession;
uwlSession = uwlService.beginSession(uwlContext, sessionIdleTimeout);
uwlContext.setSession(uwlSession);
IUWLItemManager itemManager = uwlService.getItemManager(uwlContext);
QueryResult result = itemManager.getItems(uwlContext, null, null);
ItemCollection items = result.getItems();
Item item = null;
for (int i = 0; i < items.size(); i++) {
item = items.get(i);
Map params = new HashMap();
params.put("taskId", item.getExternalId());
String executionURL = WDURLGenerator.getApplicationURL("sap.com/tc~bpem~wdui~taskinstance", "ATaskExecution", params);
This works fine, but this is looping through all the tasks assigned to a user. How do I get the current task ID. I want to use the code inside webdynpro application which is caled as a human activity in BPM. When this WebDynpro application is called I would like to know the current task ID.
As an FYI , UWL configuration passes the current task ID as a Dynamic parameter to "sap.com/tcbpemwdui~taskinstance"
application.
Please help if someone can identify how to get this value in my custom WD.
Thanks,
Yomesh.Yes. there is no API to get the current task.
Try this:
WDProtocolAdapter.getProtocolAdapter().getRequestObject().getParameter("wi_id");
But i still say a bit confused with your requirement.
The task id gets created only upon creation of a task. And you want this current task id in the BPM Process context? How is it possible unless and until some action takes place and the data is passed from WDJ to BPM Context?
Please clear my doubt. -
How to get sql server performance counters using query?
Hai i want to see my sql server performance counters like, Full Scans/sec, Buffer
Cache Hit Ratio, Database Transactions/sec, User
Connections, Average Latch Wait Time (ms), Lock
Waits/sec, Lock Timeouts/sec, Number
of Deadlocks/sec, Total Server Memory, SQL
Re-Compilations/sec, User Settable Query. If any one know how to get it by using query means, please help me.
Thanks in advanceHello,
Below is query created by Jonathan Kehayias for measuring Perfom counters using DMV sys.dm_os_performance_counter.
You can download book from below link
https://www.simple-talk.com/books/sql-books/troubleshooting-sql-server-a-guide-for-the-accidental-dba/
DECLARE @CounterPrefix NVARCHAR(30)
SET @CounterPrefix = CASE WHEN @@SERVICENAME = 'MSSQLSERVER'
THEN 'SQLServer:'
ELSE 'MSSQL$' + @@SERVICENAME + ':'
END ;
-- Capture the first counter set
SELECT CAST(1 AS INT) AS collection_instance ,
[OBJECT_NAME] ,
counter_name ,
instance_name ,
cntr_value ,
cntr_type ,
CURRENT_TIMESTAMP AS collection_time
INTO #perf_counters_init
FROM sys.dm_os_performance_counters
WHERE ( OBJECT_NAME = @CounterPrefix + 'Access Methods'
AND counter_name = 'Full Scans/sec'
OR ( OBJECT_NAME = @CounterPrefix + 'Access Methods'
AND counter_name = 'Index Searches/sec'
OR ( OBJECT_NAME = @CounterPrefix + 'Buffer Manager'
AND counter_name = 'Lazy Writes/sec'
OR ( OBJECT_NAME = @CounterPrefix + 'Buffer Manager'
AND counter_name = 'Page life expectancy'
OR ( OBJECT_NAME = @CounterPrefix + 'General Statistics'
AND counter_name = 'Processes Blocked'
OR ( OBJECT_NAME = @CounterPrefix + 'General Statistics'
AND counter_name = 'User Connections'
OR ( OBJECT_NAME = @CounterPrefix + 'Locks'
AND counter_name = 'Lock Waits/sec'
OR ( OBJECT_NAME = @CounterPrefix + 'Locks'
AND counter_name = 'Lock Wait Time (ms)'
OR ( OBJECT_NAME = @CounterPrefix + 'SQL Statistics'
AND counter_name = 'SQL Re-Compilations/sec'
OR ( OBJECT_NAME = @CounterPrefix + 'Memory Manager'
AND counter_name = 'Memory Grants Pending'
OR ( OBJECT_NAME = @CounterPrefix + 'SQL Statistics'
AND counter_name = 'Batch Requests/sec'
OR ( OBJECT_NAME = @CounterPrefix + 'SQL Statistics'
AND counter_name = 'SQL Compilations/sec'
-- Wait on Second between data collection
WAITFOR DELAY '00:00:01'
-- Capture the second counter set
SELECT CAST(2 AS INT) AS collection_instance ,
OBJECT_NAME ,
counter_name ,
instance_name ,
cntr_value ,
cntr_type ,
CURRENT_TIMESTAMP AS collection_time
INTO #perf_counters_second
FROM sys.dm_os_performance_counters
WHERE ( OBJECT_NAME = @CounterPrefix + 'Access Methods'
AND counter_name = 'Full Scans/sec'
OR ( OBJECT_NAME = @CounterPrefix + 'Access Methods'
AND counter_name = 'Index Searches/sec'
OR ( OBJECT_NAME = @CounterPrefix + 'Buffer Manager'
AND counter_name = 'Lazy Writes/sec'
OR ( OBJECT_NAME = @CounterPrefix + 'Buffer Manager'
AND counter_name = 'Page life expectancy'
OR ( OBJECT_NAME = @CounterPrefix + 'General Statistics'
AND counter_name = 'Processes Blocked'
OR ( OBJECT_NAME = @CounterPrefix + 'General Statistics'
AND counter_name = 'User Connections'
OR ( OBJECT_NAME = @CounterPrefix + 'Locks'
AND counter_name = 'Lock Waits/sec'
OR ( OBJECT_NAME = @CounterPrefix + 'Locks'
AND counter_name = 'Lock Wait Time (ms)'
OR ( OBJECT_NAME = @CounterPrefix + 'SQL Statistics'
AND counter_name = 'SQL Re-Compilations/sec'
OR ( OBJECT_NAME = @CounterPrefix + 'Memory Manager'
AND counter_name = 'Memory Grants Pending'
OR ( OBJECT_NAME = @CounterPrefix + 'SQL Statistics'
AND counter_name = 'Batch Requests/sec'
OR ( OBJECT_NAME = @CounterPrefix + 'SQL Statistics'
AND counter_name = 'SQL Compilations/sec'
-- Calculate the cumulative counter values
SELECT i.OBJECT_NAME ,
i.counter_name ,
i.instance_name ,
CASE WHEN i.cntr_type = 272696576
THEN s.cntr_value - i.cntr_value
WHEN i.cntr_type = 65792 THEN s.cntr_value
END AS cntr_value
FROM #perf_counters_init AS i
JOIN #perf_counters_second AS s
ON i.collection_instance + 1 = s.collection_instance
AND i.OBJECT_NAME = s.OBJECT_NAME
AND i.counter_name = s.counter_name
AND i.instance_name = s.instance_name
ORDER BY OBJECT_NAME
-- Cleanup tables
DROP TABLE #perf_counters_init
DROP TABLE #perf_counters_second
Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers
Maybe you are looking for
-
Anylytical Functions and DrillDown
Hi everybody! I wnat to know, if someone has solved the problem with the analytical functions and the drill down. the analytical functions are based on fixed parameters. when you drill down, these parameters change and the result is not very meanfull
-
Routing (chaining) failure
Hi Folks! I'm seeing a Routing (chaining) failure every time the localhost tries to download CRL updates from the Internet. I checked the System Policy and it has an enabled rule from localhost to All Networks for CRL updates. This is the first entry
-
I have the requirment, i have to display the equipment object type.
Hi, i have to display data from the following fields, the equipment object type(EQUI_EQART), materil numb(EQUI-MATNR),asset number(EQUI-ANLNR), placement date(AFKO-GLTRP), QMEL-VBELN, VBAP-NEPR, IHPA-PARNR, KNA1-NAME1, KNA1-STRAS, KNA1-KATR6, KNVP-P
-
Dear Experts, We have repeatitive manufacturing Scenario & during backflushing REPRO is allowed. Now we want to stop REPRO so that booking (MFBF) can not be dode if any component is in error (Non REPRO Allowed). What necessary steps/precautions has
-
STILL some confusion re: importing photos into my iPod
Hello - The helpful Zevoneer gave good instructions on how to import photos. BUT... I'm worried about one thing: When I click on the Photos tab and select "Sync photos from...", a window pops up saying "Are you sure you want to do this? (Essentially)