GetProcessFile() public method

流程定义的XML文件获取和保存
public GetProcessFile ( string processGUID, string version ) : ProcessFileEntity
processGUID string
version string
return Slickflow.Engine.Business.Entity.ProcessFileEntity
示例#1
0
 protected void InitFlowXmlInfo()
 {
     String ProcessGUID = Request.QueryString["ProcessGUID"] == null ? String.Empty : Request.QueryString["ProcessGUID"].ToString();
     if (ProcessGUID != String.Empty)
     {
         IWorkflowService wfService = new WorkflowService();
         ProcessFileEntity processFileEntity = wfService.GetProcessFile(ProcessGUID);
         if (processFileEntity != null)
         {
             this.txtProcessGUID.Value = processFileEntity.ProcessGUID.ToString();
             this.wfxml.InnerHtml = processFileEntity.XmlContent;
         }
     }
 }
示例#2
0
 /// <summary>
 /// 读取XML文件
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 public ResponseResult<ProcessFileEntity> QueryProcessFile(ProcessFileQuery query)
 {
     var result = ResponseResult<ProcessFileEntity>.Default();
     try
     {
         var wfService = new WorkflowService();
         var entity = wfService.GetProcessFile(query.ProcessGUID, query.Version);
         result = ResponseResult<ProcessFileEntity>.Success(entity);
     }
     catch (System.Exception ex)
     {
         result = ResponseResult<ProcessFileEntity>.Error(string.Format("获取流程XML文件失败!{0}", ex.Message));
     }
     return result;
 }