Ejemplo n.º 1
0
        public virtual JObject ReActive(HttpContext context)
        {
            YZRequest  request   = new YZRequest(context);
            int        taskid    = request.GetInt32("TaskID");
            JObject    jPost     = request.GetPostData <JObject>();
            string     comments  = (string)jPost["comments"];
            List <int> toStepIDs = jPost["toStepIDs"].ToObject <List <int> >();

            using (BPMConnection cn = new BPMConnection())
            {
                cn.WebOpen();

                BPMStepCollection newSteps = BPMTask.ReActive(cn, taskid, toStepIDs.ToArray(), comments);

                List <string> to = new List <string>();
                foreach (BPMProcStep step in newSteps)
                {
                    to.Add(String.Format("{0}[{1}]", step.NodeName, YZStringHelper.GetUserFriendlyName(step.RecipientAccount, step.RecipientFullName)));
                }

                JObject rv = new JObject();
                rv[YZJsonProperty.success] = true;
                rv["tosteps"] = String.Join(";", to.ToArray());

                return(rv);
            }
        }