Services
Runtime service - its a class, the instance of which is created during a runtime launch. Launched runtime instance provides some functionality to workflow activities. For example, CBPDocumentService service provides to activities an option to call document methods, and CBPHistoryService allows saving the document in history.
Any service is a class that is inherited from the abstract CBPRuntimeService class. When launching the runtime (explicit or implicit - upon first call of any runtime method) - instances of all service classes are created. After that, these instances can be received by their names via the GetService method of the runtime or a workflow wrapper object.
Set of standard services includes:
- SchedulerService, that is an instance of the CBPSchedulerService class. It allows to subscribe to an external event – timeframe expiration (works with agent's features).
- StateService, that is an instance of the CBPStateService class. It is designed to work with workflow (document) statuses.
- TrackingService, is an instance of the CBPTrackingService class. Allows to record data into log. System events with the time when the workflow was completed are recorded into a log. For example, the logged information includes the data on which activities were performed and their final result. Additionally, any arbitrary information can be recorded in the log.
- TaskService is an instance of the CBPTaskService class. It allows to work with tasks for users.
- HistoryService is an instance of the CBPHistoryService class. It allows to save document to history and restore it from history.
- DocumentService is an instance of the CBPDocumentService class. It allows to call document methods.
© «Bitrix24», 2001-2024