|
发表于 2023-5-31 18:13:19
|
显示全部楼层
您好 我换一种方式 我在流程中添加了一个脚本活动 在执行脚本中加入代码
var items= this.data;
print('修改数据ID'+items.gongzid);//job 04707ec0-34c5-4ed2-a5f0-aeb5e528b8ad
var action= this.Actions.load("x_processplatform_assemble_surface");
var workid =items.gongzid;
var data={};
action.DataAction.getWithJob( //平台封装好的方法
workid, //uri的参数
function( json ){ //服务调用成功的回调函数, json为服务传回的数据
}.bind(this),
function( json ){ //服务调用失败的回调函数, json为服务传回的数据
print("getWithJob失败");
}.bind(this),
false
)
data.gwmc1 =items.gwmc1;//修改数据
data.zplx =items.zplx;//修改数据
print(JSON.stringify(data));
action.DataAction.updateWithJob(
workid, //uri的参数
data, //保存的数据
function(json){ //服务调用成功的回调函数
print("流程数据修改成功");
// o2.xDesktop.notice("success", {"y":"top", "x": "right"}, "保存成功"); //提示,{"y":"top", "x": "right"}指提示框在顶部右边
}.bind(this),
function( json ){ //服务调用失败的回调函数, json为服务传回的数据
print("流程数据修改失败");
//o2.xDesktop.notice("err", {"y":"top", "x": "right"}, "保存失败");
}.bind(this),
);
如果注销update方法 就可以print 出data数据
开启后就报错
2023-05-31 18:08:22.190 [ProcessPlatformExecutor-29] ERROR com.x.processplatform.service.processing.factory.ElementFactory - id:721b5c77-8ade-4553-8b95-07b509b02c13, name:com.x.processplatform.service.processing.factory.ElementFactory, message:<eval>:51:0 Expected an operand but found )
);
^ in <eval> at line number 51 at column number 0, exception:javax.script.ScriptException.
javax.script.ScriptException: <eval>:51:0 Expected an operand but found )
);
^ in <eval> at line number 51 at column number 0 |
|