EasyVista as Web Services Consumer


Caution

The external Web Services used by EasyVista must be referenced in the Administration > Parameters > Web Services module before being able to access them via a process management (Workflow or Business rule).

Screens description

Menu access: Administration > Parameters > Web Services

Access information to the Web Service

         Web service - step 1.png

WSDL (URL): URL address where the Web Service is found. You may consult the UDDI (Universal Description Discovery and Integration) directory that includes all the declared Web Services by the suppliers.

Login / Password: Login / password used to access the Web Service.

Proxy: Proxy used by the Web Service.

Attached Files: All the necessary certificates for a secured Web Service access (Note: An SSL certificate is necessary when the URL address starts with https).

         Plus icon.png: Select a certificate and upload it.
         Minus icon.png: Delete one of the certificates.

Description of the Web Service

         Web service - step 2.png

Name: Description of the Web Service at the consumer.

Comment: Description of the Web Service given by the consumer.

Service (Note: Cannot be changed): Description of the Web Service at the supplier.

Port (Note: Cannot be changed): Address of the Web Service given by the supplier.

Method: Name of the calling procedure in the Web Service.

Parameter values of the Web Service

         Web service - step 3.png

Documentation (Note: Cannot be changed): Description of the Web Service given by the supplier.

Parameter: List of parameters defined for the Web Service.

Value: Default value of each parameter. Click on Edit icon.png to enter it.

Expected Return Value (Note: Do not complete this field if the Web Service returns a variable string - Example: Returning a new password by the Web Service Reset Passwords): Value returned by the Web Service when it executed without error. This value is used on a Web Service step level in a process to evaluate its exit value::

  • Value returned by the Web Service = Expected return value: No error; Continuation of the process --> Exit value of the Web Service step = True
  • Value returned by the Web Service <> Expected return value: Error; End of process --> Exit value of the Web Service step = False; Error processing (Orientation towards the error management, Notification of the error by email or a log file...)

Note: If it is not completed, the exit value of the Web Service step will always be True.

Procedure: How to define parameters for external Web Services and how to use them in process management

1. Proceed to the page Administration > Parameters > Web Services and click on Add icon.png.

2. Define the Web Service parameters by browsing the different steps via [ NEXT ] and save the modifications by clicking on [ FINISH ]. Note: To call the Web Service later, launch the Web Service Editor wizard.

3. To use the Web Service via a step of a process management:

  • Display the desired process or create a new process:
    • Business rule: Administration > Business Rules > Associated Process
    • Workflow: Transition or Operation > References > Workflows
  • Create a new step (In the diagram below, named e1) via Add icon.png and double-click on the frame to open the property window:
    • Action Type: Select the value Web Service Step;
    • Web Service Reference: Select the Web Service configured in step 2 and complete the value of the parameters (The list of parameters is displayed automatically with the default values defined during the configuration).
  • Define an instance variable to store the value returned by the Web Service:
    • Value Type: Variable
    • Variable / Value: @RESULT
  • Create the step to be carried out when the Web Service executes correctly and define its entry condition (Step e2 True):
                 Web service - Create step.jpg
    • Step Name: Step of the Web Service previously created
    • Exit Value: True --> green line on the graphical presentation
  • Create the step to be carried out when the Web Service return an error and define its entry condition (Step e2 False):
    • Step Name: Step of the Web Service previously created
    • Exit Value: False --> red line on the graphical presentation
  • In the 2 steps e2 True and e2 False, use the instance variable initialized in the Web Service step (e1) to process the value returned by the Web Service or specify the error code.

    Example documentation icon EN.png Step (e2 True) = Send mail step; In the message body, use the tag Workflow Variable to return the new password to the user:
                    --> Your password has been reset: The new password is #[VAR.erreurWebService]#.

    Example documentation icon EN.png Step (e2 False) = Send mail step; In the message body, use the tag Workflow Variable to notify the returned error by the Web Service:
                    --> The Web Service did not execute correctly; The returned error is #[VAR.erreurWebService]#.

Tags:
Last modified by Unknown User on 2015/11/16 13:21
Created by Administrator XWiki on 2013/03/25 18:23

Shortcuts

Recent changes
•  Service Manager
•  Service Apps
•  Self Help

Glossary

Powered by XWiki ©, EasyVista 2020