Connectors in Bizagi are portable modules that allow you to extend the functionality in terms of integrating to another systems or application, as described at Bizagi Connectors.
The final step when using connectors is configuring those integration points in your processes where these will invoke that other system or application.
This section illustrates how to use a connector from your Bizagi processes.
At this point you need to have your connector already installed and configured.
For more information about this step, refer to Installing connectors.
There are 2 places in which you may use connectors:
1.In activity actions
This is the preferred approach, as it allows you to rely on Asynchronous activities of Bizagi.
Asynchronous activities in Bizagi provide configuration for timeouts and automatic retries.
2.In buttons of user interfaces
This is possible in case you wish to perform actions while working in a form; and show results in that same screen.
Note that given the nature of connectors in which you will be integrating another system, and such system may be offline or delayed due to external factors (connectivity issues, busy time frame, etc), using connectors synchronously in user interfaces is not the recommended approach for best user experience.
In this section, we will focus on illustrating how to configure the use of connectors in activity actions.
Connectors in activity actions
Having connectors execute as activity actions (e.g upon termination of a manual activity) is the preferred option, since it will facilitate a best user experience and allow you to configure such integration as robust as possible.
By executing connectors at the On Exit timing of a given activity, you may rely on an Asynchronous activity and use a timeout definition and automatic retries configuration.
To do so, follow these steps:
1. Go to the 4th step of the wizard called Activity actions.
In there, select the activity in which you want to execute the connector.
2. Add a rule of the type Connector.
Choose the timing when it should execute (e.g On Enter or On Exit).
You can add more than one rule executing a connector, and the order behind of them will be: On Enter first and finally On Exit. (On Save, applies while in the form, given that button is pressed).
Multiple rules in same timing activity actions will execute from first listed one to the last listed one.
3. Select the Connector instance configuration to be used and its action.
This implies that at this point, you should know which authentication credentials you will use for the connection.
Notice that in the left panel, you will see the list of all connector configurations available in your project. Bear in mind that if you configured more than one instance of the same connector (primarily, because the actions within the method had different authentication configurations), you will see them all in the list of available connector configurations.
Select your connector configuration and then, its method in the right panel.
The image above illustrates a configuration using a Twitter service connector, and choosing to search for tweets.
Click Next when finished.
4. Map the inputs and outputs as required by the connector.
In the inputs, Runtime entities information is available to be mapped, from the Case attribute, just above the Process entity. They are displayed in the simple mapping (advanced mapping is not supported).
You may resolve doubts with the author of the connector if you do not follow exactly what inputs and outputs are required or how are these to be used, or by looking up the documentation for that particular third party system's API (e.g Twitter's official web site).
Press Finish when done.
If you want to map the error output check the Continue and execute mapping when a connector error is received. Otherwise, select an option to specify the behavior when an error is encountered:
In order to troubleshoot and watch over the execution of your connector, you may activate traces in Bizagi (In a development environment, or only temporarily, in a different environment).
To activate traces, open the Tracing window located in the Configuration tab in the Ribbon and make sure you mark the External connectors item (by pressing the All/Warning/Error buttons).
Upon execution, traces will be found at C:\Bizagi\Projects\<Your Project Name>\Temporary\Connectors\ file.
To learn more about the different types of traces, refer to Tracing.
These traces will record details that include the use of the Log object's methods, as used within the code of your connector.
To learn more about the Log object and its methods, refer to Bizagi API for connectors.
In addition to traces, whenever connectors are executed, you may gather further information about errors by relying on your browser's developer tools (i.e using the console and network tab to check out for details).