The problem is this: there is a dynamic table with 3 columns and an unknown number of rows (depending on the choice of the user).

It is necessary to transfer data from this table to soma in Elma. How to do it right?

SOA connector code:

<wsdl:types> <s:schema elementFormDefault="qualified" targetNamespace="http://www.elma-bpm.ru/WFPWebService/"> <s:import namespace="http://microsoft.com/wsdl/types/"/> <s:element name="Run"> <s:complexType> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="userName" type="s:string"/> <s:element minOccurs="0" maxOccurs="1" name="password" type="s:string"/> <s:element minOccurs="0" maxOccurs="1" name="token" type="s:string"/> <s:element minOccurs="0" maxOccurs="1" name="instanceName" type="s:string"/> <s:element minOccurs="0" maxOccurs="1" name="data" type="tns:WebData"/> </s:sequence> </s:complexType> </s:element> <s:complexType name="WebData"> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="Items" type="tns:ArrayOfWebDataItem"/> <s:element minOccurs="0" maxOccurs="1" name="Value" type="s:string"/> </s:sequence> </s:complexType> <s:complexType name="ArrayOfWebDataItem"> <s:sequence> <s:element minOccurs="0" maxOccurs="unbounded" name="WebDataItem" nillable="true" type="tns:WebDataItem"/> </s:sequence> </s:complexType> <s:complexType name="WebDataItem"> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="Name" type="s:string"/> <s:element minOccurs="0" maxOccurs="1" name="Value" type="s:string"/> <s:element minOccurs="0" maxOccurs="1" name="Data" type="tns:WebData"/> <s:element minOccurs="0" maxOccurs="1" name="DataArray" type="tns:ArrayOfWebData"/> </s:sequence> </s:complexType> <s:complexType name="ArrayOfWebData"> <s:sequence> <s:element minOccurs="0" maxOccurs="unbounded" name="WebData" nillable="true" type="tns:WebData"/> </s:sequence> </s:complexType> 

Php implementation

 $userName = ""; //логин пользователя от которого будет запущен процесс $password =""; //пароль пользователя от которого будет запущен процесс $token = ""; //токен процесса $instanceName = $_POST['']; //название экземпляра процесса $data = new stdClass(); $data->Items = new stdClass(); $data->Items->WebDataItem = array(); // Формируем массив контекстных переменных. $data->Items->WebDataItem[0] = array("Name"=>"", "Value"=>$_POST['']); // Массив параметров необходимых для запуска процесса $parameters = array( "userName"=>$userName, "password"=>$password, "token"=>$token, "instanceName"=>$instanceName, "data"=>$data); if($_POST['']) { // Создание SOAP-клиента по WSDL $client = new SoapClient("http://.../Modules/EleWise.ELMA.Workflow.Processes.Web/WFPWebService.asmx?WSDL"); //Вызов метода Run для запуска экземпляра процесса $client->Run($parameters); 

Table code:

 <table name="Table" id="Table"> <thead> <tr> <th scope="col">№</th> <th scope="col">Город</th> <th scope="col">Кол-во раб.мест</th> </tr> </thead> <tbody id="dynamic"> <tr> <td> <label> <input type="text" name="col1" > </label> </td> <td> <label> <input type="text" name="col2" > </label> </td> <td> <label> <input type="text" name="col3" > </label> </td> <td> <button type="button" class="add">+</button> <button type="button" class="del">-</button> </td> </tr> </tbody> </table> 

Taken from here: https://bitbucket.org/moskitos80/dynamictable/downloads/

  • Get rid of the table , wrap it in a form and rejoice - rjhdby
  • How?) Here is a condition that you need to constantly add new lines. I can not imagine how to do this simply in the form. - Sanjar Ospanov

0