org.visallo.activity

Custom activity rows based on events or long running processes

Activity items display in the floating panel accessed from the menubar gears icon.

Registration

registry.registerExtension("org.visallo.activity", config)

Source:
Tutorials:
See:
Configuration Properties:
Name Type Attributes Default Description
type string

Type identifier for this kind of activity. There can be more than one activity of this type in progress, and the display will group by this value.

Define activity.tasks.type.[MY_ACTIVITY_TYPE] message bundle string for localized display.

kind string

Either eventWatcher or longRunningProcess

titleRenderer titleRenderer

Render the title for row

eventNames Array.<string> <optional>

Required if eventWatcher. Start event name, end event name.

finishedComponentPath string <optional>

Path to org.visallo.activity~FinishedComponent to render when task is complete.

onRemove onRemove <optional>

Invoked when row is removed

indeterminateProgress boolean <optional>
false

If determinate progress is not available, will render indeterminate progress bar.

autoDismiss boolean <optional>
false

Remove this activity row when complete

allowCancel boolean <optional>
false

Whether the activity supports cancelling (will render cancel button if true).

Validation Function

Extensions registered must pass this validation check to be used.

function extensionValidator(e) {
    return 'type' in e && 'kind' in e && _.isFunction(e.titleRenderer) && (e.kind !== 'eventWatcher' || _.isArray(e.eventNames) && e.eventNames.length === 2);
}

Type Definitions

FinishedComponent

Source:

FlightJS or React Component to render when activity is completed

Properties:
Name Type Description
activityItem object

The activity item

onRemove()

Source:

Invoked when the row is removed by user or autoDismiss

Example
onRemove() {
    // "this" is the flight activity component
    this.trigger(...);
}

titleRenderer(el, activity)

Source:

Function that is responsible for populating the text of the activity row.

Parameters:
Name Type Description
el Element

Html element to render title in

activity object

The activity object. Either long running process json, or object with eventData.