Please enable JavaScript to view this site.

The manual for the JobRouter developer

Navigation: System activities > Description of the .NET API for system activities

Implement mandatory methods

Scroll Prev Top Next More

You need to implement the following methods yourself in order for the system activities to work correctly.

Signature

Description

string GetActivityId()

Returns the unique ID of the system activity.
This ID has to match the ID defined in the getActivityId() method of the PHP part of the system activity.

string GetModuleName()

Returns the name of the system activity module.

void Prepare()

Preparatory actions (i.e. Initializing a third party component) can be run here. The method will be called once per execution of the activity.

void Execute()

Implement the actual logic of your system activity here. The method will be called once per execution of the activity or once per table row if a subtable was set in the configuration of the system activity.

void BeforeSave()

You can set the step status (see The status model). The method will be called once per execution of the activity, directly before it saves.

void OnSuccess()

This method will be called once per execution of the activity, after saving successfully.

void OnException(Exception ex)

Exceptions that occurred can be analyzed and treated accordingly here. At this point in time the system activity is already in the error state. In case of an exception, the method will be called once per execution of the activity.

void Cleanup()

Data that is not needed anymore can be deleted here. The method will be called once per execution of the activity.