RegisterTemplate (AutomationManager)
De Wiki1000
Version du 5 juillet 2023 à 09:22 par Syfre (discuter | contributions)
procedure RegisterTemplate(const iDomain:string; const iJson:String)
Enregistrement d'un modèle de processus métier.
Paramètre | Usage |
---|---|
iDomain | Le domaine métier du processus |
iJson | Une expression structure json définissant le processus. |
Exemple
procedure _RegisterTemplateGenerationCommandeAchat(); begin AutomationManager.RegisterTemplate(RegClass.Domain, '{' ' "status":"ok",' ' "categories":[' ' {"t":[{"l":"en","t":"Event"},{"l":"fr","t":"Evènement"}]},' ' {"t":[{"l":"en","t":"Purchase orders"},{"l":"fr","t":"Commandes d''achat"}]}' ' ],' ' "icon":"'+cAutomationIcon_Schedule+'",' ' "t":[{"l":"en","t":"Every days generate purchase orders"},{"l":"fr","t":"Tous les jours générer les commandes d''achat"}],' ' "sentence":' ' {' ' "words":[' ' {"t":[{"l":"en","t":"Every days at"},{"l":"fr","t":"Toutes les jours à"}]},' ' {"t":[{"l":"en","t":"time"},{"l":"fr","t":"heure"}],' ' "tid":"TBpEventInitializationClock",' ' "pid":"timeOfDay",' ' "action":{"n":"'+cAutomationAction_Time+'", "default":"01:00"}' ' },' ' {"t":[{"l":"en","t":"Then"},{"l":"fr","t":"Alors"}], "stepBreak":true},' ' {"t":[{"l":"en","t":"generate purchase orders with these"},{"l":"fr","t":"générer les commandes d''achat avec ces"}]},' ' {"t":[{"l":"en","t":"parameters"},{"l":"fr","t":"paramètres"}],' ' "tid":"TProcessTaskActivity",' ' "pid":"config",' ' "cid":"name",' ' "action":{"n":"'+cAutomationAction_Configure+'"}' ' }' ' ]' ' },' ' "tasks":[' ' {"name":"TBpEventInitializationClock", "params":[' ' {"n":"timeOfDay","v":"01:00:00"},' ' {"n":"planification","v":"RV:DD,RI:1,DT:[timeOfDay]"},' ' ]},' ' {"name":"TProcessTaskActivity", "params":[' ' {"n":"name","v":{' ' "id":"TProcessusPropositionAchat",' ' "title":"Traitement des propositions d''achat",' ' "name":"TProcessusPropositionAchat",' ' "form":"egescom_genpropachat.dfm",' ' },"mid":1},' ' {"n":"config","sid":1}' ' ]}' ' ]' '}' ); end;
Voir aussi