" Në të do të shikojmë veçori të reja që nuk kanë të bëjnë me ndërfaqen e sistemit, por zgjerojnë ndjeshëm funksionalitetin e ofruar të platformës 1C:Enterprise 8.
Zbatueshmëria
Artikulli diskuton versionin 8.3.4.437 të platformës 1C:Enterprise. I gjithë funksionaliteti i përshkruar në artikull është përditësuar në versionin 8.3.11.
Risi të tjera në 1C: Enterprise 8.3
Le të vazhdojmë të njihemi me risitë e platformës 1C:Enterprise 8.3.
Sfondi dhe detyrat rutinë në bazën e informacionit të skedarit
Në shumë konfigurime tipike platformash 8.2 kishte një konstante që tregonte përdoruesin nën të cilin ishin ekzekutuar detyrat në versionin e skedarit.
Kur sistemi filloi të funksiononte nën këtë përdorues, u lidh një mbajtës pritjeje, i cili thirri metodën e integruar të gjuhës me një periodicitet të caktuar ExecuteTaskProcessing().
Kjo qasje krijoi vështirësi dhe shqetësime shtesë për përdorimin e detyrave rutinë në bazën e të dhënave të skedarëve.
Kjo mund të jetë veçanërisht kritike kur punoni me konfigurime si p.sh "Automatizim gjithëpërfshirës" ose “Menaxhimi i Ndërmarrjeve Prodhuese”, në të cilat detyrat rregullatore luajnë një rol mjaft të rëndësishëm.
Nëse ky është skedari IB Atëherë
=
Constants.UserForExecutingRoutineTasksInFileVariant.Get();
Nëse chValueVariable("glCurrentUser")
=
UserTo ExecuteTaskRegl Pastaj
// me një interval prej sekondash quajmë procedurën e punës me detyra rutinë
SupportRegularTaskForFileVersion();
IntervalForPoll=
Constants.IntervalForPollingRoutineTasksInFileVariant.Get();
Nëse IntervalForPoll= E papërcaktuar
OSE IntervalForPoll= 0 Pastaj
IntervalForPoll=
60
;
FundNëse;
ConnectWaitHandler("Mbështetje për RoutineTaskForFileVersion",
IntervalForPoll);
FundNëse;
FundNëse;
Në platformë 8.3 zbatoi punën e sfondit dhe punëve rutinë në bazën e informacionit të skedarit pa përdorur thirrjen e metodës globale të kontekstit ExecuteTaskProcessing().
Detyrat në sfond dhe rutinë kryhen drejtpërdrejt në një nga aplikacionet e klientit (klient i hollë, i trashë) ose nga një shtesë e serverit në internet.
Një punë në sfond e nisur nga një sesion ekzekutohet nga i njëjti aplikacion klienti që e ka iniciuar atë.
Punët në sfond ekzekutohen në mënyrë sekuenciale, d.m.th. Në një aplikacion klienti, vetëm një detyrë në sfond (përfshirë ato rutinë) mund të ekzekutohet në të njëjtën kohë.
Detyrat rutinë kryhen vetëm nga një aplikacion klienti. Për të kontrolluar nisjen e detyrave të planifikuara, përdoret një çelës i linjës së komandës /AllowExecuteScheduledJobs.
Detyrat rutinë ekzekutohen nga aplikacioni i parë i klientit në rendin e fillimit, i cili nuk është i ndaluar të ekzekutojë detyra rutinë (për të ndaluar seancën, seanca duhet të nisë me parametrin e linjës së komandës /AllowExecuteScheduledJobs -Off).
Kur përfundon ai sesion, ekzekutimi kalon në cilindo nga sesionet e mbetura të ekzekutimit.
Nëse linja e nisjes së aplikacionit të klientit tregon në mënyrë eksplicite nevojën për të ekzekutuar detyra rutinë (në vijën e komandës tregohet /AllowExecuteScheduledJobs -Force), atëherë detyrat rutinë fillojnë të ekzekutohen mbi të, pavarësisht nga prania e seancave të tjera.
Detyrat rutinë përpunohen një herë në 60 sekonda.
Vini re se detyrat rutinë të zgjidhjes së aplikacionit (në versionin e skedarit) filluan të ekzekutohen jo më herët se 1 minutë pas lançimit të aplikacionit të klientit. Duke filluar me versionin 8.3.8, kjo kohë është dyfishuar, dhe për këtë arsye detyrat rutinë fillojnë të ekzekutohen maksimumi 2 minuta pas lëshimit të klientit (në versionin e skedarit).
Ky vendim vjen për shkak të zvogëlimit të vonesës në fillimin e aplikimit. Përveç kësaj, versioni 8.3.7 shtoi mundësinë për të përcaktuar shpejt se sesioni aktual është një seancë pune në sfond. Kjo zbatohet duke përdorur metodën e re të kontekstit global GetCurrentInfoBaseSession(), si dhe një metodë të re për sesionin e bazës së informacionit GetBackgroundTask().
Më poshtë është kodi që ilustron sa më sipër:
Për ta zmadhuar, klikoni në imazh.
Llogaritja e shumave të kontrollit
Platforma tani përfshin mekanizma për llogaritjen e shumave të kontrollit të të dhënave.
Le të kujtojmë se një checksum (hash) është një vlerë e llogaritur nga një grup të dhënash duke aplikuar një algoritëm të caktuar dhe përdoret për të verifikuar integritetin e të dhënave gjatë transmetimit ose ruajtjes.
Hashes mund të përdoren për të kontrolluar identitetin e të dhënave (për shembull, duhet të siguroheni që kur transferoni një skedar ai nuk është dëmtuar; kontrolloni nëse janë bërë ndryshime në skedar dhe nëse po, atëherë ngarkoni përsëri në bazën e të dhënave) .
Për këtë qëllim, një objekt u implementua në platformë Hashing Data, i disponueshëm në server, në klientin e trashë, lidhjen e jashtme dhe gjithashtu në serverin e aplikacionit celular.
Ky objekt ka dy mënyra: Shto () Dhe Shto skedar (), të cilat përditësojnë shumën hash duke marrë parasysh të dhënat e kaluara në parametra.
Platforma 8.3.4.437 mbështet llogaritjen e funksioneve hash të mëposhtme: CRC32, MD5, SHA1, SHA256. Por funksionet SHA1 Dhe SHA256 nuk mbështeten në platformën celulare.
Le të shohim një shembull të thjeshtë. Supozohet se në server në drejtorinë e programit ekziston një skedar " ragent.exe" Nevoja për të llogaritur MD5-shuma për këtë skedar.
Për ta bërë këtë, ne do të krijojmë një përpunim të jashtëm, në formën e të cilit do të vendosim komandën Llogaritni. Trajtuesi përmban kodin e mëposhtëm:
&OnClient
Llogaritja e procedurës (Komanda)
Rezultati = CalculateOnServer();
Raporti(String(Rezultati));
Fundi i procedurës
&Në server
Funksioni CalculateOnServer()
Hash = E re Hashing Data(HashFunction.MD5);
Hash.AddFile(Programet e Katalogut() + "ragent.exe");
Kthimi Hash.HashSum ;
Funksioni i Fundit
Në platformën e botimit 8.3.10+ në metodë Shto () Objekt Hashing Data U bë e mundur përdorimi i një rryme të dhënash binare, të cilat thjeshtuan shumë përdorimin e tyre në zgjidhjen e problemeve të ndryshme të aplikuara të përditësimit të shumave hash.
Puna me versionet e mbrojtura të protokolleve SMTP/POP3
Në platformë 8.3 u bë e mundur përdorimi i versioneve të mbrojtura të protokolleve SMTP/POP3(ka terma SMTPS/POP3S ose SSLSMTP/SSLPOP3).
Për objekt InternetMailProfile pronat e reja të zbatuara:
- Përdorni SSLSMTP;
- Përdor SSLPOP3;
- Vetëm SecureAuthenticationSMTP;
- Vetëm vërtetimi i sigurt POP3.
Vetitë Autentifikimi SMTP Dhe Autentifikimi POP3 Objekt InternetMailProfile, si dhe transfertat Metoda e vërtetimit SMTPA Dhe Metoda e vërtetimit POP3 Nuk rekomandohet përdorimi i tyre - ato mbështeten për pajtueshmëri.
Duke përdorur një protokoll të sigurt SMTPS bën të mundur dërgimin e postës nga 1C duke përdorur një kuti postare Google.
Le të shohim një shembull. Në formular do të vendosim fusha për futjen e temës së letrës dhe adresën e marrësit, dhe për futjen e tekstit të letrës - një fushë dokumenti të formatuar.
Për ta zmadhuar, klikoni në imazh.
Kur shtypni butonin Dërgo Kodi i mëposhtëm do të ekzekutohet:
&OnClient
Procedura Dërgimi (Komanda) Mail = New InternetMail; Profili = I ri InternetMailProfile;
Profili.SMTPSAdresa e serverit= “smtp.googlemail.com” ;
Profili.PërdoruesiSMTP=
“[email i mbrojtur]”
;
Profili.FjalëkalimiSMTP= "FALËKALIMI" ;
Profili.PërdorSSLSMTP= E vërtetë;
Profili.SMTPPport = 465 ; Përpjekje
Mail.Lidhu(Profili);
Përjashtim
Raporti(Përshkrimi i Gabimit());
Kthimi ;
Përpjekja e Fundit; MailMessageText=
“”
;
Shtojcat = Struktura e re;
Teksti.GetHTML(MailMessageText, Shtojcat ); Mesazhi i Postës= E re Mesazhi i Postës në Internet;
MailMessage.Marrësit.Shto(Kujt );
MailMessage.Subject= Subjekti;
MailMessage.Texts.Add(MailMessageText,
MailMessageTextType.HTML); Mail. Dërgo ( Mesazhi i Postës);
Postë. Shkëputeni();
Fundi i procedurës
Vini re se në shembullin tonë, nëse serveri SMTP nuk ishte në gjendje t'i dërgonte një email marrësit(ve), atëherë metoda Mail.Send(Mesazhi i Postës) hodhi një përjashtim. Kjo shkaktoi disa shqetësime për zhvilluesit, sepse... Arsyeja e hedhjes së përjashtimit nuk ishte e qartë.
Në versionin 8.3.9, kjo sjellje ka ndryshuar dhe tani metoda Send() kthen një përputhje, çelësi i së cilës është marrësi dhe vlera e së cilës është diagnostikimi nga serveri i postës. Kjo ju lejon të përcaktoni me saktësi arsyet e dështimit për t'i dërguar një mesazh emaili secilit marrës. Në modalitetin e përputhshmërisë me versionin 8.3.8, sjellja nuk ka ndryshuar.
Printim me dy anë
Në platformë 8.2 Vetë platforma nuk menaxhoi printimin dyfish, ky funksion mund të kontrollohej vetëm duke përdorur drejtuesin e printerit.
Në platformë 8.3 u bë i mundur kontrolli i printimit të dyfishtë për një dokument fletëllogaritëse, një diagram grafik (nga gjuha e integruar dhe në mënyrë interaktive) dhe një dokument teksti (vetëm interaktiv).
Regjistrimet e sistemit u shfaqën në gjuhën e integruar:
- Lloji i printimit dyfish(Asnjë, FlipUp, FlipLeft);
- (Auto, MirrorTop, MirrorLeft, Mos përdorni).
Dhe për objektet Dokument tabelor Dhe Skema grafike u shfaqën vetitë Printim me dy anë Dhe Alternimi i rregullimeve të faqeve, me të cilin mund të ndryshoni paraqitjen e faqeve të printuara.
Në versionin 8.3.9 të platformës, numërimi i sistemit DuplexPrintType ka një vlerë të re të shtuar Përdorni Cilësimet e Printerit. Zgjedhja e kësaj vlere ju lejoi të përdorni cilësimet e printerit kur printoni dokumente të sistemit. Në modalitetin e përputhshmërisë 8.3.8, sjellja është e pandryshuar dhe cilësimet përkatëse të printerit shpërfillen.
Dialogu për publikimin e një baze informacioni në një server ueb është bërë më funksional. Tani publikimi nga konfiguruesi ju lejon të vendosni të gjithë parametrat e skedarit default.vrd.
Për dialogun për publikimin e një klienti në internet dhe shërbimeve të uebit përmes konfiguruesit, zbatohet si më poshtë:
- aftësia për të kontrolluar disponueshmërinë e shërbimeve të Uebit si parazgjedhje (atribut pointEnableCommon element ws);
- aftësia për të kontrolluar ekzekutimin e punëve në sfond në versionin e skedarit (atribut lejoj ekzekutimin e punëve të planifikuara element ws).
Nëse kutia e kontrollit "Publikoni shërbimet e uebit sipas parazgjedhjes" në faqerojtësin "Bazë"është instaluar, atëherë kur përditësohet botimi, shërbimet e zgjedhura të ueb-it do të publikohen automatikisht.
Përndryshe, shërbimet e Uebit do të shënohen si të papublikueshme. Ky flamur korrespondon me atributin pointEnableCommon element ws në dosje default.vrd, i destinuar për konfigurimin e një klienti në internet dhe shërbimeve të uebit.
atribut pointEnableCommon Elementi ws është përgjegjës për mundësinë e përdorimit në këtë bazë informacioni shërbime ueb që publikohen pa treguar në mënyrë të qartë lejen për përdorim (atributi mundësojnë element pikë).
Nëse atributi ka një vlerë e vërtetë, pastaj të gjitha shërbimet e uebit për të cilat vlera e atributit nuk është specifikuar në mënyrë eksplicite mundësojnë element pikë, do të lejohet për përdorim.
Përndryshe, përdorimi i shërbimeve të tilla Web do të ndalohet.
Cilësimet "Punët në sfond në modalitetin e skedarit" përputhet me atributin lejoj ekzekutimin e punëve të planifikuara elementi ws në skedar default.vrd.
atribut lejoj ekzekutimin e punëve të planifikuara kontrollon aftësinë për të ekzekutuar detyra rutinë nga zgjerimi i serverit të uebit për versionin e skedarit të bazës së informacionit.
Atributi mund të marrë vlerat e mëposhtme:
- fikur– në këtë rast, zgjerimi i serverit në internet nuk do të kryejë detyra rutinë. Detyrat rutinë do të kryhen nga një aplikacion klienti (nëse ekziston), i cili lidhet drejtpërdrejt me bazën e informacionit, pa përdorur një server në internet.
- forcë– në këtë rast, zgjerimi i serverit të uebit do të kryejë detyra rutinë.
Nëse vlera e këtij atributi nuk është e specifikuar, atëherë detyrat rutinë do të kryhen nga aplikacioni me të cilin do të bëhet lidhja e parë me infobazën.
Dritarja e publikimit në shërbimin në internet është bërë edhe më e përshtatshme dhe ergonomike në versionin aktual të platformës. Tani parametrat që përshkruajnë vërtetimin e OpenID vendosen në një skedë të veçantë.
Numërimi i objekteve të infobazës
Në platformë 8.3 Mekanizmi për numërimin automatik të objekteve të bazës së informacionit është ripunuar. Unike e një numri ose kodi (përfshirë ato të marra si rezultat i gjenerimit automatik të një numri ose kodi) kontrollohet gjithmonë kur regjistrohet një objekt.
Një tregues se cili numër ose kod nuk është unik është shtuar në tekstin e mesazhit për shkeljen e veçantisë së një numri ose kodi.
Përdorimi i një numri ose kodi të lirë ka ndryshuar. Një numër ose kod i ri caktohet pa përdorur numra ose kode të lëshuara nëse tashmë ka numra ose kode të lëshuara me një parashtesë më të madhe (në renditje) të numrit ose kodit.
Funksionet agregate të gjuhës së shprehjes së sistemit të përbërjes së të dhënave
Funksionet e reja agregate zbatohen në gjuhën e shprehjes së sistemit të përbërjes së të dhënave:
- Çdo();
- Çdo ();
- Standard DeviationofPopulation();
- StandardSampleDeviation();
- VarianceSamples();
- Varianceofpopulacioni();
- KovariancaPopullsia();
- SampleKovarianca();
- Korrelacioni ();
- RegressionSlope();
- RegresionSegment();
- Numri i Regresionit();
- RegresioniR2();
- RegressionAverageX();
- RegresioniMesatarY();
- RegressionAverageSXX();
- RegressionAverageSYY();
- RegresioniAverageSXY().
Siç tregojnë emrat, këto janë funksione statistikore, që do të thotë se zhvilluesit kanë mundësinë të krijojnë raporte komplekse pa pasur nevojë të zhvillojnë procedura për llogaritjen e të dhënave statistikore.
Për ta zmadhuar, klikoni në imazh.
Siç mund ta shihni nga figura, nuk ka funksione të reja në listën rënëse, por nëse i vendosni ato me dorë, nuk do të ketë asnjë mesazh gabimi dhe raporti do të gjenerohet:
Gjithashtu me interes është një veçori e re Klasifikimi ABC(). Rezultati i funksionit do të jetë numri i klasës, duke filluar nga 1 (1 korrespondon me klasën A, 2 me klasën B, 3 me klasën C, etj.).
Le të demonstrojmë se si funksionon ky funksion. Le të krijojmë një raport të ri të jashtëm "Klasifikimi i mallrave" në bazë të kërkesës:
ZGJIDHNI
Konsumi i produktitProduktet.Produkti,
Konsumi i produktitProduktet.Sasia
NGA
Dokumenti.Konsumimi i Mallrave.Mallrat SI Konsumi i produktitProdukte
Le të përcaktojmë një fushë të re të llogaritur Klasa:
Për ta zmadhuar, klikoni në imazh.
Le të konfigurojmë burimet si më poshtë:
Për ta zmadhuar, klikoni në imazh.
Në modalitetin e përdoruesit, raporti duket si ky:
Si përfundim, vërejmë se nga edicioni në botim në platformën 1C 8.3 mekanizmi ACS po përmirësohet dhe rafinohet vazhdimisht, dhe brenda kuadrit të artikullit tonë "i ri" nuk është e mundur të prezantohen plotësisht këto ndryshime. Po, kjo duket e panevojshme, sepse kur punoni në versionin aktual të platformës, gjithmonë mund të përdorni sisteme të ndryshme ndihmëse për t'ju ndihmuar të analizoni këtë apo atë aspekt të funksionimit të këtij mekanizmi.
Për më tepër, mos harroni për kursin tonë të veçantë Zhvillimi profesional i raporteve në 1C 8.3 mbi Sistemin e Përbërjes së të Dhënave, i cili zbërthen në atom të gjitha hollësitë dhe kurthet kur punoni me këtë mekanizëm. Shikoni vetë demonstrimin.
Pra, le të përmbledhim rezultatet e ndërmjetme. Deri në këtë pikë, jemi njohur me aftësitë e reja të ndërfaqes Taxi dhe formularët e menaxhuar, si dhe me disa aftësi të paparashikuara më parë të vetë platformës. Tani është koha për të parë se cilat veçori të përshtatshme janë bërë të disponueshme për zhvilluesin në konfigurues.
Shpesh, gjatë mbajtjes së të dhënave, ekziston nevoja për të kryer periodikisht veprime të caktuara pa ndërhyrjen e përdoruesit. Detyrat rutinë dhe në sfond në 1C janë ato mekanizma që ofrohen për këtë qëllim në versionin e tetë të programit dhe lejojnë:
- Vendosni dorëzimin në kohë të dokumenteve;
- Llogaritni bilancet dhe totalet;
- Siguroni frekuencën e postimeve;
- Kontrolloni dhe fshini të dhënat e parëndësishme.
Sfondi dhe detyra e planifikuar - çfarë është dhe ku është konfiguruar?
Një detyrë rutinë është një mekanizëm i integruar në 1C që ju lejon të konfiguroni dhe, në përputhje me orarin dhe frekuencën e vendosur, të kryeni një sekuencë të caktuar veprimesh.
Një punë në sfond është një veprim i krijuar nga një operacion rutinë dhe nuk kërkon pjesëmarrjen e drejtpërdrejtë të përdoruesit.
Një detyrë rutinë krijohet në modalitetin e konfiguruesit:
- Në dritaren e pemës së konfigurimit gjejmë degën përkatëse (Fig. 1);
- Klikoni butonin shto;
- Në dritaren që hapet, duhet të specifikoni një emër që ju lejon të identifikoni objektin në konfigurim;
Fig.2
- Përballë mbishkrimit “Schedule” (Fig. 2) ka mbishkrimin “Open”, duke klikuar mbi të cilin hapet një dritare për vendosjen e kohës dhe shpeshtësisë së ekzekutimit të mbajtësit (Fig. 3);
Fig.3
- Është gjithashtu e nevojshme të plotësohet "Emri i metodës" (këtu do të futet emri i procedurës së thirrur nga moduli i përgjithshëm dhe që përshkruan algoritmin e sjelljes së programit);
- Fushat "Emri" dhe "Key" ju lejojnë të gruponi objekte;
- Kutia e zgjedhur "Përdor" tregon aktivitetin e operacionit të planifikuar;
- "I paracaktuar" duhet të vendoset nëse mbajtësi duhet të lëshohet menjëherë pasi të shtohet në bazën e të dhënave, përndryshe nisja mund të bëhet nga përpunimi përkatës (më shumë rreth tij më poshtë);
- Parametrat "Numri i riprovave" dhe "Intervali i riprovës" përshkruajnë sjelljen e programit nëse ndodh një përjashtim gjatë ekzekutimit të një pune në sfond.
Pra, duke përdorur mekanizmin e operacioneve rutinë, mund të vendosni orarin dhe veprimet kryesore të punëve në sfond. Tani le të shohim veçoritë e tyre.
Karakteristikat e punëve në sfond
Karakteristika kryesore e këtij mekanizmi është se procesi i sfondit funksionon në mënyrë asinkrone.
Çfarë do të thotë kjo? Fakti është se me një model pune sinkron, nëse ekzekutohet ndonjë algoritëm, ndërfaqja e përdoruesit bllokohet. Në rastin tonë, përdoruesi mund të vazhdojë të fusë dhe modifikojë të dhënat edhe nëse procedura është duke u ekzekutuar. Modeli i programimit asinkron përfshin ndarjen e fijeve llogaritëse.
Kështu, punët në sfond në 1C mund të krijojnë proceset e tyre, duke shpërndarë llogaritjet nëpër serverë të ndryshëm të përfshirë në të njëjtin grup.
Karakteristikat e punës në modalitetin klient-server
- Planifikimi dhe kontrolli i ekzekutimit kryhet nga një planifikues nga një grup serverësh;
- Nëse shfaqet një kërkesë për ekzekutim, planifikuesi kërkon proceset e punonjësve të grupimit me ngarkesë minimale dhe u shpërndan atyre detyra për ekzekutim;
- Çdo proces mund të kryejë llogaritje të shumta paralele;
- Pasi arrin një detyrë, procesi lidhet me bazën e të dhënave dhe ekzekuton algoritmin në të;
- Procesi i raporton rezultatet te planifikuesi.
Punët në sfond në modalitetin e skedarit
Përpara versionit të platformës 8.3.3.641, puna me punët në sfond në versionin e skedarit paraqiti disa vështirësi:
- Ishte e nevojshme të niste një seancë e veçantë që do të funksiononte gjatë gjithë kohës, duke zëvendësuar planifikuesin;
- Ky sesion duhet të ketë ekzekutuar periodikisht metodën RunJobProcessing().
Pas përditësimit, çdo fillim i klientëve të trashë dhe të hollë, nëse çelësi AllowExecuteScheduledJobs është specifikuar në cilësimet e nisjes (Fig. 4) në fushën "Shtesë", fillon një fill shtesë për t'u lidhur me bazën e të dhënave, e cila nuk ndikon në puna e përdoruesit në çfarëdo mënyre, por kryen vetëm punë në sfond.
Fig.4
Duhet të kihet parasysh se edhe në versionin e skedarit të punës, proceset e sfondit nuk lejojnë punën interaktive me përdoruesin (mesazhet e shërbimit, paralajmërimet dhe pyetjet nuk do të shfaqen). Kjo do të thotë, ato duhet të kodohen sikur do të ekzekutoheshin në anën e serverit.
Si të çaktivizoni detyrat e planifikuara
Detyrat e papërdorura mund të çaktivizohen thjesht duke hequr zgjedhjen e kutisë "Përdor" në vetitë e objektit.
Në rastin kur administratori duhet të ndalojë përdorimin e operacioneve rutinë dhe të sfondit për të gjithë bazën e të dhënave në tërësi (për shembull, disa baza të dhënash ruhen në server, nga të cilët vetëm një është kryesori, dhe pjesa tjetër përdoret vetëm për zhvillim), është e nevojshme të përdorni mjetin e administrimit të bazës së të dhënave. Ju gjithashtu mund të kontrolloni kutinë "Vendosni bllokimin e detyrave rutinë" në bazën e të dhënave të krijuar në server.
Për më tepër, disqet ITS kanë një "Task Console" të veçantë përpunimi, i cili ju lejon të modifikoni orarin e proceseve në sfond dhe të ndryshoni aktivitetin e tyre.
Mekanizmi i detyrës është një nga mjetet e administrimit të 1C. Ai përfshin:
- detyrat rutinë, si një objekt i përgjithshëm konfigurimi i nevojshëm për të treguar se çfarë saktësisht duhet bërë dhe me çfarë frekuence;
- dhe punët e sfondit, si një objekt gjuhësor i integruar i krijuar nga punët rutinë.
Pyetja 09.59 e provimit 1C: Platforma Professional. Një kopje e detyrës rutinë:
- mund të krijohen në mënyrë programore
- mund të krijohet në formën e një liste, e aksesueshme përmes komandës së menusë kryesore të programit ("Operacionet/Detyrat rutinë")
- vetëm një shembull krijohet gjithmonë (kur krijohet objekti i konfigurimit përkatës)
- përcaktohet vetëm në modalitetin e konfigurimit në skedën Tjetër duke përdorur butonin "Përbërja".
- përgjigjet 1 dhe 2 janë të sakta
Pyetja 09.60 e provimit 1C: Platforma Professional. Numri i detyrave rutinë të kryera njëkohësisht mund të jetë:
- kushdo pa kufizim
- çdo numër, por dy punë me të njëjtin çelës dhe emër të metodës nuk do të ekzekutohen
- çdo sasi, por dy detyra me të njëjtin çelës dhe emër nuk do të ekzekutohen
- çdo numër, por nuk do të ekzekutojë dy punë me të njëjtin çelës dhe të lidhur me të njëjtin objekt meta të dhënash
Pyetja 09.62 e provimit 1C: Platforma profesionale. Si metodë e caktimit rutinë, mund të përdoret një procedurë në të cilën:
- nuk duhet të ketë parametra
- mund të ketë vetëm një parametër (lista e vlerave)
- mund të ketë vetëm një parametër (strukturë)
- mund të ketë vetëm një parametër (array)
- mund të ketë çdo numër parametrash
Pyetja 09.63 e provimit 1C: Platforma profesionale. Për të krijuar një detyrë rutinë, përdoruesi duhet të ketë:
- të drejtat e administratorit
- të drejtat për të përdorur këtë objekt konfigurimi (të konfigurueshme në rol)
- të drejtat për të krijuar instanca të reja të këtij objekti konfigurimi (të konfigurueshme në rol)
- çdo të drejtë, metoda rutinë e detyrës ekzekutohet në modalitetin e privilegjuar
Pyetja 09.64 e provimit 1C: Platforma Professional. Nëse një detyrë rutinë është përcaktuar në konfigurues (në objektin përkatës të konfigurimit) si e paracaktuar, atëherë është tipike për të (zgjidhni përgjigjen më të plotë):
- është e pamundur të krijosh një shembull jo të paracaktuar të një detyre rutinë me një lidhje me një objekt meta të dhënash të një detyre rutinë të paracaktuar
- një shembull i paracaktuar i një detyre të planifikuar nuk mund të shënohet për fshirje dhe fshirje
- vetëm instancat e paracaktuara të detyrave rutinë ruhen në bazën e informacionit;
- përgjigjet 1 dhe 2 janë të sakta
- përgjigjet 2 dhe 3 janë të sakta
- përgjigjet e sakta 1, 2, 3
Pyetja 09.67 e provimit 1C: Platforma profesionale. Nëse një funksion përdoret si metodë rutinë e detyrës, atëherë:
- vlera e kthyer e funksionit nuk merret parasysh
- ndodh një gabim gjatë përpjekjes për të ekzekutuar një detyrë
- sistemi do të presë për ekzekutimin e kësaj detyre (ekzekutimi nuk do të ndodhë në mënyrë asinkrone)
- vlera do të kthehet në parametrin përkatës të detyrës së planifikuar
Pyetja 09.61 e provimit 1C: Platforma Professional. Si mund të lidhen me njëra-tjetrën detyrat rutinë dhe ato të sfondit?
- Një punë e planifikuar mund të gjenerojë një punë në sfond
- Një detyrë rutinë gjeneron domosdoshmërisht një detyrë në sfond
- Një punë në sfond gjeneron domosdoshmërisht një punë të planifikuar
- Nuk ka lidhje
Pyetja 09.65 e provimit 1C: Platforma Professional. Për të siguruar funksionimin e punëve rutinë dhe të sfondit, duhet:
- disponueshmëria e 1C: Nisja e ndërmarrjes me flamurin "Scheduler" të vendosur në fillim
- disponueshmëria e 1C: Nisja e ndërmarrjes me metodën përkatëse të sistemit të ekzekutuar periodikisht
- prania e një nisjeje 1C: Enterprise me metodën përkatëse të sistemit të ekzekutuar në mënyrë periodike (por vetëm në versionin e skedarit të funksionimit të sistemit)
- si në versionet e skedarëve ashtu edhe në versionet klient-server, nuk ka nevojë të nisni një shembull 1C: Enterprise
Sipas përgjigjeve, përgjigja e saktë është e katërta.
Pyetja 09.57 e provimit 1C: Platforma profesionale. Punët në sfond ju lejojnë të:
- kryejnë procedurën sipas planit
- ekzekutoni procedurën në mënyrë asinkrone
- rinisni në rast të ndërprerjes jonormale
- përgjigjet 1 dhe 2 janë të sakta
- përgjigjet 2 dhe 3 janë të sakta
- përgjigjet e sakta 1, 2, 3
Pyetja 09.58 e provimit 1C: Platforma profesionale. Numri i punëve në sfond që ekzekutohen njëkohësisht mund të jetë:
- kushdo pa kufizim
- vetëm një detyrë për bazë informacioni
- vetëm një detyrë për sesion të përdoruesit
- çdo numër, por nuk mund të ekzekutoni dy punë me të njëjtin çelës dhe emër të metodës
- çdo sasi, por nuk mund të ekzekutoni dy detyra me të njëjtin çelës dhe emër
- çdo numër, por nuk mund të ekzekutoni dy punë me të njëjtin çelës dhe të lidhur me të njëjtin objekt meta të dhënash
Pyetja 09.66 e provimit 1C: Platforma Professional. Punët e përfunduara në sfond:
- ruajtur në infobazë
- janë objekte të sesionit, të ruajtura për ca kohë (nuk ruhen në bazën e informacionit)
- nuk ruhen në asnjë formë
Mekanizmi i punës
Motori i punës është krijuar për të kryer çdo aplikacion ose funksionalitet në një orar ose në mënyrë asinkrone.
Mekanizmi i detyrës zgjidh problemet e mëposhtme:
- Aftësia për të përcaktuar procedurat rregullatore në fazën e konfigurimit të sistemit;
- Ekzekutimi i veprimeve të specifikuara sipas planit;
- Bërja e një thirrjeje në një procedurë ose funksion të caktuar në mënyrë asinkrone, d.m.th. pa pritur përfundimin e tij;
- Ndjekja e progresit të një detyre specifike dhe marrja e statusit të saj të përfundimit (një vlerë që tregon nëse ishte e suksesshme apo jo);
- Marrja e një liste të detyrave aktuale;
- Aftësia për të pritur për të përfunduar një ose më shumë detyra;
- Menaxhimi i punës (mundësia e anulimit, bllokimi i ekzekutimit, etj.).
Mekanizmi i punës përbëhet nga komponentët e mëposhtëm:
- Meta të dhënat e detyrave rutinë;
- Detyrat e rregullta;
- Punë në sfond;
- Programuesi i detyrave.
Punët në sfond janë krijuar për të kryer detyrat e aplikacionit në mënyrë asinkrone. Detyrat e sfondit zbatohen duke përdorur gjuhën e integruar.
Detyrat e planifikuara - të dizajnuara për të kryer detyrat e aplikuara në një orar. Detyrat rutinë ruhen në bazën e informacionit dhe krijohen në bazë të meta të dhënave të përcaktuara në konfigurim. Meta të dhënat e një detyre rregullatore përmbajnë informacione të tilla si emri, metoda, përdorimi, etj.
Një detyrë rutinë ka një plan që përcakton se në cilat kohë duhet të ekzekutohet metoda e lidhur me detyrën rutinë. Orari, si rregull, specifikohet në bazën e informacionit, por gjithashtu mund të specifikohet në fazën e konfigurimit (për shembull, për detyrat rutinë të paracaktuara).
Planifikuesi i detyrave përdoret për të planifikuar ekzekutimin e detyrave rutinë. Për çdo punë të planifikuar, planifikuesi kontrollon periodikisht nëse data dhe ora aktuale përputhen me orarin e punës së planifikuar. Nëse përputhet, planifikuesi e cakton atë detyrë për ekzekutim. Për ta bërë këtë, për këtë detyrë të planifikuar, planifikuesi krijon një detyrë sfondi, e cila kryen përpunimin aktual.
Punë në sfond
Punët në sfond janë të përshtatshme për t'u përdorur për të kryer llogaritje komplekse kur rezultati i llogaritjes mund të marrë shumë kohë për t'u marrë. Motori i punës ka mjetet për të kryer llogaritje të tilla në mënyrë asinkrone.
E lidhur me një punë në sfond është një metodë që thirret kur ekzekutohet puna në sfond. Një metodë e punës në sfond mund të jetë çdo procedurë ose funksion i një moduli të përbashkët jo-global që mund të thirret në server. Parametrat e punës në sfond mund të jenë çdo vlerë që lejohet të kalojë në server. Parametrat e një pune në sfond duhet të përputhen saktësisht me parametrat e procedurës ose funksionit që ajo thërret. Nëse metoda e punës së sfondit është një funksion, vlera e saj e kthyer shpërfillet.
Një punë në sfond mund të ketë një çelës - çdo vlerë aplikimi. Çelësi prezanton një kufizim në nisjen e punëve në sfond - vetëm një punë në sfond mund të ekzekutohet për njësi kohore me një vlerë të veçantë kyç dhe një emër të caktuar të metodës së punës në sfond (emri i metodës përbëhet nga emri i modulit dhe emri i procedurës ose funksion). Tasti ju lejon të gruponi punët e sfondit që kanë të njëjtat metoda sipas një karakteristike specifike të aplikacionit, në mënyrë që të mos ekzekutohet më shumë se një punë në sfond brenda një grupi.
Punët në sfond krijohen dhe menaxhohen në mënyrë programore nga çdo lidhje. Çdo përdorues lejohet të krijojë një punë në sfond. Për më tepër, ai ekzekutohet në emër të përdoruesit që e ka krijuar atë. Një përdorues me të drejta administrative ose përdoruesi që ka krijuar këto punë në sfond lejohet të marrë detyra, si dhe të presë përfundimin e tyre, nga çdo lidhje.
Një punë në sfond është një objekt thjesht sesioni dhe nuk i përket asnjë sesioni të përdoruesit. Për çdo detyrë, krijohet një sesion i veçantë i sistemit, i cili funksionon në emër të përdoruesit që bëri thirrjen. Punët në sfond nuk kanë gjendje të qëndrueshme.
Një punë në sfond mund të krijojë punë të tjera në sfond. Në versionin klient-server, kjo ju lejon të paralelizoni llogaritjet komplekse në proceset e punonjësve të grupimeve, të cilat mund të përshpejtojnë ndjeshëm procesin e llogaritjes në tërësi. Paralelizimi zbatohet duke krijuar disa punë në sfond për fëmijë dhe duke pritur që secila prej tyre të përfundojë në punën kryesore të sfondit.
Punët në sfond që përfundojnë me sukses ose dështojnë ruhen për 24 orë dhe më pas fshihen. Nëse numri i punëve të përfunduara në sfond kalon 1000, fshihen gjithashtu punët më të vjetra në sfond.
Detyrat e planifikuara
Detyrat e planifikuara përdoren kur është e nevojshme të kryhen veprime të caktuara periodike ose një herë sipas një plani.
Detyrat e planifikuara ruhen në bazën e informacionit dhe krijohen në bazë të meta të dhënave të detyrës rutinë të përcaktuar në konfigurim. Metadata specifikon parametra të tillë të një detyre rutinë si: metoda e quajtur, emri, çelësi, mundësia e përdorimit, shenja e paracaktimit, etj. Kur krijoni një detyrë rutinë, mund të specifikoni gjithashtu orarin (mund të specifikohet në metadata), vlerat . i parametrave të metodës, emri i përdoruesit në emër të të cilit kryhen detyrat rutinë, etj.
Krijimi dhe menaxhimi i detyrave të planifikuara kryhet në mënyrë programore nga çdo lidhje dhe lejohet vetëm për përdoruesit me të drejta administrative.
Shënim. Kur punoni në versionin e skedarit, është e mundur të krijoni dhe modifikoni detyra rutinë pa nisur programuesin e detyrave.
E lidhur me një detyrë rutinë është një metodë që thirret kur ekzekutohet detyra rutinë. Metoda rutinë e detyrës mund të jetë çdo procedurë ose funksion i një moduli të përbashkët jo-global që mund të thirret në server. Parametrat e një detyre rutinë mund të jenë çdo vlerë që lejohet të transmetohet në server. Parametrat e një detyre rutinë duhet të përputhen saktësisht me parametrat e procedurës ose funksionit që ajo thërret. Nëse metoda e detyrës rutinë është një funksion, atëherë vlera e saj e kthyer shpërfillet.
Një detyrë rutinë mund të ketë një çelës - çdo vlerë aplikacioni. Çelësi paraqet një kufizim në nisjen e detyrave të planifikuara, sepse për njësi kohore, midis detyrave rutinë të lidhura me të njëjtin objekt meta të dhënash, mund të ekzekutohet vetëm një detyrë rutinë me një vlerë të caktuar kyç. Tasti ju lejon të gruponi detyrat rutinë të lidhura me të njëjtin objekt të meta të dhënave sipas një karakteristike specifike të aplikacionit, në mënyrë që të mos kryhet më shumë se një detyrë rutinë brenda një grupi.
Gjatë konfigurimit, mund të përcaktoni detyra rutinë të paracaktuara. Detyrat rutinë të paracaktuara nuk ndryshojnë nga detyrat e zakonshme rutinë, përveç se ato nuk mund të krijohen ose fshihen në mënyrë të qartë. Nëse në meta të dhënat e detyrës së planifikuar është vendosur shenjë e një detyre rutinë të paracaktuar, atëherë kur përditësoni konfigurimin në bazën e informacionit, do të krijohet automatikisht një detyrë rutinë e paracaktuar. Nëse flamuri i paracaktuar pastrohet, atëherë kur përditësohet konfigurimi në bazën e informacionit, detyra rutinë e paracaktuar do të fshihet automatikisht. Vlerat fillestare të vetive të një detyre të planifikuar të paracaktuar (për shembull, një orar) vendosen në meta të dhënat. Në të ardhmen, kur aplikacioni të funksionojë, ato mund të ndryshohen. Detyrat rutinë të paracaktuara nuk kanë parametra.
Orari i detyrave rutinë përcakton se në cilën orë duhet të ekzekutohet detyra rutinë. Orari ju lejon të vendosni: datën dhe orën e fillimit dhe përfundimit të detyrës, periudhën e ekzekutimit, ditët e javës dhe muajt në të cilët duhet të kryhet detyra e planifikuar, etj. (shih përshkrimin e ndërtuar- në gjuhë).
Shembuj të planeve rutinë të detyrave:
Çdo orë, vetëm një ditë |
Periudha e ditëve të përsëritura = 0, periudha e ditëve të përsëritura = 3600 |
Çdo ditë një herë në ditë |
Periudha e ditëve të përsëritura = 1, periudha e ditëve të përsëritura = 0 |
Një ditë, një herë |
Ditët e përsëritjes së periudhës = 0 |
Çdo ditë të tjera një herë në ditë |
Periudha Ditë të Përsëritjes = 2 |
Çdo orë nga ora 01:00 deri në 07:00 çdo ditë |
Ditët e përsëritjes së periudhës = 1 Përsëriteni PeriudhaGjatë ditës = 3600 Ora e fillimit = 01.00 Koha e Fundit = 07.00 |
Çdo të shtunë dhe të dielë në orën 09.00 |
Ditët e përsëritjes së periudhës = 1 Ditët e javës = 6, 7 Ora e fillimit = 09.00 |
Çdo ditë për një javë, kaloni një javë |
Ditët e përsëritjes së periudhës = 1 Periudha Javë = 2 |
Në orën 01.00 një herë |
Ora e fillimit = 01.00 |
Dita e fundit e çdo muaji në orën 9:00. |
Ditët e përsëritjes së periudhës = 1 Dita Në Muaj = -1 Ora e fillimit = 09.00 |
Dita e pestë e çdo muaji në orën 9:00 |
Ditët e përsëritjes së periudhës = 1 Dita Në muaj = 5 Ora e fillimit = 09.00 |
E mërkura e dytë e çdo muaji në orën 9:00 |
Ditët e përsëritjes së periudhës = 1 Dita JavëNë Muaj = 2 Ditët e javës = 3 Ora e fillimit = 09.00 |
Mund të kontrolloni nëse një detyrë po ekzekutohet për një datë të caktuar (metoda RequiredExecution e objektit ScheduleTasks). Detyrat e planifikuara kryhen gjithmonë nën emrin e një përdoruesi specifik. Nëse përdoruesi i detyrës së planifikuar nuk është specifikuar, atëherë ekzekutimi ndodh në emër të përdoruesit të paracaktuar që ka të drejta administrative.
Detyrat rutinë ekzekutohen duke përdorur detyrat e sfondit. Kur planifikuesi përcakton që një detyrë e planifikuar duhet të nisë, krijohet automatikisht një punë në sfond bazuar në këtë detyrë të planifikuar, e cila kryen të gjithë përpunimin e mëtejshëm. Nëse kjo detyrë rutinë po ekzekutohet tashmë, ajo nuk do të ekzekutohet më, pavarësisht nga plani i saj.
Detyrat e planifikuara mund të rifillojnë. Kjo është veçanërisht e vërtetë kur metoda e detyrës rutinë duhet të garantohet se do të ekzekutohet. Një detyrë rutinë riniset kur përfundon në mënyrë jonormale, ose kur procesi i punës (në versionin klient-server) ose procesi i klientit (në versionin e skedarit) në të cilin është ekzekutuar detyra rutinë përfundon në mënyrë jonormale. Në detyrën e planifikuar, mund të specifikoni sa herë duhet të riniset, si dhe intervalin midis rinisjeve. Kur zbatoni metodën e detyrave rutinë të rifillueshme, duhet të keni parasysh që kur të riniset, ekzekutimi i saj do të fillojë nga fillimi dhe nuk do të vazhdojë nga momenti i përfundimit jonormal.
Është e rëndësishme të mbani mend këtë Koha e përfundimit nuk do të përfundojë domosdoshmërisht punën e sfondit në kohën e caktuar. Disa deklarata:
* Një punë në sfond mund të injorojë anulimin e saj automatik nëse nuk ngec, por vazhdon të funksionojë sepse jo të gjitha operacionet e platformës mund të anulohen. Nëse kodi ciklik i gjuhës së integruar ekzekutohet, atëherë puna mund të anulohet, përndryshe jo. E gjitha varet nga ajo që bën puna. * Koha e përfundimit - kufiri brenda të cilit një detyrë mund të fillojë dhe jo të përfundojë? * Përfundimi i detyruar i një detyre i kthen ndryshimet e bëra në fillimin e transaksionit?
Karakteristikat e ekzekutimit të punëve në sfond në variantet e skedarëve dhe klient-server
Mekanizmat për ekzekutimin e punëve në sfond në versionet e skedarit dhe klient-server janë të ndryshëm.
- Në versionin e skedarit, ju duhet të krijoni një proces të dedikuar klienti që do të kryejë punë në sfond. Për ta bërë këtë, procesi i klientit duhet të thërrasë periodikisht funksionin e kontekstit global ExecuteJobProcessing. Vetëm një proces klienti për infobazë duhet të përpunojë punët e sfondit (dhe, në përputhje me rrethanat, të thërrasë këtë funksion). Nëse një proces klienti nuk është krijuar për të përpunuar punët në sfond, atëherë kur qaseni në mënyrë programore në motorin e punës, do të shfaqet gabimi "Menaxheri i punës nuk është aktiv". Nuk rekomandohet përdorimi i një procesi klienti që përpunon punët e sfondit për funksione të tjera.
Pasi të fillojë punët e sfondit të përpunimit të procesit të klientit, proceset e tjera të klientit janë në gjendje të hyjnë në mënyrë programore në motorin e punës së sfondit, d.m.th. mund të ekzekutojë dhe menaxhojë punët në sfond.
Në versionin klient-server, një programues detyrash përdoret për të ekzekutuar punët në sfond, i cili ndodhet fizikisht në menaxherin e grupit. Për të gjitha punët e sfondit në radhë, planifikuesi merr procesin e punës më pak të ngarkuar dhe e përdor atë për të ekzekutuar punën përkatëse të sfondit. Procesi i punëtorit ekzekuton punën dhe njofton planifikuesin për rezultatet e ekzekutimit.
Në versionin klient-server, është e mundur të bllokohet ekzekutimi i detyrave rutinë. Ekzekutimi i detyrave rutinë bllokohet në rastet e mëposhtme:
- Një bllokim i qartë i detyrave rutinë është instaluar në bazën e informacionit. Kyçja mund të vendoset nëpërmjet tastierës së grupit;
- Ekziston një bllok lidhjesh në bazën e informacionit. Kyçja mund të vendoset nëpërmjet tastierës së grupit;
- Metoda SetExclusiveMode() me parametrin True u thirr nga gjuha e integruar;
- Në disa raste të tjera (për shembull, kur përditësoni konfigurimin e bazës së të dhënave).
Krijimi i meta të dhënave për një detyrë rutinë
Përpara se të krijoni në mënyrë programore një detyrë rutinë në bazën e informacionit, duhet të krijoni një objekt meta të dhënash për të.
Për të krijuar një objekt meta të dhënash për një detyrë rutinë në pemën e konfigurimit në degën "General" për degën "Detyrat rutinë", ekzekutoni komandën "Shto" dhe plotësoni vetitë e mëposhtme të detyrës rutinë në paletën e vetive:
Emri i metodës - tregoni emrin e metodës së detyrës rutinë.
Key - specifikoni një vlerë arbitrare të vargut që do të përdoret si çelësi i detyrës së planifikuar.
Orari - tregon orarin e detyrës rutinë. Për të krijuar një orar, klikoni lidhjen “Open” dhe në formularin e orarit që hapet, vendosni vlerat e kërkuara.
Në skedën "Të përgjithshme", tregohen datat e fillimit dhe mbarimit të detyrës dhe mënyra e përsëritjes.
Në skedën "Ditore", tregohet orari ditor i detyrës.
Ju lutemi tregoni orarin tuaj:
- koha e fillimit dhe koha e përfundimit të detyrës;
- koha e përfundimit të detyrës, pas së cilës do të ndërpritet me forcë;
- periudha e përsëritjes së detyrës;
- kohëzgjatja e pauzës midis përsëritjeve;
- kohëzgjatja e ekzekutimit.
Është e mundur të specifikohet një kombinim arbitrar i kushteve.
Në skedën "Javore", tregohet orari javor i detyrës.
Zgjidhni kutitë e zgjedhjes për ditët e javës në të cilat do të ekzekutohet detyra. Nëse dëshironi të përsërisni detyrën, specifikoni intervalin e përsëritjes në javë. Për shembull, detyra ekzekutohet në 2 javë, vlera e përsëritjes është 2.
Në skedën "Mujore", tregohet orari mujor i detyrës.
Zgjidhni kutitë e zgjedhjes për muajt në të cilët do të ekzekutohet detyra. Nëse është e nevojshme, mund të specifikoni një ditë specifike (muaj ose javë) të ekzekutimit nga fillimi i muajit/javës ose në fund.
Përdorimi - nëse vendoset, detyra do të ekzekutohet sipas orarit.
E paracaktuar - nëse vendoset, detyra është një detyrë e paracaktuar.
Numri i riprovave në rast të përfundimit jonormal - tregon numrin e riprovave në rast të ndërprerjes jonormale.
Intervali i riprovës në përfundim jonormal - specifikon intervalin e riprovës pas përfundimit jonormal. Shembuj
Krijimi i një pune në sfond "Përditësimi i indeksit të kërkimit me tekst të plotë":
Krijimi i një detyre rutinë "Rikuperimi i sekuencave":
Task = RoutineTasks.CreateRoutineTask("Rivendosja e sekuencave"); Job.Schedule = Orari; Detyrë.Shkruaj();
Paneli i punës
Duke përpunuar me ITS, menaxhon detyrat rutinë:
Puna me detyra rutinë
Objektet e Punës
Objektet e punës nuk referohen, por ruhen në bazën e të dhënave në një ruajtje të veçantë.
Nëse flamuri "Parapërcaktuar" është i aktivizuar në metadata, atëherë një objekt i tillë krijohet automatikisht kur lansohet 1C:Enterprise dhe ekziston gjithmonë saktësisht në një shembull. Një objekt i tillë nuk mund të fshihet.
Nëse flamuri "Paracaktuar" nuk është vendosur, atëherë objektet e një detyre të tillë krijohen dhe fshihen në mënyrë programore, duke specifikuar orarin dhe parametrat.
Marrja e një liste detyrash
Lista e detyrave mund të merret duke përdorur metodën Merr RoutineTasks menaxher global i punës Detyrat rutinë
Menaxher i Punëve të Programuara
Merr punët e planifikuara (GetScheduledJobs)
Sintaksë:
Merr detyra rutinë (<Отбор>)
Opsione:
<Отбор>(opsionale)
Lloji: Struktura. Struktura që përcakton përzgjedhjen. Vlerat e strukturës mund të jenë: UniqueIdentifier, Key, Metadata, Paradefined, Usage, Emri. Nëse përzgjedhja nuk është e specifikuar, merren të gjitha detyrat rutinë.
Nëse jeni duke filtruar sipas meta të dhënave, atëherë si vlerë Metadata mund të specifikoni ose objektin e meta të dhënave të detyrës rutinë ose emrin e saj.
Vlera e kthimit:
Lloji: Array.
Përshkrim:
Merr një sërë detyrash rutinë për një përzgjedhje të caktuar. Marrja e detyrave të planifikuara është e mundur vetëm për administratorin.
Disponueshmëria:
Për çdo rutinë të ciklit rutinë NewLine = Lista e detyrave rutinë.Add(); NewRow.Metadata = Regular.Metadata.View(); NewLine.Name = Regular.Name; NewString.Key = Regular.Key; NewLine.Schedule = Schedule.Schedule; NewLine.User = Regular.UserName; NewString.Predefined = I rregullt.I paracaktuar; NewString.Use = Regular.Use; NewString.Identifier = Regular.UniqueIdentifier;
LastTask = Regular.LastTask; Nëse LastTask<>I padefinuar Pastaj NewRow.Running = LastTask.Start; NewRow.State = LastTask.State; fundNëse; Cikli i Fundit;
Krijim
Krijuar nga metoda Create RoutineTask për menaxherin e detyrave rutinë:
RegularTask.Emri = Emri; RegularTask.Key = Çelësi; RegularTask.Use = Përdorimi; RoutineTask.UserName = Përzgjedhja e përdoruesve; Detyra rutinë.Numri i PërsëritjeveAtEmergencyCompletion =Numri i PërsëritjeveAtEmergencyCompletion; ScheduledTask.RepeatIntervalAtEmergencyCompletion = RetryIntervalAtEmergencyCompletion; ScheduleTask.Schedule = Orari; RegularTask.Record();
TaskObject.Emri = Emri; JobObject.Use = E vërtetë;
Objekti i detyrës ka një fushë "Parametrat" në të cilën specifikohen parametrat e metodës:
Punë e planifikuar
Opsione(Parametrat)
Përdorimi:
Lexoni dhe shkruani.
Përshkrim:
Lloji: Array. Një grup parametrash për një detyrë të planifikuar. Numri dhe përbërja e parametrave duhet të korrespondojnë me parametrat e metodës së detyrës rutinë.
Disponueshmëria:
Server, klient i trashë, lidhje e jashtme.
Shënim:
Aftësitë e leximit dhe shkrimit janë të disponueshme vetëm për administratorin.
Largimi
Fshihet duke përdorur metodën Delete() të objektit të detyrës:
Marrja e një objekti pune
- lista nëpërmjet metodës GetRoutineTasks:
- nëpërmjet FindByUniqueIdentifier të metodës së menaxherit të detyrave:
– Ngarkimi i klasifikuesit të bankës
Kjo detyrë rutinë shkarkon klasifikuesin e bankave ruse nga faqja e internetit e RBC. Puna e tij e rregullt e mban të përditësuar këtë klasifikues. Dhe kur shtojmë një llogari tjetër rrjedhëse, ka një shans më të madh që banka në të cilën është hapur të gjendet nga ne në klasifikuesin BIC.
Kjo detyrë rutinë ngarkon kurset e këmbimit për datën aktuale. Nëse programi kryen transaksione në monedhë, atëherë ka kuptim ta lini këtë detyrë të aktivizuar në mënyrë që të mos keni nevojë të ngarkoni manualisht normat e monedhës çdo herë.
– Plotësimi i të dhënave për të kufizuar aksesin
Kjo detyrë rutinë kryen plotësimin dhe përditësimin sekuencial të të dhënave të nevojshme për funksionimin e nënsistemit "Access Control" në mënyrën e kufizimit të aksesit në nivel rekord.
Kur aktivizohet modaliteti i kufizimit të hyrjes në nivel regjistrimi, plotëson grupe
vlerat e aksesit. Mbushja kryhet në pjesë në çdo fillim derisa gjithçka të jetë
grupet e vlerave të aksesit nuk do të plotësohen.
Kur çaktivizon modalitetin e kufizimit të hyrjes në nivel të regjistrimit, grupet e vlerave të aksesit (të mbushura më parë) fshihen kur objektet mbishkruhen, dhe jo të gjitha menjëherë.
Pavarësisht nga mënyra e kufizimit të hyrjes në nivelin e regjistrimit, ai përditëson detajet e cache-it. Pas përfundimit të të gjitha përditësimeve dhe mbushjeve, çaktivizon përdorimin e detyrës së planifikuar.
Detyra është zyrtare. Nuk ka nevojë ta aktivizoni manualisht.
– Nxjerrja e tekstit
Përdoret për të kërkuar shpejt të dhëna në skedarët e bashkangjitur të bashkangjitur në një bazë të dhënash. Nëse përdorni kërkimin në skedarët e bashkangjitur, atëherë ka kuptim.
– Dërgimi i mesazheve nëpër llogaritë e rrjedhës së punës
Detyrë rregullatore për shkëmbimin automatik me autoritetet rregullatore. Përdoret kur dorëzoni raportim të rregulluar direkt nga 1C.
– Përditësimi i njësive
Agregatet e përditësimeve të detyrave të planifikuara. Çfarë lloj kafshe është kjo?
Duke përdorur agregatët, ju mund të shpejtoni ndjeshëm gjenerimin e raporteve për regjistrat e akumulimit në rastet kur numri i regjistrimeve në regjistër është qindra mijëra, miliona ose më shumë.
Fraza kryesore këtu është "numri i regjistrimeve në regjistër është qindra mijëra, miliona ose më shumë", domethënë, për regjistrat e vegjël, përfshirë agregatët nuk ka kuptim.
Agregatet ju lejojnë të krijoni të dhëna të parallogaritura për gjenerimin e raporteve të ngjashme me totalet e regjistrave të akumulimit. Këto të fundit llogariten automatikisht nga platforma (me kusht që të mundësohet përdorimi i totaleve për regjistrin) në ndryshim nga agregatët. Por pse nevojiten agregatet nëse rezultatet kryejnë një detyrë të ngjashme?
Së pari, totalet llogariten sipas muajve dhe kjo nuk mund të ndryshohet, ndërsa agregatët mund të llogariten sipas ditës, muajit, tremujorit, gjysmëvjetorit dhe vitit.
Së dyti, seksionet e agregateve mund të jenë arbitrare (çdo përbërje e matjeve të regjistrit të akumulimit), në ndryshim nga totalet, të cilat llogariten në bazë të përbërjes së plotë të regjistrit.
– Përditësimi i të dhënave të monitorit të mbikëqyrësit
Detyra rutinë bën që të dhënat në regjistrin e informacionit “Të dhënat e monitorit ekzekutiv” të përditësohen për të gjitha organizatat. Nëse monitori i menaxherit përdoret në të vërtetë, detyra ka kuptim.
– Përditësoni detyrat e kontabilistit
Detyra rutinë përditëson dhe plotëson detyrat e kontabilistit (datat e paraqitjes së deklaratave të ndryshme, raporteve, etj.).
– Përditësimi i indeksit PPD
Përditëson indeksin e kërkimit të tekstit të plotë. Nëse përdorni kërkimin me tekst të plotë, detyra ka kuptim. Aktivizohet automatikisht nëse kërkimi i tekstit të plotë është aktivizuar në cilësimet e bazës së të dhënave.
– Përditësimi i informacionit mbi drejtimet e raportimit
Po flasim për drejtime: në Fondin e Sigurimeve Shoqërore, në Shërbimin Federal të Taksave, në Fondin e Pensionit. Me pak fjalë, diçka që lidhet, përsëri, me paraqitjen e raportimit elektronik nga 1C.
– Përpunimi i aplikacioneve të abonentëve për lidhjen e një nënshkrimi elektronik në modelin e shërbimit
Një lloj detyre shërbimi që përpunon aplikacionin tuaj për lidhjen e një nënshkrimi elektronik, nëse përdorni 1C në modelin e shërbimit. Në përgjithësi, patjetër që nuk duhet ta aktivizoni vetë.
– Përditësimi i vonuar i sigurisë së informacionit
Puna menaxhon ekzekutimin e mbajtësve të përditësimeve të shtyra. Mos e aktivizoni vetë.
– Dërgimi i raporteve të pajtimtarëve
Dërgimi i raporteve të rregulluara nga abonentët e shërbimit tek autoritetet rregullatore përmes shërbimit të raportimit SOS "Kaluga-Astral". Mos e aktivizoni vetë.
– Pastrimi i versioneve të vjetëruara të objekteve
Vetem per perdorim zyrtar.
– Rindërtimi i njësive
Rindërtimi i njësive për regjistrat e akumulimit në qarkullim. Mos e aktivizoni vetë.
– Rillogaritja e vlerave aktuale të datave relative të ndalimit të ndryshimeve
Rillogarit dhe përditëson vlerat aktuale relative
datat e ndalimit që nga data e seancës aktuale. Mos e aktivizoni vetë.
– Planifikimi i nxjerrjes së tekstit në modelin e shërbimit
Përcakton një listë të zonave të të dhënave në të cilat kërkohet nxjerrja e tekstit dhe planifikon ekzekutimin e tij për to duke përdorur një radhë pune. zyrtare.
– Marrja e rezultateve të dërgimit të raporteve
Marrja e rezultateve të dërgimit të raporteve nga pajtimtarët e shërbimit tek autoritetet rregullatore nga shërbimi i raportimit SOS "Kaluga-Astral". zyrtare.
– Kontrollimi i palëve
Për modelin e shërbimit, ai përditëson statusin e palëve (është gjithçka në rregull me detajet e tyre). Për modalitetin lokal, përditëson gjendjet dhe regjistron mungesën e numrit të identifikimit tatimor dhe pikës së kontrollit.
– Bashkimi i indeksit PPD
Kryen një bashkim të indekseve të kërkimit me tekst të plotë. Puna e detyrës lidhet përsëri me kërkimin e tekstit të plotë (ku është kërkimi pa indeks).
– Heqja e informacionit të parëndësishëm të sinkronizimit
Kryen fshirjen e informacionit të sinkronizimit që nuk është fshirë për shkak të dështimeve të programit. Skedarët me një datë postimi më shumë se 24 orë janë subjekt i fshirjes.
– Fshirja e objekteve të shënuara të programit
Heq objektet e shënuara nga një detyrë e planifikuar.
– Vendosja e periudhës së totaleve të llogaritura
Një detyrë shërbimi që përcakton periudhën e rezultateve të llogaritura. Rezultatet janë shkruar më lart.