Difference between revisions of "Extensions.ExternalServiceProvider.TerminateService"
Jump to navigation
Jump to search
(Created by Ngoc Tran.) |
(Edited by Ngoc Tran.) |
||
Line 5: | Line 5: | ||
== OTL Syntax == | == OTL Syntax == | ||
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | <syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | ||
− | ActionRealisation ExternalServiceProvider.TerminateService(ServiceTerm serviceHandle, BooleanVariable isTerminated); | + | ActionRealisation ExternalServiceProvider.TerminateService(esp:ServiceTerm serviceHandle, otx:BooleanVariable isTerminated); |
</syntaxhighlight> | </syntaxhighlight> | ||
Line 14: | Line 14: | ||
{| {{TableHeader}} | {| {{TableHeader}} | ||
{{TableRowPropertiesHeader}} | {{TableRowPropertiesHeader}} | ||
− | {{TableRowPropertie2| serviceHandle | [[Extensions.ExternalServiceProvider.Service|Service]] | [[Term]] | - | [1..1] | This term represents the handle to the service. }} | + | {{TableRowPropertie2| serviceHandle | [[Extensions.ExternalServiceProvider.Service|esp:Service]] | [[Term]] | - | [1..1] | This term represents the handle to the service. }} |
− | {{TableRowPropertie2| isTerminated | [[Boolean]] | [[Variable]] | - | [0..1] | If the service can be terminated the isTerminated returns true. If the service is not interruptible the action returns immediately with the isTerminated flag set to false. }} | + | {{TableRowPropertie2| isTerminated | [[Boolean|otx:Boolean]] | [[Variable]] | - | [0..1] | If the service can be terminated the isTerminated returns true. If the service is not interruptible the action returns immediately with the isTerminated flag set to false. }} |
|} | |} | ||
Latest revision as of 12:53, 14 November 2019
Classification
Name | TerminateService |
Short Description | Informs the runtime system |
Class | Action |
Extension | OTX ExternalServiceProvider extension |
Group | ExternalServiceProvider related actions |
Exceptions | esp:ProviderDisposedException |
Checker Rules | |
Standard Compliant | Yes |
OTL Syntax
ActionRealisation ExternalServiceProvider.TerminateService(esp:ServiceTerm serviceHandle, otx:BooleanVariable isTerminated);
Description
TerminateService is an ActionRealisation that informs the runtime system, that the running service will be terminated if possible. If the service can be terminated, the action is blocking until the service is terminated. The isTerminated flag is set to true. If the service is not interruptible the action returns immediately with the isTerminated flag set to false.
Properties
Name | Data Type | Class | Default | Cardinality | Description |
serviceHandle | esp:Service | Term | - | [1..1] | This term represents the handle to the service. |
isTerminated | otx:Boolean | Variable | - | [0..1] | If the service can be terminated the isTerminated returns true. If the service is not interruptible the action returns immediately with the isTerminated flag set to false. |
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 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.ServiceProvider ServiceProvider1;
String String1 = "Abc";
String String2 = "Def";
String String3 = "Ghi";
Integer Integer1 = 5678;
ExternalServiceProvider.Service Service1;
Boolean Boolean1 = false;
ByteField ByteField1;
Float Float1;
/// Flow
ExternalServiceProvider.CreateProvider(ServiceProvider1, ServiceProviderSignature1, ConstructorSignature1, {ConstructorExternalInParameter1 = String1, ConstructorExternalInParameter2 = String1, ConstructorExternalInParameter3 = String3});
ExternalServiceProvider.ExecuteService(ServiceProvider1, ServiceProviderSignature1, ServiceSignature1, {ExternalInParameterDeclaration1 = ByteField1, ExternalInOutParameterDeclaration1 = Float1, ExternalOutParameterDeclaration1 = Integer1}, Service1, false);
ExternalServiceProvider.TerminateService(Service1, Boolean1);
ExternalServiceProvider.DisposeProvider(ServiceProvider1);
}