|
From: <je...@us...> - 2007-12-30 03:19:23
|
Revision: 1861
http://cogkit.svn.sourceforge.net/cogkit/?rev=1861&view=rev
Author: jenvor
Date: 2007-12-29 19:19:22 -0800 (Sat, 29 Dec 2007)
Log Message:
-----------
some small changes(remove debug statements...)
Modified Paths:
--------------
trunk/cyberaide/src/axis2/axis2ws_server/SimpleHandlerInterfaceSkeleton.java
trunk/cyberaide/src/axis2/axis2ws_server/StatusServiceInterfaceSkeleton.java
Modified: trunk/cyberaide/src/axis2/axis2ws_server/SimpleHandlerInterfaceSkeleton.java
===================================================================
--- trunk/cyberaide/src/axis2/axis2ws_server/SimpleHandlerInterfaceSkeleton.java 2007-12-30 00:29:27 UTC (rev 1860)
+++ trunk/cyberaide/src/axis2/axis2ws_server/SimpleHandlerInterfaceSkeleton.java 2007-12-30 03:19:22 UTC (rev 1861)
@@ -186,7 +186,7 @@
statusbw.close();
//exit = wfproc.exitValue();
//output = Integer.toString( exit );
- output = "succeeds!\n"+output;
+ output = "succeeds!\nLog:\n"+output;
wfproc.destroy();
} catch (IllegalThreadStateException e) {
wfproc.destroy();
@@ -357,12 +357,7 @@
input = new BufferedReader (new InputStreamReader(wfproc.getInputStream()));
boolean isfirstline = true;
while ((line = input.readLine()) != null) {
- if( isfirstline ){
- isfirstline = false;
- output += "WFSubmit_Firstline:"+line;
- }else{
- output += "\nWFSubmit_Following line:"+line;
- }
+ String msg = line;
/**
* Key point:
* Every time a new message is generated during execution of workflow, the
@@ -385,23 +380,30 @@
if( index == -1 ){
//this message is not status message, it is generated natively by
//original workflow.
- continue;
}else{
String path = line.substring(0, index);
- String msg = line.substring(index+1);
- int endindex = msg.lastIndexOf('|');
- String statuscodestr = msg.substring(endindex+1);
+ int endindex = line.lastIndexOf('|');
+ String statuscodestr = line.substring(endindex+1);
msg = msg.substring(index+1, endindex);
int statuscode = Integer.parseInt(statuscodestr);
_statusclient.notifyStatusOfElement(uid, wfid, path, statuscode, msg);
}
+
+ if( isfirstline ){
+ isfirstline = false;
+ //output += "WFSubmit_Firstline:"+line;
+ output += msg;
+ }else{
+ //output += "\nWFSubmit_Following line:"+line;
+ output += "\n" + msg;
+ }
}
input.close();
//notify status service that this workflow finishes executing
_statusclient.notifyStatusOfWF(uid, wfid, statuscodeCompleted, "workflow execution completed");
- output = "succeeds!\n"+output;
+ output = "succeeds!\nLog:\n"+output;
wfproc.destroy();
} catch (IllegalThreadStateException e) {
wfproc.destroy();
Modified: trunk/cyberaide/src/axis2/axis2ws_server/StatusServiceInterfaceSkeleton.java
===================================================================
--- trunk/cyberaide/src/axis2/axis2ws_server/StatusServiceInterfaceSkeleton.java 2007-12-30 00:29:27 UTC (rev 1860)
+++ trunk/cyberaide/src/axis2/axis2ws_server/StatusServiceInterfaceSkeleton.java 2007-12-30 03:19:22 UTC (rev 1861)
@@ -127,14 +127,9 @@
int statuscode = modifyStatusOfWholeWF7.getParam2();
String statusmsg = modifyStatusOfWholeWF7.getParam3();
- writeLog("modifyStatusOfWholeWF:"+struid+":"+wfid+":"+statuscode+":"+statusmsg+"\n");
-
UID uid = new UIDUsername(struid);
if( false == _db.setStatusOfWF(uid, wfid, statuscode, statusmsg) )
_msgcache.insertMsg(struid, wfid, Msg.MSGWHOLEWF, "", statuscode, statusmsg );
-
- String json = _db.getStatusByUID(uid).toJSON();
- writeLog(json+"\n");
}
/**
* Auto generated method signature
@@ -159,12 +154,6 @@
try{
String struid = getJSONStatusByUID3.getParam0();
- File file = new File("/tmp/json_request.txt");
- file.createNewFile();
- BufferedWriter bw = new BufferedWriter( new FileWriter(file) );
- bw.write("user:"+struid);
- bw.close();
-
UID uid = new UIDUsername(struid);
StatusList sl = _db.getStatusByUID(uid);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|