How to get parent process instance id in a java control?
Hi!
I have a process which invoke a java control.
In this java control I need the instance ID from the parent process.
Does anybody know where i can get the instance id?
Within a jpd I have the context variable (context.getInstanceId()), but I need something like this in the control
Thanks
Ben
the only way you can do is aquire the instanceid in the JDP itself and pass it to the java control as a paramter.
Similar Messages
-
Hi All,
How to get the process instance key so as to retry a rejected task through API while AD provisioing state?
API URL - http://docs.oracle.com/cd/E27559_01/apirefs.1112/e28159/toc.htm
ThanksTo retry a task that is in a rejected state, you use the SCH_KEY which is the task key. In OIM, all rejected tasks are listed in the OTI table. It contains all the important information about a rejected or pending task.
You can use the APIs found in the tcProvisioningOperationsIntf class to retrieve open tasks.
-Kevin -
How to get child process instance id from main process
Hi All,
I have a main process invoiking a child process 1 and child process 1 inturn calling child process 2.Is there any way to get the child process 2 instance id from main process or main process instance id from child process 2.. Using tree finder in BPEL Control i can find the direct sub process(child 1) instance id from the main process instance. Is it possible to trace Sub process 2 instance id without going for the instance detail of sub process 1.
Thanks in advance
ChitraDeviyou could easily derive this from the bpel cube_instance table. using cikey and parent_id columns. you can use IInstanceMetaData javadoc, it has method called getParentId( ) to get the id. you can get the root id (instance-id of the main bpel process instance) using getRootId( ). you can checkout this blog.
http://tech-sash.blogspot.com/2008/04/oracle-soa-suite-retrieving-process.html -
Getting process instance id from within java control
Hi,
here's a brief description of what i need to do. I have a group of processes which i start using one common interface (jpd control). the problem is, that when new process is created it needs to be added to a db table. So to have this done automatically i created a java control with a variable of jpd control. information that needs to be put in db is the process instance id.
does anyone have any idea why after calling clientRequest (without return) method getConversationID() of the process control gives null as a result? i'm sure that the process was successfully started and completed.
i don't know if this can have an influence on this, but this happens only if process is started from another process which was started in the same way from yet another process. to make it more clear...
baseProcess -> (startSubprocess -> startsubSubprocess)
both subprocesses are started in the same way from java control, but in the subprocess of the subprocess one getConversationID() returns null.i found the solution, which is that process controls should be generated from statefull process. when the process was stateless calling getConversationID() method from process control returned null.
-
How to get the activity instance id and process id
Dear All,
For my case, my boss require the workflow program processor can be runtime assigned . After research, I found the coding example like below:
// dynamically assign a user to a role
rtm.addRuntimeDefinedUserToRole(
// process instance
prInstance,
// role name
"Processor",
// user that is assigned (IUser)
user,
// user context (IGPUserContext)
userContext);
// dynamically change the user assigned to a role for a particular task
String prInstanceID = prInstance.getID();
rtm.changeTaskProcessor(
// process instance ID
prInstanceID,
// activity instance ID
activityInstanceID,
// current user (IGPUserContext)
currentProcessorContext,
// new user (IGPUserContext)
newProcessorContext);
But I don't know how to get the process instance ID and activity instance ID before I can apply this api in my webdynpro application.
Any gentllement can give me an idea.
Thank you.
Regards
Ericprocess = GPProcessFactory.getDesigntimeManager().getActiveTemplate(
// by specifying its ID "CCD2C3F1BED111DD9DFA005056A9416C",/
/* and the user accessing it */ userContext);
// retrieve the Runtime Manager
IGPRuntimeManager rtm = GPProcessFactory.getRuntimeManager();
// create an empty role assignment list
IGPProcessRoleInstanceList roles = rtm.createProcessRoleInstanceList();
//Initialising the input params
IGPStructure params =GPStructureFactory.getStructure(process.getInputParameters());
params.setAttributeValue("Name",value);
//Starting the process
IGPProcessInstance prInstance = rtm.startProcess(process,"Process Name","Process name",user,roles,params,user); -
How to get the process id of a sql statement or a session ....
How to get the process id of a sql statement or a session . ..?
ThanksWhat about this?
SELECT pid
FROM v$session s, v$process p
WHERE p.addr = s.paddr
AND s.sid = :sid; -- replace :sid with your session idRegards.
Al -
Get the Process Instance as a process variable
Hi,
is there a way on a Workflow Process to get the process instance in order to save it as a process variable (and then store it via a backend call).
In other words: I have many processes designed via NWDS Process Composer and I'd like to get the process instance ID in order to save it for faster retrieval of the process in the NWA's Manage Process application.
Thank you,
Pietro.Does it work if the process instance is already created?
Can you give me an example?
I've put as the first step of every workflow a callback method that is executed that calls an RFC to confirm, backend-side, that the process has been created. -
How to get parent controls reset
how to get parent control reset or changed
You would have to log in as the administrator, then use the Parental Controls panel in System preferences to change the account's controls.
Matt -
How to get the today's julian date in java?
how to get the today's julian date in java?
hi can any one tell me how to get the todays julian date using Calender class or GregorianCalender class....
Julian date for 2006.November.01 AD 05:54 PM : 2454041.0
i have tryied with
calJ.setGregorianChange(new Date(Long.MAX_VALUE));
System.out.println(sdf2.format(calJ.getGregorianChange()));
thanks
Tushar
Message was edited by:
lad_tusharthanks a lot....for intrest....
I have found some details about the Julian calendar as follows:
The Julian date for 2006: JAN: 01:12:01:59 is 2453737.00138
245 represent the year digits for year 2006
3737 represent the date fir 1 Jan
.00138 represents the time for 12:01:59
Julian date change as per every day 12 noon it increase one digit in it.
As per ref from
http://www.aavso.org/observing/aids/jdcalendar.shtml
Also chk this calendar where Julian date is 20. October 2006 for 02 November 2006
As per ref from
http://www.calendar.sk/julian_calendar-en.php
I have tried the pure �GregorianCalendar� class from jdk1.4 API and its setGregorianChange method but not getting as per the expected Julian date format. Using the �setGregorianChange()� i have setting the cutover date to Long.MAX_VALUE it means GregorianCalendar now have to act as per the Julian calendar ...so after setting the cutover date it return me changed date using �getGregorianChange()� but that was not the Julian date of the current date...as expected or as per above both scenario. Even though the last two digits are nowhere equal to the actual Julian date.
Program
GregorianCalendar cal = new GregorianCalendar();
cal.setGregorianChange(new Date(Long.MAX_VALUE)); // setting the calendar to act as a pure Julian calendar.
// cal.set(Calendar.DATE, new Date().getDate()); // seting the current date
// Date todayJD = cal.getGregorianChange(); // getting the changed date after the setGregorianChange
Date todayJD = cal.getTime(); // getting the calculated time of today�s Julian date
SimpleDateFormat sdfJulianDate = new SimpleDateFormat("yyDDD");
SimpleDateFormat sdfJuliandayOfYear = new SimpleDateFormat("DDD");
System.out.println("today Date = " + new Date());
System.out.println("Today as julian date = " + sdfJulianDate.format(todayJD));
System.out.println("Today as day of year = " + sdfJuliandayOfYear.format(todayJD));
OUTPUT:
USING : Date todayJD = cal.getGregorianChange();
Today Date = Thu Nov 02 15:17:05 IST 2006
Today as julian date = 94229
Today as day of year = 229
USING : cal.set(Calendar.DATE, new Date().getDate());
Today Date = Thu Nov 02 15:19:22 IST 2006
Today as julian date = 06319
Today as day of year = 319
USING : Date todayJD = cal.getTime();
Today Date = Thu Nov 02 15:17:59 IST 2006
Today as julian date = 06306
Today as day of year = 306
There is one another concept i found to get the Julian day of the year as per the Julian day chart mention on nasa site (http://angler.larc.nasa.gov/armsgp/JulianDayChart.html) and i m getting the moth of the year that is 306 for nov 02 2006 using getTime() method in above code then the out put is right for Julian day. But it was not as per the expected Julian date format. So in conclusion we can only able to retrieve the day of year for the Julian calendar. hope their will be a solution for this problem in java api ....else we allways have to depend upon the third party api that was not accepteble some times.....
Kindly chk chart on the site
http://angler.larc.nasa.gov/armsgp/JulianDayChart.html
http://weather.uwaterloo.ca/julian.html
http://www.fs.fed.us/raws/book/julian.shtml
Thanks,
Tushar Lad -
How to get check value in DB based on java
hi,
anybody know how to get check value in DB based on java?
TQThis should be a custom java class containing that method.
Try on java or jdbc forum - Java Database Connectivity (JDBC) , Java Programming -
Script QPAC: how to get a process manager instance?
Hi,
I was desperately fiddling about the scripting QPAC, trying to get an instance of process manager.
Since PATAbstractServiceEx is an abstract class, I cannot instantiate it and call its getContext().getProcessManager() methods.
I also tried to access a session using QLCSessionFactory.createSession("...") and then calling the session's getProcessManager() method. But no sessions were found.
Does anyone know, which classes/methods to use in order to get a process manager instance?
Regards,
Steveimport com.adobe.workflow.manager.ProcessManager;
ProcessManager _pm = patServiceContext.getProcessManager();
Page 36 of "Creating workflows".
Howard
http://www.avoka.com -
How to get the all instances in which I acted on any of the activity?
Hi all,
Consider that in a Process there are three Activities named
1. Create Proposal Role : Initiator
2. Routed to Primary Owner Approval Role : Primary Owner
3. Routed to Manager Approval Role : Manager
Suppose I'm a Participant having access to PrimaryOwner Role. Some X, Y, Z persons created 3 instances whcih is now in "Routed to Manager Approval" activity or completed. I acted only on 2 instances and the other some one else acted. How can i get the 2 instances in which i acted . What is the way to acheive this PAPI 6.0 or Stuio 6.0?
Thanks in advance,
SanaDoing something similar, using following code in a screenflow called from a global activity:
ps = new ProcessService();
ps.connectTo(url :Fuego.Server.directoryURL, user : "username", password : "password");
InstanceFilter filter = ps.getFilterFor(viewId : "myHidView");
filter.searchScope = SearchScope(participantScope : ParticipantScope.ALL, statusScope : StatusScope.ONLY_INPROCESS);
// have tried the filter using both methods below
//filter.setParametricValueTo(variable : "myvar", value : myDesiredVarValue);
filter.addAttributeTo(variable : "myvar", comparator : Comparison.IS, value : myDesiredVarValue);
instances = ps.getInstancesByFilter(filter : filter);
I get the following error in the engine log:
Unable to receive the message because of a serialization error. Caused by: fuegoblock.papi.Instance fuego.rmi.spi.SerializationException: Unable to receive the message because of a serialization error. at fuego.rmi.spi.BaseConnection.send(BaseConnection.java:101) at fuego.rmi.ServerCluster.send(ServerCluster.java:226) at fuego.rmi.ServerCluster.sendResult(ServerCluster.java:495) at fuego.rmi.ServerCluster.access$400(ServerCluster.java:50) at fuego.rmi.ServerCluster$1.put(ServerCluster.java:590) at fuego.component.ExecutionThread.sendResult(ExecutionThread.java:523) at fuego.component.ExecutionThreadContext.doClientInvoke(ExecutionThreadContext.java:668) at fuego.component.ClientRemoteComponent.doInvocation(ClientRemoteComponent.java:303) at fuego.component.ClientRemoteComponent.invoke(ClientRemoteComponent.java:160) at fuego.component.ExecutionRelayedThrowable.execute(ExecutionRelayedThrowable.java:94) at fuego.server.execution.TaskExecution.handleExecutionRelayedThrowable(TaskExecution.java:802) at fuego.server.execution.TaskExecution.handleComponentExecutionException(TaskExecution.java:753) at fuego.server.execution.TaskExecution.executeCIL(TaskExecution.java:493) at fuego.server.execution.TaskExecution.executeTask(TaskExecution.java:677) at fuego.server.execution.TaskExecution.executeTask(TaskExecution.java:638) at fuego.server.execution.TaskExecution.executeTask(TaskExecution.java:451) at fuego.server.execution.GlobalTaskExecution.executeGlobalCIL(GlobalTaskExecution.java:164) at fuego.server.execution.Global.continueCil(Global.java:68) at fuego.server.AbstractProcessBean$39.execute(AbstractProcessBean.java:2515) at fuego.server.execution.DefaultEngineExecution$AtomicExecutionTA.runTransaction(DefaultEngineExecution.java:291) at fuego.transaction.TransactionAction.startBaseTransaction(TransactionAction.java:462) at fuego.transaction.TransactionAction.startTransaction(TransactionAction.java:540) at fuego.transaction.TransactionAction.start(TransactionAction.java:213) at fuego.server.execution.DefaultEngineExecution.executeImmediate(DefaultEngineExecution.java:118) at fuego.server.execution.EngineExecution.executeImmediate(EngineExecution.java:66) at fuego.server.AbstractProcessBean.runGlobalActivity(AbstractProcessBean.java:2508) at sun.reflect.GeneratedMethodAccessor114.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at fuego.lang.JavaClass.invokeMethod(JavaClass.java:1477) at fuego.lang.JavaObject.invoke(JavaObject.java:185) at fuego.component.Message.process(Message.java:585) at fuego.component.ExecutionThread.processMessage(ExecutionThread.java:759) at fuego.component.ExecutionThread.processBatch(ExecutionThread.java:734) at fuego.component.ExecutionThread.doProcessBatch(ExecutionThread.java:140) at fuego.component.ExecutionThread.doProcessBatch(ExecutionThread.java:132) at fuego.fengine.FEngineProcessBean.processBatch(FEngineProcessBean.java:257) at fuego.component.ExecutionThread.work(ExecutionThread.java:818) at fuego.component.ExecutionThread.run(ExecutionThread.java:397) Caused by: java.io.NotSerializableException: fuegoblock.papi.Instance at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.writeObject(Unknown Source) at java.util.ArrayList.writeObject(Unknown Source) at sun.reflect.GeneratedMethodAccessor87.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source) at java.io.ObjectOutputStream.writeSerialData(Unknown Source) at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source) at java.io.ObjectOutputStream.writeSerialData(Unknown Source) at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.writeObject(Unknown Source) at fuego.component.Message.writeObject(Message.java:665) at sun.reflect.GeneratedMethodAccessor93.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source) at java.io.ObjectOutputStream.writeSerialData(Unknown Source) at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.writeObject(Unknown Source) at fuego.component.Batch.writeObject(Batch.java:151) at sun.reflect.GeneratedMethodAccessor92.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source) at java.io.ObjectOutputStream.writeSerialData(Unknown Source) at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.writeObject(Unknown Source) at fuego.rmi.Packet.write(Packet.java:251) at fuego.rmi.spi.BaseConnection.send(BaseConnection.java:98) ... 38 more
Sorry for huge error message.
Is there a trick to getting the filtered set of instances from in the screenflow activity? -
Hey,
I've build a Process DC with subprocesses. I would like to retrieve my process instance ID, this way, when I am in a subprocess, I could still put a link to the diagram of the main process !
Does anyone have any idea how to obtain it ?
Any help would be appreciated!Hi Lynne,
another question. Did you get the funtion "sendNotification()" running? At line push.pushSharedItem(procon, item, users); I get the error "null null"
I already checked objects and they seems to be created correct. Might there be any attribute wrong due to the fact that this example is originally for CE 7.0?
//Setup connection
IUWLService uwlService = findService();
final int sessionIdleTimeout = 60;
UWLContext uwlContext = new UWLContext();
IWDClientUser clientUser;
clientUser = WDClientUser.getLoggedInClientUser();
IUser user = clientUser.getSAPUser();
uwlContext.setUser(user);
uwlContext.setLocale(Locale.getDefault());
IUWLSession uwlSession;
uwlSession = uwlService.beginSession(uwlContext, sessionIdleTimeout);
uwlContext.setSession(uwlSession);
IUWLItemManager itemManager = uwlService.getItemManager(uwlContext);
//Setup provider conn
IPushChannel push = uwlService.getPushChannel();
IProviderConnector procon = uwlService.getRegisterProviderConnector(IProviderConnector.ADHOC_WORKFLOW_CONNECTOR_ID);
IUserFactory usf = UMFactory.getUserFactory();
IUser sendToUser = usf.getUserByLogonID(wdContext.nodeNotifData().currentNotifDataElement().getUserId());
//Setup item
Item item = new Item(IProviderConnector.ADHOC_WORKFLOW_CONNECTOR_ID,IProviderConnector.ADHOC_WORKFLOW_SYSTEM, "" + new Date().getTime(), sendToUser.getUniqueID());
item.setUser(sendToUser.getUniqueID());
item.setSubject(wdContext.nodeNotifData().currentNotifDataElement().getSubject());
item.setDescription(wdContext.nodeNotifData().currentNotifDataElement().getDescription());
item.setItemType(ItemType.UWL_ITEM_NOTIFICATION);
item.setCreatedDate(new Date());
// item.setDueDate(new Date());
item.setCreatorId(user.getUniqueID());
item.setStatus(StatusEnum.NEW);
item.setCompletedDate(new Date());
// External Type is used to filter the notifications according to
// application
item.setExternalType("UWLNotification");
//Send item
Set users = new HashSet();
users.add(sendToUser.getUniqueID());
// users.add("USER.PRIVATE_DATASOURCE.un:testuser1");
push.pushSharedItem(procon, item, users);
wdComponentAPI.getMessageManager().reportSuccess("Notification Sent");
Regards -
How To Get GP Process Parameters in a Webdynpro Application runtime
Hi ,
Iu2019 ll hope you can help me to solve my problem with GP process.
Iu2019 m trying to get GP process parameters from a Webdynpro application.
I have to get parameters during the process runtime in every step of the process using
a webdynpro application with the following code:
IGPRuntimeManager rtm = GPProcessFactory.getRuntimeManager();
try {
IGPProcessInstance processInst = rtm.getProcessInstance(processId,userContext);
IGPProcessInstanceInfo procInfo = rtm.getProcessInstanceInformation(processInst.getID(),
userContext.getSAPUser());
IGPStructureInfo inputstructInfo = processInst.getTemplate().getInputParameters();
IGPStructure inputparams = GPStructureFactory.getStructure(inputstructInfo);
} catch (GPEngineException e) {
// TODO Auto-generated catch block
// e.printStackTrace();
manager.reportException("GPEngineException:"+getStackTrace(e), false);
} catch (GPInvocationException e) {
// TODO Auto-generated catch block
// e.printStackTrace();
manager.reportException("GPInvocationException:"+getStackTrace(e), false);
But printing the values of attributes with u201Cinputparams.getAttributeAs... ("param name")u201C the value returned is always 0. On the contrary if I check the same parameters structure in the runtime
GP view of the portal, the values are those that I have set in the start process wizard.
Have you a solution for this question?
Thanks in advance
Lucahi Abhimanyu
I believe originally access to session was deliberately not made available inside WDA.
Growing security concerns due to misuse of session information and
perhaps other reasons as well.
X.509 is considered a better approach.
This may not help you in your problem.
But you may see a trend in WDA pushing more robust and client independent
approaches.
Full x.509 access should remove the need for session fiddling.
Also when developers access such session info directly, there is a possiblity
when they dont understand the technology exactly that they create a security hole.
You may know how to do safely, it is however discouraged.
Im not aware of a way to get at the session info inside the WDA framework.
Well not without a mod to the framework.
It may be possible without a mod, but I dont know the trick.
If someone has a little trick... please post.
You may need to use BSP, if your only solution requires access to the session info.
regards
Phil -
OIM - Task Assignment Adapter - How to get the object instance key?
Hello experts,
I'm trying to use a task assignment adapter to assign an approval task dynamically. Basically, the user can request a resource like "CustomApp Profiles" and we create an object form to let them choose the profile that he needs. Each profile has an owner, which is populate in a Lookup (Owner is the code and Profile is the decode).
So, in the approval task, I need to get the profile selected by user in the object form and search into the lookup who is the owner of that profile. But I don't know how can I get the object instance key using the parameters that can be mapped to a task assignment adapter.
Looking into the OIM documents, I believe that the easier way is using the request key, because the REQ_KEY is a foreign key in OBI table.
Did anyone knows how can I get the object instance key using the request key? Can I use some API or should I execute a SQL statement directly in OIM database?
Best Regards,
NittoTo retry a task that is in a rejected state, you use the SCH_KEY which is the task key. In OIM, all rejected tasks are listed in the OTI table. It contains all the important information about a rejected or pending task.
You can use the APIs found in the tcProvisioningOperationsIntf class to retrieve open tasks.
-Kevin
Maybe you are looking for
-
Long load times for large video tracks
Is there a recommended file size to stay under for video tracks in iTuens U? I know the hard limit is 500Mb per upload, but it seems as though any file that is more than about 10 minutes in length takes upwards of 10 minutes or longer to load. A shor
-
Airplay icon doesn't display on home PC
Not sure if this question is for the Home Sharing community or ATV, but I'm leaning towards home sharing. My problem is that my main PC (with my iTunes library) doesn't show the airplay (ATV) sign when I play a song or video. My laptop - which also
-
Hello - I am running an Oracle 8.1.7.4 database in archivelog mode. Can I take a datafile offline, rename the datafile, then bring the datafile back online? For example, 1. alter database datafile 'string' offline; 2. rename the datafile at the os le
-
I'm having trouble upgrading to ITunes v12.0.1 with Win 7. Download progress bar stalls and eventually cancels itself. Have tried Tools --> Download Only, but same result. Have been using iTunes for 3+ years without difficulty; I have lots of ram, ha
-
I have looked through the various Oracle documentation on Oracle 8i Standard/Enterprise and 8i Personal Edition, and also 9i of each. I can not find the limitations for each. If you download the versions from the internet, what are the limitations. I