Quantcast
Channel: SCN : Unanswered Discussions - BI Platform
Viewing all articles
Browse latest Browse all 5661

Change publication status

$
0
0

I need change publication status from "PENDING" to "PAUSED" for wait long load ETL process.

After ETL Load is end, change publication status from "PAUSED" to "PENDING".

 

// Query
String sql = String.Format("query://{0}select * from CI_INFOOBJECTS WHERE SI_KIND='Publication'AND SI_SCHEDULE_STATUS=9 AND SI_NEXTRUNTIME>'{1}/{2}/{3}/00/00/00' AND SI_NEXTRUNTIME<'{4}/{5}/{6}/00/00/00' AND SI_Name IN ({7}) ORDER BY SI_ENDTIME DESC{8}",
'{', now.AddDays(-1).Year, now.AddDays(-1).Month, now.AddDays(-1).Day, now.AddDays(2).Year, now.AddDays(2).Month, now.AddDays(2).Day, Rep_Names, '}');
ResponseHolder rh = bipService.Get(sql, oGetOptions);            if (rh.InfoObjects.InfoObject == null || rh.InfoObjects.InfoObject.Length == 0)            {                Console.WriteLine("No waiting/paused publications");            }             else            {                //rh.InfoObjects.InfoObject[0].                foreach (InfoObject io in rh.InfoObjects.InfoObject)                {                    Publication p = (Publication)io;                                                         if (Is_Ok == 1)                    {                        p.SchedulingInfo.Status = ScheduleStatusEnum.PENDING;  //  RUNNING = 0, COMPLETE = 1, FAILURE = 2, PAUSED = 3, PENDING = 4                                         }                    else                    {                                              p.SchedulingInfo.Status = ScheduleStatusEnum.PAUSED;  //  RUNNING = 0, COMPLETE = 1, FAILURE = 2, PAUSED = 3, PENDING = 4                     //   p.SchedulingInfo.Outcome = ScheduleOutcomeEnum.FAIL_SCHEDULE;  //  RUNNING = 0, COMPLETE = 1, FAILURE = 2, PAUSED = 3, PENDING = 4                    }                                  }                bipService.Update(rh.InfoObjects); // COMMIT DATA TO CMS

but publication status NOT change!

 

How to change publication status ?


Viewing all articles
Browse latest Browse all 5661

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>