SDK - Generated Component (Magic xpi 3.x)
When you create a new component, it is saved at: User_Resources\Components\Component_Name
The component definition is saved in an XML file called <Component_Name>.idd and is located in the Components folder.
The following methods will be automatically generated:
|
SetResource
|
Sets the new component model Resource Type.
|
VersionOK
|
The Magic xpi Server will call this method and send the current Magic xpi version. You have to write the code for checking the component version. The method will return True or False (depending on whether the component matches the Magic xpi version) and the component will not be able to run if the version check fails.
|
When defining a Trigger using the SDK, Magic xpi will generate a component including the following methods:
|
Load
|
This method is called when the Server starts and the flow is enabled.
|
TriggerName_Invoke
|
The user code must call this method in to trigger the attached flow.
|
Enable
|
This method is called when the flow is switched to enable mode. This method must activate the trigger.
|
Disable
|
This method is called when the flow is switched to disable mode. This method must deactivate the trigger.
|
VersionOK
|
The Magic xpi Server will call this method before trigger activation and after the Load method, and will send the current Magic xpi version. The method will return True or False (depending on whether the component matches the Magic xpi version) and the component will not be able to run if the version check fails.
|
Note:
|
You need to provide the implementation code for these methods.
|
|