Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Screenshot: Provisioning section

Image AddedImage Removed

Column NameDescription
IDHandler's identification number
Priority

Priority of handlers execution

NameHandler's title
Event

Description of the handler event

Handler

Category of the handler that is used and location. There are two types of handlers that can be used: 

  • HTTP scripts, called via POST requests (used in most cases)
  • Local server scripts, called locally on the server (used in very specific cases)

...

Advanced Search drop-down menu, located in the top right corner of the section, is called to facilitate easy access to required informationBy clicking on a red downwards downward arrow  iconthe following drop-down menu is displayed:

...

Field Description

Name

Specify a particular title for a handler
Event

Specify a handler event from the following list:

Clients

  • create
  • update
  • delete
  • archive
  • custom fields update
  • balance became >=0
  • balance became <=0
Accounts
  • create
  • update
  • delete
Clients Packages
  • assign
  • activate
  • deactivate
  • renew
  • close 

Task

Determine a type of handler and details:

  • script - here you need to specify the path where the following script is located,
    for example: user, user/local/vcs/script.py.
  • http:// - here specify the port and method,
    for example: 120.0.0.1:5000/api.

Status

Choose the state of the handler:

  • enabled - select it to make a handler active;
  • disabled - select it to unable a handler;
  • archived - select it to archive a handler.

Priority

Establish an order of handler performing.
Note: The handler with 1 priority will precede all other handlers in order.

...

Panel
borderColor#ffffb3
bgColor#ffffb3
borderWidth2px

(warning)(warning)   Attention

In VCS 3.17.0, to prevent performance degradation and data inconsistency, affected by external side, Before event type has been removed from the section.

...

Panel
borderColor#ccffcc
bgColor#ccffcc
borderWidth2px
borderStylesolid

Best practice example

There is an example based on http://handler usage.

2. Open the Provisioning section and start creating a handler.

    1. Specify the name, type, and status.
    2. In the Event field, select Clients Create event from the drop-down list.
    3. In the Task field, indicate http:// type and determine the port and method, for example: 120.0.0.1:5000/api.
    4. Click Apply.

Find an example of the http://handler below:

Code Block
languagepy
from flask import Flask, request
import json
app = Flask(__name__)
@app.route("/api", methods=['GET', 'POST'])
def api():
    data = json.loads(request.data)
    return json.dumps(data)
if __name__ == "__main__":
    app.run()


...

Panel
borderColor#ffffb3
bgColor#ffffb3
borderWidth2px

(warning)(warning)   Attention

To put a handler into action, you need to restart the Cache Manager. To do so, click on the corresponding icon in Task Scheduler section

...