The service connectors framework allows developers to create their own connectors and to bind them to events thrown by various objects involved in the document manipulation.
The framework gives a standard way of defining :
A connector is a package of several connectors (treatments or services). Any connector included in this package use the same type of connection.
Error during retrieving content skip as ignoreDownloadError activated.
A connector is defined with the following attributes:
Service connectors can be bind to several elements:
The XML service connector definition file should be deployed on the custom/connectors folder. Its name must be unique on the VDoc server. To prevent name conflicts it is recommended to use the following template: companyName-connectorsType.xml (e.i. vdoc-education.xml). This XML definition file provides all the necessary information to describe a service connector:
Error during retrieving content skip as ignoreDownloadError activated.
A runtime class is a Java class which will be called by the framework when a user changes the state of a process document. A runtime class must extend the com.axemble.vdoc.sdk.connectors.BaseServiceConnector class.
By creating a service connector runtime class you need to implement the following method:
Three other methods could be overridden:
A runtime class is declared as follow:
Error during retrieving content skip as ignoreDownloadError activated.
The configuration definition allows developers to specify a list of <field> tags the designer could use to properly configure a treatment connector. These fields can be categorized into <section> tags. To make the configuration more dynamic an editor class could be specified.
Error during retrieving content skip as ignoreDownloadError activated.
An editor class is a Java class which allows developers to produce dynamic behaviors on the treatment connector configuration properties (XML definition file). An editor class must extend the com.axemble.vdoc.sdk.connectors.BaseConnectionEditor class.
The editor class works in the same way as the document or resource extensions. You can override the following standard methods:
Specifically to treatment connector editor class, the connector Framework provides the following methods:
An editor class is declared as follow:
Error during retrieving content skip as ignoreDownloadError activated.
The <inputs> tag allows developer to specify which named values should be made available while the service is running. In order to make some named values available you need to declare the inputs as follow:
Error during retrieving content skip as ignoreDownloadError activated.
The <outputs> tag allows developer to specify which named and localized values are made available for the designer. In order to make some values available you need to declare the outputs as follow:
Error during retrieving content skip as ignoreDownloadError activated.
and use the addOutput method within the runtime class as follow:
this.getServiceOutputs().addOutput( "result", Boolean.FALSE ); this.getServiceOutputs().addOutput( "errorMessage", "None event found!" ); this.getServiceOutputs().addOutput( "error", -900 );
The Studio makes some of its screen parts available for including new features (workflow library and connectors library). The <entry-points> tag allows developers to specify where a service will be included and how it will be categories within a specific screen part. Be aware this feature is not available yet in the current version.
Error during retrieving content skip as ignoreDownloadError activated.
The Studio declares several trigger events available on each element such as workflow, resource definition, property, form, and field. The available trigger events are very similar to the methods usually fired on document extensions and on JavaScript triggers. The connector Framework keeps the same life cycle for the trigger events as the callbacks executed on document extensions and JavaScript triggers.
The Studio declares two types of trigger events:
System name | Label | Description |
onAbortWorkflowInstance | During cancellation | The connector will run on process cancellation. |
onRemindWorkflowInstance | During the operators remind | The connector will run on remind of the current step(s) operators. |
onCreateEmbeddedWorkflowInstance | During the embedded process creation | The connector will run on the creation of the embedded process document in the process. |
onRemoveWorkflowInstance | At the end of deletion of the process document | The connector will run once the process document deleted. |
onStartRemovingWorkflowInstance | During deletion of the process document | The connector will run when the process document is being deleted. |
onEvaluateOperators | At the evaluation of the next operators | The connector will run on the next step 's operators selection. Allow to define who will be the next step(s) operators. The connector will be called for each step. |
onCreateTaskInstance | At the start of the next step | The connector will run on the start of the next step(s). Allow to define dynamic parameters on the step in creation (ie. time duration of the step). |
onTerminateTaskInstance | At the step closure | The connector will run on the step closure. |
onGenerateReference | On the formatted reference's generation | The connector will run on the generation of the document's or the data record's reference. |
onBeforeCreate | During creation | The connector will run when creating the document or the record. |
onBeforeSave | During saving | The connector will run when saving the document or the record. |
onAfterSave | At the end of saving | The connector will run once the document or data has been saved. |
onPropertyChanged | Au changement de valeur du champ | Le connecteur s'exécutera au changement du contenu du champ. |
onRemove | At the end of deletion | The connector will run once the resource has been deleted. |
onStartRemoving | During deletion | The connector will run when the resource is being deleted. |
onBeforeSummit | During step change | The connector will run on step change, once the user will have clicked on the action button from the step form and before the step change wizard displays. Allows to stop or not, depending on criteria, the display of the step change wizard. |
onAfterSummit | At the end of step change champ | The connector will run after the form step change, once the step change wizard will be closed. |
System name | Label | Description |
onBeforeLoad | Before form loading | The connector will run before the form displays. |
onAfterLoad | After form loading | The connector will run after the form displays. |
onBeforeSave | On click on the Save button | The connector will run once the user will have clicked the Save button. |
onAfterSave | During saving | The connector will run on the recording of form. |
onBeforeClose | Before closure | The connector will run on form closure, once the user will have clicked on the Close button. Allows to stop or not, depending on criteria, the document closure. |
onBeforeSendInformation | On click on the Send an information email button | The connector will run when the user will click the Send an information email button from the form. Allow to stop or not, depending on criteria, the display of the information sending wizard. |
onAfterSendInformation | On receipt of the information email | The connector will run after the information email sending from the form, once the email has been received. |
onBeforeSubmit | On click on the step change button | The connector will run on step change, once the user will have clicked on the action button from the step form and before the step change wizard displays. Allows to stop or not, depending on criteria, the display of the step change wizard. |
onAfterSubmit | During step change | The connector will run during the form step change, once the step change wizard will be closed. |
onBeforeAbort | On click on the Cancel my request button | The connector will run when the user will click on the Cancel delegation button from the process form. Allow to stop or not, depending on criteria, the display of the cancellation wizard. |
onBeforeRemind | On click on the Remind button | The connector will run when the user will click on the Remind button from the process form. Allow to stop or not, depending on criteria, the display of the remind wizard. |
onBeforeDelegate | On click on the Delegate the document button | The connector will run once the user will click on the Delegate the document button from the form. Allow to stop or not, depending on criteria, the display of the delegation wizard. |
onAfterDelegate | At the end of the document delegation | The connector will run once the delegation ended. |
onBeforeCancelDelegation | On click on the Cancel delegation button | The connector will run once the user will click on the Cancel delegation button from the form. Allow to stop or not, depending on criteria, the display of the delegation cancellation wizard. |
onAfterCancelDelegation | During the delegation cancellation | The connector will run during the cancellation of the delegation request. |
onBeforeRefuseDelegation | On click on Refuse the delegation button | The connector will run when the user will click on Refuse delegation before the wizard displays. Allow to stop or not, depending on criteria, the display of the delegation refusal wizard. |
onAfterRefuseDelegation | During the delegation refusal | The connector will run during refusing the delegation, once the wizard will be closed. |
onBeforeDelegateTaskOnly | On click on the Delegate the step button | The connector will run once the user will have clicked on the Delegate button from the step form. |
onAfterDelegateTaskOnly | At the end of the step delegation | The connector will run once the step delegation ended. |
onPropertyChanged | On field value change | The connector will run when the field will be modifying. Allow the cascading lists. |
The <supported-events> tag allows developers to specify the events on which a service can be bind and to set the default one depending on the runtime execution context.
Error during retrieving content skip as ignoreDownloadError activated.
In order to localize the configuration and the error messages of the service to different languages, you should always specify each string as a resource. The XML resource file should be deployed on the custom/internationalization folder. Its name must be unique on the VDoc server. To prevent name conflicts it is recommended to use the following template: companyName-connectionType-resources.xml (e.i. vdoc-education-resources.xml). This file must contain every string used for the service.
Error during retrieving content skip as ignoreDownloadError activated.