Return values from a jpd to a jpf
I basically want to call a jpd from a page flow and then receive the results back from the jpd in my page flow. I have created a process control from the jpd and have included it in my page flow controller file using the following annotation.
* @common:control
private controls.leaveProcessPControl leaveControl ;
But since my jpd has a client response node for sending back the results (which corresponds to callback interface in the code), my page flow controller file is throwing an error saying that leaveControl implements a callback interface and page flow cannot receive asynchronous callbacks. Can anyone tell me how to resolve this.
I would also like to know if there are different approaches for returning values back to the jpf from a jpd.
Thanks,
RK
We are talking web interface here, so forget about Callbacks. I suggest that
you create Web Servicethat implements your proces or a control that calls
proces. Then Call that WS fro a controller, but in sync. way. Send a request
and then pull for response. This pull can be implemented as while loop in
Controler, with wait inside loop.
That wont work realy well if jour proces is long running, as controller will
block. In that case you will have to implement some kind of pulling in every
action method in your controller and react - fill data in internal variable
of controller for example.
I hope it helps, butt remember thin is not always the best.
"rohini k" <[email protected]> wrote in message
news:4042178.1101851602508.JavaMail.root@jserv5...
I basically want to call a jpd from a page flow and then receive the
results back from the jpd in my page flow. I have created a process control
from the jpd and have included in my page flow controller file using the
following annotation.
* @common:control
private controls.leaveProcessPControl leaveControl ;
But since my jpd has a client response node for sending back the results
(which corresponds to callback interface in the code), my page flow
controller file is throwing an error saying that leaveControl implements a
callback interface and page flow cannot receive asynchronous callbacks.
Can anyone tell me how to resolve this.
I would also like to know if there are different approaches for returning
values back to the jpf from a jpd.
Thanks,
RK
Similar Messages
-
How to get return value from java and read by other application?
i want to read return value from java and the other application read it.
for example:
public class test_return {
test_return(){
public int check(){
return 1;
public static void main(String args[]){
new test_return().check();
}from that class i make as jar file. How to read the return value (1) by other application?
thx..If your installer is requiring some process it invokes to return a particular value on failure, then the installer is seriously broken. There are a bazillion commands your installer could invoke, and any of them could fail, which in turn could invalidate the entire install process, and any of them could return any value on failure. The only value that's consistent (in my experience) is that zero means success and non-zero means failure, with specific non-zero values being different in different programs.
About the only control you have over the JVM's exit code is that if your main method completes without throwing an exception, the JVM will have an exit code of 0, and if main throws an exception (either explicitly or by not catching one thrown from below), it will be non-zero. I'm not even sure if that's guaranteed, but I would guess that's the case.
EDIT: I'm kind of full of crap here. If you're writing the Java code, you can call System.exit(whatever). But nonetheless, if your installer requires certain exit codes from any app--java or otherwise--you have a problem.
Edited by: jverd on Oct 29, 2009 1:27 AM -
How to get return value from Java runtime.getRuntime.exec?
I'm running shell commands from an Oracle db (11gr2) on aix.
But, I would like to get a return value from a shell comand... like you get with "echo $?"
I use a code like
CREATE OR REPLACE JAVA SOURCE NAMED common."Host" AS
import java.io.*;
public class Host {
public static int executeCommand(String command) {
int retval=0;
try {
String[] finalCommand;
finalCommand = new String[3];
finalCommand[0] = "/bin/sh";
finalCommand[1] = "-c";
finalCommand[2] = command;
final Process pr = Runtime.getRuntime().exec(finalCommand);
pr.waitFor();
catch (Exception ex) {
System.out.println(ex.getLocalizedMessage());
retval=-1;
return retval;
/but I do not get a return value... because I don't know how to get return value..
Edited by: user9158455 on 22-Sep-2010 07:33Hi,
Have your tried pr.exitValue() ?
I think you also need a finally block that destroys the subprocess
Regards
Peter -
How to get the return values from a web page
Hi all :
how to get the return values from a web page ? I mean how pass values betwen webflow and web page ?
thank you very much
Edited by: jingying Sony on Apr 15, 2010 6:15 AM
Edited by: jingying Sony on Apr 15, 2010 6:18 AMHi,
What kind of web page do you have? Do you have possibility to for example make RFCs? Then you could trigger events (with parameters that could "return" the values) and the workflow could react to those events. For example your task can have terminating events.
Regards,
Karri -
Remote Object - not able to get the returned value from java method
Hi ,
I am developing one sample flex aplication that connects to the java code and displays the returned value from the
java method in flex client. Here I am able to invoke the java method but not able to collect the returned value.
lastResult is giving null . I am able to see the sysout messages in server console.
I am using flex 3.2 and blazeds server and java 1.5
Here is the code what I have written.
<?xml version="1.0" encoding="utf-8"?><mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" backgroundColor="#FFFFFF" initialize="initApp()">
<mx:Script><![CDATA[
import mx.controls.Alert;
import mx.binding.utils.ChangeWatcher;
import mx.rpc.events.ResultEvent;
import mx.messaging.*;
import mx.messaging.channels.*
public function initApp():void {
var cs:ChannelSet = new ChannelSet();
var customChannel:Channel = new AMFChannel("my-amf", "http://localhost:8400/blazeds/messagebroker/amf"); cs.addChannel(customChannel);
remoteObj.channelSet = cs;
public function writeToConsole():void { remoteObj.writeToConsole(
"hello from Flash client");
var returnedVal:String = remoteObj.setName().lastResult; Alert.show(returnedVal);
//[Bindable]
// private var returnedVal:String;
]]>
</mx:Script>
<mx:RemoteObject id="remoteObj" destination="sro" />
<mx:Form width="437" height="281">
<mx:FormItem>
</mx:FormItem>
<mx:Button label="Write To Server Console" click="writeToConsole()"/>
</mx:Form>
</mx:WindowedApplication>
Java code
public
public SimpleRemoteObject(){
super(); }
class SimpleRemoteObject {
public void writeToConsole(String msg) { System.out.println("SimpleRemoteObject.write: " + msg); }
public String setName(){ System.
out.println("Name changed in Java");
return "Name changed in Java";
And I have configured destination in remote-config.xml
<destination id="sro">
<properties>
<source>SimpleRemoteObject</source>
<scope>application</scope>
</properties>
</destination>
Please help me .You are not able to get the returned value because if you see the Remote object help you will realise you have to use result="resultfn()" and fault = "faultfn()"
In this you define what you wish to do.
More importantly in the remote object you need to define which method you wish to call using the method class like this
<mx:RemoteObject id="remoteObj" destination="sro" result="r1" fault="f1" >
<Method name="javaMethodName" result="r2" fault="f2"/>
<mx:RemoteObject>
r2 is the function where you get the result back from java and can use it to send the alert. -
How to get return values from stored procedure to ssis packge?
Hi,
I need returnn values from my stored procedure to ssis package -
My procedure look like and ssis package .Kindly help me to oget returnn value to my ssis package
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: <Author,,Name>
-- Create date: <Create Date,,>
-- Description: <Description,,>
-- =============================================
ALTER PROCEDURE [TSC]
-- Add the parameters for the stored procedure here
@P_STAGE VARCHAR(2000)
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
-- Insert statements for procedure here
--SELECT <@Param1, sysname, @p1>, <@Param2, sysname, @p2>
truncate table [INPUTS];
INSERT
INTO
[INPUTS_BASE]
SELECT
[COLUMN]
FROM [INPUTS];
RETURN
END
and i am trying to get the return value from execute sql task and shown below
and i am taking my returnn value to result set variableYou need to have either OUTPUT parameters or use RETURN statement to return a value in stored procedures. RETURN can only return integer values whereas OUTPUT parameters can be of any type
First modify your procedure to define return value or OUTPUT parameter based on requirement
for details see
http://www.sqlteam.com/article/stored-procedures-returning-data
Once that is done in SSIS call sp from Execute SQL Task and in parameter mapping tabe shown above add required parameters and map them to variables created in SSIS and select Direction as Output or Return Value based on what option you used in your
procedure.
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs -
Getting Return values from RFC function call with visual basic
Hi,
I am creating a sample app to connect to a SAP system which call its RFC functions created with ABAP. It was known that the function will return more than 1 return values.
SAP Function name ==> "ZFMTP_RFC_GET_RESULT"
Export parameters (to SAP):
- Student Name [char 10] ==> "STUNAME"
- Student ID [char 20] ==> "STUID"
Return values (From SAP):
- Results [char 10] ==> "RESULT"
- Remarks [char 200] ==> "REMARKS"
i have managed to get sample codes for connecting and call a RFC function with vb but they only get a return value. How do i retrieve multiple return values like the above function "RESULT" and "REMARKS"?
Here's my vb code to accessing the function
Dim R3 As Object
Dim FBFunc As Object
Dim returnFunc As Boolean
Dim connected As Boolean
R3 = CreateObject("SAP.Functions")
R3.Connection.Client = "000"
R3.Connection.User = "BCUSER"
R3.Connection.Password = "minisap"
R3.Connection.Language = "DE"
R3.Connection.System = "dtsystem"
R3.Connection.Applicationserver = "xxx.xxx.xxx.xxx"
connected = R3.Connection.Logon(0, True)
If connected <> True Then
MsgBox("Unable to connect to SAP")
End If
FBFunc = R3.add("ZFMTP_RFC_GET_RESULT")
FBFunc.exports("STUNAME") = "Jonny"
FBFunc.exports("STUID") = "12345"
returnFunc = FBFunc.Call() <<== How do i get the return value? or RESULT and REMARKS of the RFC Function?
thanks alot.
Edited by: Eugene Tan on Mar 4, 2008 7:17 AMHi Gregor,
Thanks for the link....i am having some doubts with the codes, hope you can clarify them for me if you know the codes..
Below is the code snippet.
Set impReturn = CHPASS_FN.Imports("RETURN") <<=== is RETURN the standard keyword to get a return object?
expPassword.Value = currpass
expNewPass.Value = newpass
expFillRet.Value = "1"
''' Call change password function
If CHPASS_FN.Call = True Then
outFile.Write (", Called Function")
Message = impReturn("MESSAGE") <<==== So if i have 3 return values..i just replace with the return value variable names?
outFile.WriteLine " : " & Message
Else
outFile.Write (", Call to function failed")
End If
thanks alot...all your help is very appreciated. -
Subprocess 33 was not successful. Master cannot read return value from S 33
Hi All,
We are on BI 7.0 SP 19.
We have submitted a planning sequence in the background with automatic packaging.
The planning sequence has two steps:
Step 1. Z_PLNG_FUNCTION1
Step 2. Z_PLNG_FUNCTION2
As per automatic packaging, the system chose 0ACCOUNT for packaging.
When submitted, each step has been submitted to 30 packages as 30 subprocesses.
For Step 1, the log shows that All subprocesses executed.
For Step 2, the log shows that the subprocess 33 and 58 failed, which means subprocess #3, and # 28 for the step 2 as the subprocess is numbered in the log in combination with step 1.
The messages in the log for the failed subprocesses are as follows:
@5C\QError@ Subprocess 33 was not successful
@5C\QError@ Master cannot read return value from subprocess 33
@5C\QError@ Subprocess 58 was not successful
@5C\QError@ Master cannot read return value from subprocess 58
Our question is on how to find the exact cause of the subprocess failure.
I tried to look for the details on the error messages, they have been not helpful.
What is meant by 'Master cannot read return value from subprocess' and how to get the exact cause of the failure?
Thanks in advance,
Best Regards,
- ShashiShashi,
implement the following notes and check again:1368659, 1525723, 1532061.
Regards,
Marc
SAP Techology RIG -
How to Sort by the length of the returned value from a query.
Hi,
I was wondering if it is possible to sort by the length of the returned value from a query?
For example if I want to get a list of people with the name 'Samuel', I would like to short by how short the length of the whole name is.
Sort by length of the name in SQL
Samuel Syda
Samuel Indranaka
Samuel Johnsons
Samuel Longhenderson
Thank you.Hi,
Sorting is done by an ORDER BY clause at the end of the main query.
In most cases, you can ORDER BY any expression, even f it is not in the SELECT clause. In this case, it sounds like you just need:
ORDER BY LENGTH (name_column)
I hope this answers your question.
If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all the tables involved, and the results you want from that data.
Post your query, using an ORDER BY clause like the one above, and point out where that query is producing the wrong results, and explain, using specific examples, how you get the right results from the given data in those places.
Always say what version of Oracle you're using (e.g. 11.2.0.2.0).
See the forum FAQ: https://forums.oracle.com/message/9362002 -
We ran across some code in one of our classes that calls a private method. That method returns an object, but the code calling that method does not capture it. What happens to the return value in a case like this? I would have thought that to be a syntax error.
Example:
myMethod(myObject, i); // Call to myMethod without capturing its return value.
private myObject myMethod(MyObject myObject, int i) {
return myObject;
}What happens to the return value from myMethod?(void) f(arg1, ..., argN); There's no
provision in Java to allow you express that same
intention.
What?!?!?public void f(arg1, ...,
argN);
In the C code, function f was defined as having a non-void return type.
The statement
(void) f(arg1, ..., argN);shows the caller is knowing ignoring that returned value. -
Capture Return Value from Contextual Events Subscriber Method
Hi
I was wondering if anyone knew whether you could capture the return value from a method exposed as a subscriber for a contextual event?
Requirement: We have 2 bounded task flows (parent-child) with the child task flow embedded as a region in a view activity in the parent task flow. Based on an action in the parent task flow we raise a contextual event which calls an application module method exposed as a data control within the child task flow. We need to be able to capture the return value from the method on the managed bean.
Example method within child task flow application module:
public String contextualEventSub(){
Return "Y";
So here we would like to capture String value when the event is raised by the event producer (parent task flow action).
Within the Event Map on the page definition of the parent task flow view activity it is possible to set parameters to pass to the subscriber but it’s not obvious where you can capture the return value.
Many thanks!
Technology:
ADF 11.1.1.7 – ADFbc with ADF task flows and page fragmentsCheck this URL it may help you
One size doesn't fit all: JDev 11g: Programmatic Contextual Events -
RE: (forte-users) Reading return value from Javaprogram
when using the RunCommand method you can specify the an error file:
task.part.os.RunCommand(command = l_tdCommandLine,
isSynchronous = TRUE,
inputFile = Nil,
outputFile = Nil,
errorFile = l_ErrorFile.GetLocalName(TRUE));
BEGIN
l_ErrorFile.Open(SP_AM_READ);
EXCEPTION
WHEN Ex: FileResourceException DO
l_ErrorFile = NIL;
task.ErrorMgr.Clear();
END;
IF l_ErrorFile <> NIL THEN
l_tdFileContents : TextData = New();
l_ErrorFile.ReadText(l_tdFileContents);
l_ErrorFile.Close();
END IF;
Have you java program output the return value to the standard IO. This way
you will have an error file that you can read from Forte.
ka
-----Original Message-----
From: Anthony D [mailto:saigonxyahoo.com]
Sent: Tuesday, September 12, 2000 7:49 AM
To: forte-userslists.xpedior.com
Subject: (forte-users) Reading return value from Java program
Hi,
Does anyone know whether Forte application can
read a return value from a Java program?
I'm using the RunCmd method to invoke the Java
program. I'd like to read the return value from the
Java program. How do I go about doing it?
Any suggestion will be appriciated.
Thanks
AD
http://mail.yahoo.com/
For the archives, go to: http://lists.xpedior.com/forte-users and use
the login: forte and the password: archive. To unsubscribe, send in a new
email the word: 'Unsubscribe' to: forte-users-requestlists.xpedior.comwhen using the RunCommand method you can specify the an error file:
task.part.os.RunCommand(command = l_tdCommandLine,
isSynchronous = TRUE,
inputFile = Nil,
outputFile = Nil,
errorFile = l_ErrorFile.GetLocalName(TRUE));
BEGIN
l_ErrorFile.Open(SP_AM_READ);
EXCEPTION
WHEN Ex: FileResourceException DO
l_ErrorFile = NIL;
task.ErrorMgr.Clear();
END;
IF l_ErrorFile <> NIL THEN
l_tdFileContents : TextData = New();
l_ErrorFile.ReadText(l_tdFileContents);
l_ErrorFile.Close();
END IF;
Have you java program output the return value to the standard IO. This way
you will have an error file that you can read from Forte.
ka
-----Original Message-----
From: Anthony D [mailto:saigonxyahoo.com]
Sent: Tuesday, September 12, 2000 7:49 AM
To: forte-userslists.xpedior.com
Subject: (forte-users) Reading return value from Java program
Hi,
Does anyone know whether Forte application can
read a return value from a Java program?
I'm using the RunCmd method to invoke the Java
program. I'd like to read the return value from the
Java program. How do I go about doing it?
Any suggestion will be appriciated.
Thanks
AD
http://mail.yahoo.com/
For the archives, go to: http://lists.xpedior.com/forte-users and use
the login: forte and the password: archive. To unsubscribe, send in a new
email the word: 'Unsubscribe' to: forte-users-requestlists.xpedior.com -
NEED HELP on returning values from a method
Hello Java World,
Does anyone know how to return more then 1 value from a method..
ex.
//the following returns one value
//Person Class
private String getname()
return this.name;
how can i get two values (ex. name and occupation of person)
Thank you in advance.Create a Class which will hold the values you want and return that object. Or return a List, or return an array, or - taking your example with the person, why don't you return the whole person object?
Thomas -
Get a return value from a stored procedure.
hi all ,
i need to know where i am going wrong with the below code. I am trying to get a value from a stored procedure. the return type is int. The stored procedure works fine as i've debugged it. The variable have been declared correctly.
int n = 0;
proc = conn.prepareCall("{ ? = call SP_GETITEMCURRENTSOH(?,?) }");
proc.registerOutParameter(1, java.sql.Types.INTEGER);
proc.setString(1, locationCode);
proc.setString(2, itemCode);
proc.execute();
n = proc.getInt(1);thanksHi ayub_a,
According the [ *setString*|http://java.sun.com/javase/6/docs/api/java/sql/CallableStatement.html#setString(java.lang.String,%20java.lang.String)] method of the [*CallableStatement*|http://java.sun.com/javase/6/docs/api/java/sql/CallableStatement.html] interface, the first parameter must be a parameter name and not an ordinal position index !!!
Edit : I've just found out the solution, it must be :
int n = 0;
proc = conn.prepareCall("{ ? = call SP_GETITEMCURRENTSOH(?,?) }");
proc.registerOutParameter(1, java.sql.Types.INTEGER);
proc.setString(2, locationCode);
proc.setString(3, itemCode);
proc.execute();
n = proc.getInt(1);Edited by: Chicon on Jul 5, 2009 7:48 PM -
How to get 2 return values from a single SelectInputText?
Hi,
I am using the std Search form,
The table I am using has fields like ID,Name,Status, and a few more
I use a SelectInputText(pop up the ID and Name list) and populate the result back on the Search page
What I am looking for is to have another output-text box on the search page which will show the Name corresponding the above selected ID.
Can I have more than 1 returnActionListener for the SelectInputText to return more than one value??
OR should I use something else?
Regards,
ZohebBut Frank, the SelectInputText automatically displays the returnEvent.getReturnValue() and I can't do anything about it. My ReturnListener method parses values from the hash table and assigns them to multiple fields on the screen. But the SelectInputText overwrites the value that I assign and displays the entire hashmap as the value of that field. The actual value displayed in the SelectInputText item ends up looking like this:
{KEY1=Key1Value, KEY2=Key2Value}
My ReturnListener method assigns the value Key2Value to field #2 (which is an InputText, not a SelectInputText) and it displays correctly.
My ReturnListener method assigns the value Key1Value to field #1 (which is the SelectInputText that launched the dialog) but instead of displaying Key1Value in the field, the page displays the entire hashmap in that field.
How can I force the SelectInputText to display "Key1Value" instead of "{KEY1=Key1Value, KEY2=Key2Value}"?
Maybe you are looking for
-
ERROR while uploading data from EXCEl to sap using ALSM_EXCEL FUNCION MODULE
Hi Experts, I am uploading excel data into sap suing function module ALSM_EXCEl_TO_INTERNAL_TABLE , used this funcion module in the program while running the program one blank excel sheet is opening and data is not uploading into internal table . eve
-
Dear SAP Gurus, I am working in SAP BSP. I have a table view, in that, I have concatenated date and time field. I want to create a filter there. Since it is concatenated, the filter is not working. Please help and guide me how to resolve it. Regards
-
SUM function for a column made 'on the fly'
I have access to a database, however only SELECT statements can be run on the database. Basically the database lists switches, these switches can have up to 20 computers connected to them but some do not. I need to know the switches which contail les
-
Error Code SSIS DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER.
SSIS Error Code DTS_E_OLEDB_EXCEL_NOT_SUPPORTED: The Excel Connection Manager is not supported in the 64-bit version of SSIS, as no OLE DB provider is available.
-
Cross-post: Multiple feature requests
Thanks to Jeff Schewe for pointing out the error of my ways in posting in the wrong thread. :) Sorry for the cross-post, but didn't want these suggestions to be missed. Hi everyone, Well, I've been using LR 1.1 for a couple of weeks now, and overall,