public void setWorkflowProcess(WorkflowProcess process)// throws  RuntimeException 
        {
            this.workflowProcess = process;

            this.ProcessId = workflowProcess.Id;
            this.Name = workflowProcess.Name;
            this.DisplayName = workflowProcess.DisplayName;
            this.Description = workflowProcess.Description;

            Dom4JFPDLSerializer ser = new Dom4JFPDLSerializer();
            //MemoryStream so = new MemoryStream();
            //try
            //{
            //    ser.serialize(workflowProcess, so);
            //    this.ProcessContent = Encoding.UTF8.GetString(so.ToArray());
            //}
            //catch
            //{
            //    throw;
            //}
            //finally
            //{
            //    if (so != null) so.Close();
            //}
            this.ProcessContent = ser.serialize(process);
        }
        public static void setWorkflowProcess(IWorkflowDefinition wdf, WorkflowProcess workflowProcess)
        {
            wdf.ProcessId = workflowProcess.Id;
            wdf.Name = workflowProcess.Name;
            wdf.DisplayName = workflowProcess.DisplayName;
            wdf.Description = workflowProcess.Description;

            Dom4JFPDLSerializer ser = new Dom4JFPDLSerializer();

            wdf.ProcessContent = ser.serialize(workflowProcess);
        }
Example #3
0
        // throws  RuntimeException
        public void setWorkflowProcess(WorkflowProcess process)
        {
            this.workflowProcess = process;

            this.ProcessId = workflowProcess.Id;
            this.Name = workflowProcess.Name;
            this.DisplayName = workflowProcess.DisplayName;
            this.Description = workflowProcess.Description;

            Dom4JFPDLSerializer ser = new Dom4JFPDLSerializer();
            MemoryStream so = new MemoryStream();
            try
            {
                ser.serialize(workflowProcess, so);
                this.ProcessContent = Encoding.UTF8.GetString(so.ToArray());
            }
            catch
            {
                throw;
            }
            finally
            {
                if (so != null) so.Close();
            }
        }