Extensions.ExternalServiceProvider.GetServiceProviderEventValues
Jump to navigation
Jump to search
Classification
Name | GetServiceProviderEventValues |
Short Description | Retrieves the values of a provider event |
Class | Action |
Extension | OTX ExternalServiceProvider extension |
Group | ExternalServiceProvider related actions |
Exceptions | esp:ProviderDisposedException otx:TypeMismatchException |
Checker Rules | ExternalServiceProvider_Chk001 ExternalServiceProvider_Chk009 ExternalServiceProvider_Chk011 |
Standard Compliant | Yes |
OTL Syntax
ActionRealisation ExternalServiceProvider.GetServiceProviderEventValues(otx:OtxLink providerType, otx:OtxName eventName, event:EventTerm event, esp:ExternalEventResult value);
Description
GetServiceProviderEventValues is an ActionRealisation which retrieves the values of a provider event. To address the right ServiceProviderEvent the EventName and the ProviderType will be adjusted. If the event inside the event attribute does not match to the specified ServiceProviderEvent an TypeMismatchException will be thrown.
Properties
Name | Data Type | Class | Default | Cardinality | Description |
providerType | otx:OtxLink | - | [1..1] | This attribute identifies the external provider to execute the service on.
The link will point to the corresponding ServiceProviderSignature. | |
eventName | otx:OtxName | [1..1] | This attribute identifies the EventSignature in the given ServiceProviderSignature for which event the values will be returned. | ||
event | event:Event | Term | - | [1..1] | This term represents the value of a ServiceProviderEvent. |
value | esp:ExternalEventResult | - | [1..*] | Here the event values of the event can be returned to variables. [1..*] results are possible. | |
- value | otx:OtxName | - | [1..1] | This attribute identifies the event value. The link will point to the corresponding EventSignature event value. | |
- target | otx:Variable | Variable | - | [1..1] | This variable represents the OTX variable to hold the value of the event. The variable's data type will match to the value data type as declared in the corresponding event signature. |
OTL Examples
/// Signatures
package ExternalServiceProvider.ServiceProviderSignature ServiceProviderSignature1
{
ExternalServiceProvider.ConstructorSignature ConstructorSignature1(String ConstructorExternalInParameter1, String ConstructorExternalInParameter2, String ConstructorExternalInParameter3);
ExternalServiceProvider.EventSignature EventSignature1(String EventValueParameterDeclaration1);
ExternalServiceProvider.PropertySignature PropertySignature1(String PropertyValueDeclaration1) accessType READ-ONLY;
ExternalServiceProvider.PropertySignature PropertySignature2(String PropertyValueDeclaration1) accessType WRITE-ONLY;
ExternalServiceProvider.ServiceSignature ServiceSignature1(in ByteField ExternalInParameterDeclaration1, ref Float ExternalInOutParameterDeclaration1, out Integer ExternalOutParameterDeclaration1) throws ExternalServiceProvider.ConfigurationException, ExternalServiceProvider.ExecuteException, ExternalServiceProvider.ProviderServiceException;
}
package HMI.ScreenSignature ScreenSignature1();
/// Global Declarations
public procedure main()
{
/// Local Declarations
ExternalServiceProvider.PropertyFlag PropertyFlag = @PropertyFlag:READ-ONLY;
ExternalServiceProvider.ServiceProvider ServiceProvider1;
String String1 = "Abc";
String String2 = "Def";
String String3 = "Ghi";
ExternalServiceProvider.Service Service1;
ByteField ByteField1 = &1234;
Integer Integer1 = 5678;
Float Float1 = 9.9;
EventHandling.Event Event1;
Boolean Boolean1 = false;
EventHandling.EventSource EventSource1;
/// Flow
ExternalServiceProvider.CreateProvider(ServiceProvider1, ServiceProviderSignature1, ConstructorSignature1, {ConstructorExternalInParameter1 = String1, ConstructorExternalInParameter2 = String1, ConstructorExternalInParameter3 = String3});
EventSource1 = EventHandling.MonitorChangeEventSource(String3);
EventHandling.WaitForEvent({EventSource1, EventHandling.TimerExpiredEventSource(1000)}, Event1);
try
{
ExternalServiceProvider.GetServiceProviderEventValues(Event1, ServiceProviderSignature1, EventSignature1, {EventValueParameterDeclaration1 = String2});
}
catch (TypeMismatchException)
{
}
ExternalServiceProvider.DisposeProvider(ServiceProvider1);
}