Материал из
Перейти к: навигация, поиск

Stateful API Wrapper

  • stateful — функционал API при котором объект содержит информацию о своем состоянии и все методы работают в контексте его состояния.
  • Stateful - автоматически сохраняют свое состояние между разными клиентскими вызовами.
  • The stateful API is designed for client applications that allows users to log on to entities and make transactions. It contains various pop up methods for user interaction. Therefore, the stateful API must be used within a client application, such as ArchestrA graphics displayed within an InTouch application.
  • The stateful API requires a client session, which is created for each executable, to access the MES database.
  • The client session allows you to access zero or multiple entities to make transactions. It also maintains the current entity, current job for each entity, and other information in the MES database. This information is used while passing parameters to a method call of the stateful API.

Stateless API Wrapper

  • stateless — все методы объекта работают вне какого-либо контекста или локального состояния объекта, которого в этом случае просто нет.
  • Stateless - используются для реализации процессов, которые могут быть завершены за одну операцию
  • The stateless API is designed for more complex applications that require access to all the calls that are available in the Wonderware MES application.
  • The stateless API maintains no information and provides direct access to calls through the middleware. There can be multiple sessions within one application or a common shared session across multiple applications. Since there is no information maintained in memory, the stateless API calls require more parameters than the corresponding stateful API call.
  • The stateless API supports multi threading. Therefore, the stateless API should be used in background applications such as Application Server Object scripting.