MWF.xAction.RestActions.Action.x_processplatform_assemble_surface=new Class({Extends:MWF.xAction.RestActions.Action,exportView:function(t,e,i){this.action.invoke({name:"exportView",async:!0,data:i,parameter:{flag:e,applicationFlag:t},success:function(t){var e=this.action.actions.exportViewResult.uri;e=e.replace("{flag}",t.data.id),window.open(o2.filterUrl(this.action.address+e,"_blank"))}.bind(this)})},saveDictionary:function(t,e,i){t.id?this.updateDictionary(t,e,i):this.addDictionary(t,e,i)},updateDictionary:function(t,e,i){this.action.invoke({name:"updataDictionary",data:t,parameter:{applicationDictFlag:t.id,applicationFlag:t.application},success:e,failure:i})},addDictionary:function(t,e,i){t.id||this.getUUID(function(n){t.id=n,this.action.invoke({name:"addDictionary",data:t,success:e,failure:i})}.bind(this))},removeWork:function(t,e,i,n,a,o){i?this.action.invoke({name:"removeAllWork",async:o,parameter:{id:t,applicationId:e},success:n,failure:a}):this.action.invoke({name:"removeWork",async:o,parameter:{id:t,applicationId:e},success:n,failure:a})},getAttachmentData:function(t,e){this.action.getActions(function(){var i=this.action.actions.getAttachmentData.uri;i=(i=i.replace("{id}",encodeURIComponent(t))).replace("{workid}",encodeURIComponent(e)),window.open(o2.filterUrl(this.action.address+i))}.bind(this))},getWorkcompletedAttachmentData:function(t,e){this.action.getActions(function(){var i=this.action.actions.getWorkcompletedAttachmentData.uri;i=(i=i.replace("{id}",encodeURIComponent(t))).replace("{workCompletedId}",encodeURIComponent(e)),window.open(o2.filterUrl(this.action.address+i))}.bind(this))},getAttachmentStream:function(t,e){this.action.getActions(function(){var i=this.action.actions.getAttachmentStream.uri;i=(i=i.replace("{id}",encodeURIComponent(t))).replace("{workid}",encodeURIComponent(e)),window.open(o2.filterUrl(this.action.address+i))}.bind(this))},getWorkcompletedAttachmentStream:function(t,e){this.action.getActions(function(){var i=this.action.actions.getWorkcompletedAttachmentStream.uri;i=(i=i.replace("{id}",encodeURIComponent(t))).replace("{workCompletedId}",encodeURIComponent(e)),window.open(o2.filterUrl(this.action.address+i))}.bind(this))},getAttachmentUrl:function(t,e,i){this.action.getActions(function(){var n=this.action.actions.getAttachmentData.uri;n=(n=n.replace("{id}",encodeURIComponent(t))).replace("{workid}",encodeURIComponent(e)),i&&i(o2.filterUrl(this.action.address+n))}.bind(this))},getAttachmentWorkcompletedUrl:function(t,e,i){this.action.getActions(function(){var n=this.action.actions.getWorkcompletedAttachmentData.uri;n=(n=n.replace("{id}",encodeURIComponent(t))).replace("{workCompletedId}",encodeURIComponent(e)),i&&i(o2.filterUrl(this.action.address+n))}.bind(this))},getWorkDataByPath:function(t,e,i,n,a){var o=e.replace(/\./g,"/");t.workCompleted?this.action.invoke({name:"getWorkcompletedDataByPath",async:a,parameter:{id:t.workCompleted,path:o},success:i,failure:n,urlEncode:!1}):this.action.invoke({name:"getWorkDataByPath",async:a,parameter:{id:t.work,path:o},success:i,failure:n,urlEncode:!1})},getJobDataByPath:function(t,e,i,n,a){var o=e.replace(/\./g,"/");this.action.invoke({name:"getJobDataByPath",async:a,parameter:{id:t,path:o},success:i,failure:n,urlEncode:!1})},startWork:function(t,e,i,n,a){var o=i,c=n,r=t,s=e;"string"===o2.typeOf(t)&&(o=t,c=e,r=i,s=n),this.getProcess(o,function(t){"draft"==t.data.defaultStartMode?this.draw(o,c,r,s,a):this.createtWork(o,c,r,s,a)}.bind(this),s,a)}});