Regardless of the class name the basic class is always saved in the file SystemActivity.php. This file contains the entire execution logic and XML configuration of the system activity. After you have created the complete directory structure you can start with the implementation of the basic class.
It always has to derive from the class AbstractSystemActivityAPI so the appropriate API methods are available.
Please note: The class name must always consist of the folder name + "SystemActivity".
Examples:
Csv Systemactivity with folder „csv“
<?php
class csvSystemActivity
csvexport Systemactivity with folder „csvexport“
<?php
class csvexportSystemActivity
The following example shows the contents of a newly created basic class for the csv system activity.
Basic structure of the basic class
getDialogXml() shortened for space reasons. The XML configuration is explained further in chapter XML structure.
<?php
class csvSystemActivity extends AbstractSystemActivityAPI
{
public function getActivityName()
{
return 'CSV Export';
}
public function getActivityDescription()
{
return 'This system activity can be used to export data from a subtable into a csv file.';
}
public function getDialogXml()
{
return "<?xml version='1.0' encoding='UTF-8'?>
<jobrouterModuleSettings>
<module name='CONST_SA_CSV'>
<functions>
<function id='exportCsv' name='CSV Export' description='This function exports a CSV file'>
<userdefined>
...
</userdefined>
<inputParameters>
...
</inputParameters>
<outputParameters>
...
</outputParameters>
</function>
</functions>
<simulation>
...
</simulation>
</module>
</jobrouterModuleSettings>";
}
public function exportCsv()
{
}
}