This is an old revision of the document!
Defining Intelligent Business Objects
Intelligent business objects are described in the Intelligent Business Objects section.
In order to define an intelligent business object the configurator has to click on the “Communication” property of a business object and define communication channels of the object in the “Communication Channels” dialog that comes up.
AwareIM supports the following types of communication channels out-of-the-box:
- E-mail channel – //communication with an intelligent business object is via e-mail - //SOAP channel – communication with an intelligent business object is via Web services mechanism which supports SOAP (Simple Object Access Protocol)
- URL channel – communication with an intelligent business object is via HTTP URL (Unified Resource Locator)
- REST channel – communication with an intelligent business object is via a popular REST protocol
In addition to the above pre-defined types it is possible to plug-in custom channel types – see “AwareIM Programmer’s Reference”.
A particular object may expose several communication channels at once – when a notification or service request are sent to the object it is possible to indicate which type of channel the request or notification should be sent through (see SEND and REQUEST SERVICE actions). Therefore the configurator has to indicate which channels the intelligent business object exposes.
Every channel has certain properties specific to its type. To set the properties of a channel tick the channel type in the “Communication Channels” dialog and define its properties.
Setting Properties of the E-mail Channel
When an e-mail channel is defined for a business object the Configuration Tool automatically adds the EmailAddress attribute to the business object. This attribute can be used to set the e-mail address of a particular instance of the business object in the Operation Mode. When the e-mail channel is removed from the business object the EmailAddress attribute is automatically removed as well.
To specify account settings for sending emails double-click on the business space version and select the Outgoing Emails property - see Sending Outgoing E-mails.
Setting Properties of the SOAP Channel
Before setting properties of the SOAP channel, check out documentation of the service provider to find out the location of a WSDL file. This file describes how to call the SOAP services exposed by the service provider. You need to enter the URL of this WSDL file into the SOAP Channel dialog. If location of this file is different at runtime, enter the Runtime URL of the WSDL file.
The next step is to discover web services offered through this channel. AwareIM will read information in the WSDL file to automatically figure out which services are exposed by the intelligent object.
To discover services press the Discover button next to the Services table. Discovered services (if any) will be displayed in the Services table. You can now define a process that would call the discovered services using the REQUEST SERVICE action of the AwareIM Rule Language.
<callout type=“primary” icon=“true” title=“note”> Business objects declared as service input and reply are automatically added to the business space version once you save the changes for the intelligent business object you are defining or editing.</callout>
<callout type=“primary” icon=“true” title=“note”> If the service provider changes definitions of services the services may be re-discovered in the same way as described above. The Configuration Tool will automatically replace all services and business objects declared as service input and replies with the new definitions.</callout>
Setting Properties of the URL Channel
Communication with an intelligent business object via the URL channel assumes that AwareIM sends service requests to the specified URL. It is expected that when this URL is called the browser will go to the web site of the service provider. When this web site finishes its task it will return to the AwareIM-based application, A typical scenario for the URL channel service is a payment system (such as PayPal) that collects credit card details and returns to the web site of the merchant.
If services exposed by the business object require input (see Defining Services) the attribute values of the business object instances representing service input will be passed to the specified URL as request parameters. For example, if a service requires the business object URLParameters that has Parameter1, Parameter2 and Parameter3 attributes defined and the provider’s URL is www.provider.com the service requests will be sent to the following address:
www.provider.com?Parameter1=value1&Parameter2=value2&Parameter3=value3
where value1, value2 and value3 are values of the Parameter1, Parameter2 and Parameter3 attributes respectively.
The following properties should be specified:
URL of the service provider
This is the URL where the requests will be sent. This property is mandatory.
Request parameter identifying the URL to return to if success
The service provider represented by the intelligent business object may expect that the request contain the URL that the provider should return to in case of the successful fulfilment of the service. AwareIM will take care of supplying the appropriate URL provided that it knows the name of the request parameter that should contain this URL. For example, if you specify successURL as a request parameter the service request sent to the service provider will be:
www.provider.com?Parameter1=value1&Parameter2=value2&Parameter3=value3&successURL=returnURL
where returnURL is the value that AwareIM will supply so that when the reply from the provider is delivered via this URL AwareIM will know that the service has been completed successfully. If this parameter is not specified AwareIM will assume that any service request sent to the provider has been successfully completed without waiting for any reply from the provider.
Request parameter identifying the URL to return to if a failure occurs
This is the same as the previous parameter except that the return URL indicates failure rather than success. If this parameter is not specified AwareIM will either assume that any service request sent to the provider has been successfully completed without waiting for any reply from the provider (if success request parameter is also not specified) or it will wait for the service reply from the provider and if the provider’s service fails the service request will eventually time out (this scenario should be avoided unless the provider’s service can never fail).