Siebel Life Sciences Guide > Using Personalized Content Delivery > Using Signature Control for Personalized Content Delivery >

Signature Capable Messages


A signature capable message is an SWF file that has a space allocated in it for displaying the PCD signature control: SignatureCtrl.swf. The file communicates with both the signature control and the PCD application.

To properly implement a signature capable message certain requirements are member variables must be set, and certain methods must be applied. Follow the requirements in the following sections before using signature control:

Member Variable Requirement for Signature Capable Messages

In order to hold a pointer to the SignatureCtrl.swf embedded within the message set the following variable:

private var m_signCtrl:SystemManager;

This pointer will be used to invoke methods in SignatureCtrl.swf

Method Requirements for Signature Capable Messages

The following method requirements must be met in order to properly implement signature control:

  • The appLoaded method must be called on the applicationComplete event with the following predefined string:

    Application.application.signAssetLoadComplete(this);

    For an example of this method requirement, see FlexApp appLoaded Example

  • The loadSignCtrl method will be called by the Interactive Detailer to notify the Asset with the path of the SignatureCtrl.swf and asset will load.

    For an example of this method requirement, see FlexApp LoadSignCtrl Example

  • The InvokeSignCtrlMethod method will be called by the Interactive Detailer to invoke a method in SignatureCtrl.swf by way of the Asset.

    For an example of this method requirement, see FlexApp InvokeSignCtrlMethod Example

FlexApp Examples

FlexApp is a sample signature asset created in Flex. This asset has the following minimum method requirements:

  • Loading the SignatureCtrl.swf
  • Enabling communication between the Interactive Detailer and the signature control, by way of the Signature Asset

FlexApp appLoaded Example

FlexApp.mxml has a method called appLoaded. The appLoaded method is called by the applicationComplete event. The call is shown in the following sample:

<mx:Application .....................applicationComplete="appLoaded();">

......................

public function appLoaded():void

{

Application.application.signAssetLoadComplete(this);

}

The appLoaded method notifies the parent application -- in this case Interactive Detailer -- that the Signature Asset is loaded and ready to load SignatureCtrl.swf, using the following statement:

Application.application.signAssetLoadComplete(this);

Where Application.application refers to Interactive Detailer and signAssetLoadComplete refers to a method in Interactive Detailer that receives a pointer to the Signature Asset as an input parameter. This pointer will be used by the Interactive Detailer to send data to the SignatureCtrl.swf embedded in the Asset.

FlexApp LoadSignCtrl Example

FlexApp.mxml has member variable of type SystemManager. This member variable holds a pointer to the SignatureCtrl.swf embedded within the asset. The pointer is shown in the following sample:

private var m_signCtrl:SystemManager;

public function loadSignCtrl(strSignCtrl:String):void

{

loader.autoLoad = true;

loader.percentHeight = 100;

loader.percentWidth = 100;

loader.load(strSignCtrl);

loader.addEventListener(Event.INIT, loadComplete);

loaderBox.addChild(loader);

}

private function loadComplete (event:Event):void

{

m_signCtrl = SystemManager(event.target.content);

}

The Interactive Detailer sends the path of SignatureCtrl.swf and notifies the Signature Asset to load the Signature Control by calling a method called loadSignCtrl. This is all implemented by the Asset.

The Signature Asset method, loadSignCtrl, will load SignatureCtrl.swf into an SWF loader. The pointer to SignatureCtrl.swf is stored in the member variable m_signCtrl, as displayed above in loadComplete function.

FlexApp InvokeSignCtrlMethod Example

FlexApp.mxml also implements a method called InvokeSignCtrlMethod. When the Interactive Detailer is required to send data to SignatureCtrl.swf, it does so by calling this method in the Asset. The following XML data is passed to the Asset:

public function InvokeSignCtrlMethod(strXMLData:String):void

{

if(m_signCtrl != null)

Object(m_signCtrl.application).InvokeMethod(strXMLData);

}

Siebel Life Sciences Guide Copyright © 2016, Oracle and/or its affiliates. All rights reserved. Legal Notices.