SBM Orchestration Guide → Raising External Events → Creating a Custom Event Definition
This section provides instructions for creating a custom event definition. Using the ExampleEventDefinition.wsdl file as a template, you provide values that let external products generate events.
To create a custom event definition:
<xs:simpleType name="MyEventDefinitionEventType"> <xs:restriction base="EventTypeType"> <xs:enumeration value="MyEventDefinitionEvent"/> </xs:restriction> </xs:simpleType>
You can define as many enumeration values as you want, for example:
<xs:simpleType name="MyEventDefinitionEventType"> <xs:restriction base="EventTypeType"> <xs:enumeration value="Issue Created"/> <xs:enumeration value="Issue Deleted"/> <xs:enumeration value="Waiting for Approval"/> </xs:restriction> </xs:simpleType>
<xs:simpleType name="MyEventDefinitionObjectType"> <xs:restriction base="ObjectTypeType"> <xs:enumeration value="MyEventDefinitionObject"/> </xs:restriction> </xs:simpleType>
<xs:simpleType name="MyEventDefinitionProductType"> <xs:restriction base="ProductType"> <xs:enumeration value="MyEventDefinition"/> </xs:restriction> </xs:simpleType> <!-- Derived ProductVersionType --> <xs:simpleType name="MyEventDefinitionProductVersionType"> <xs:restriction base="ProductVersionType"> <xs:enumeration value="1.0"/> </xs:restriction> </xs:simpleType> <!-- Derived ProductInstanceType --> <xs:simpleType name="MyEventDefinitionProductInstanceType"> <xs:restriction base="ProductInstanceType"> <xs:enumeration value="MyEventDefinitionInstance"/> </xs:restriction> </xs:simpleType>
Again in all three cases, replace the enumeration values to match the values for the external product.
<xs:complexType name="MyEventDefinitionCustomExtension"> <xs:annotation> <xs:documentation> Custom Extension </xs:documentation> </xs:annotation> <xs:sequence> <xs:element name="MyEventDefinitionData" type="xs:string"/> </xs:sequence> <xs:anyAttribute/> </xs:complexType>
You can define any type of schema under sequence either simple type elements as shown above or complex type.
Copyright © 2007–2019 Micro Focus or one of its affiliates. All rights reserved.