A web service communicates through its methods. Each method does a certain operation in a process in ELMA.
For a complete list of available web service methods and their description, go to the web service page: server_address/Modules/EleWise.ELMA.Workflow.Processes.Web/WFPWebService.asmx (Fig. 1).
Fig. 1. List of web service methods.
To view the format of the SOAP request and response, go to the web service's page. Click on the method's name. A page will open offering a description of the method. Apart from the text description, it also shows examples of requests for the SOAP 1.1 and SOAP 1.2 versions. For actual requests, you can simply replace the example values with the real ones.
There are nine methods available:
Run. Initiates a process instance. The fields of the message can contain variable values that must be included in the process context at process start.
LoadContext. Receives values of the process context variables. The received values can then be used in the external application.
SaveContext. Adds data to the context of a launched process.
ExecuteTask. Completes a process task. This method receives the task's ID, transition's UID and necessary values of the context variables of a process. The task is then executed with the specified context, and the flow takes the specified transition. This method does not check the data integrity, it should be checked by the application that sends the request.
GetStatus. Receives the process instance status. For example, you can find out if the process instance has been completed or not.
GetActiveTasks. Receives a list of a user's active tasks (tasks, which are not completed at the moment). Apart from the task name and ID, the response of the web service contains the task's parameters, such as creation and due dates, and executor's name and ID.
SendMessage and SendMessageToInstance. Send messages to a business process. This method is useful in ELMA business processes, which use the Receive Message activity. When the process flow reaches the Receive Message activity, the process is suspended. It then resumes after receiving a specific message created by the methods in question. The process body can transfer parameters, which are then loaded to the process context. The difference between SendMessage and SendMessageToInstance is that the first method can send a message to any process instance, while the second method sends messages to a specific process.
Terminate. Stops execution of a process instance. The message body can contain a text explaining the reason for cancelling process.
The SOA Connector is an integral part of ELMA system and does not require any adjustments. Using SOAP methods to address business processes and their instances is possible only if the processes are published with correct tokens and have the From external and Web Service options enabled in the Process Start Variants section (Fig. 2).
Fig. 2. Publishing settings that enable web services.
Apart form the web services that address business processes, ELMA features several PublicAPI web services. To see their full list, with methods and descriptions, go to the PublicAPI page, available at server_address/API/Help/Services.