Example of integrating ELMA with an external system (ELMA web service, SOA Connector)
A web service allows you to start process instances in ELMA from other applications. In this article, we give an example of the "Process Order" process, which is started when an order is made on a website.
Here is the graphic model of the process:
- select the "From external system" option. If you check the "Manually" option, the users with corresponding access permissions will be able to start the process from ELMA web application.
- generate a process token or enter it manually
- check the "Web Service" box
The order form on the website looks like this (the code for the form is attached to the article):
When "Send" is clicked, a php script is executed, sending a SOAP request:
The script receives the values from the order form, sends the URL of the WSDL document to the SoapClient class constructor, and receives the object for working with the required web service. In ELMA the WSDL document is stored at http://<system's URL>/Modules/EleWise.ELMA.Workflow.Processes.Web/WFPWebService.asmx?WSDL (<system's URL> must be replaced with the URL of your system). Then call the method of the object that has the same name as the method of the web service, and pass the value parameters. The Run method is used to start the process.
As a result, when a customer fills out an order form, the "Process Order" process starts in ELMA.