Enhancing Run Process
Description
Environment
Attachments
- 28 Oct 2015, 01:40 PM
- 21 Oct 2015, 01:20 PM
relates to
Activity
Diego Ruiz August 22, 2020 at 7:52 PM
Triaged by Diego Ruiz,
Closed as a potential idea due to inactivity.
If any of you guys want to take the patches and create the corresponding pull request, please feel free to reopen the ticket with additional information.
Also closing it, as I see the project is moving towards using the REST-API client than the SOAP one.
Deepak Pansheriya October 28, 2015 at 1:44 PM
Carlos added plugin for testing.
Here are below steps that you need to perform.
1. import 2pack Web Service Type.zip as Garden Admin
2. import Process.zip as system admin.
3. Below is backward compitability test
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:_0="http://idempiere.org/ADInterface/1_0">
<soapenv:Header/>
<soapenv:Body>
<_0:runProcess>
<_0:ModelRunProcessRequest>
<_0:ModelRunProcess AD_Process_ID="1000073">
<_0:serviceType>Tripsy_GenerateDocumentNo</_0:serviceType>
<_0aramValues>
<_0:field column="TableName">
<_0:val>M_Product</_0:val>
</_0:field>
</_0aramValues>
</_0:ModelRunProcess>
<_0:ADLoginRequest>
<_0:user>GardenAdmin</_0:user>
<_0ass>GardenAdmin</_0
ass>
<_0:lang>192</_0:lang>
<_0:ClientID>11</_0:ClientID>
<_0:RoleID>102</_0:RoleID>
<_0:OrgID>0</_0:OrgID>
<_0:WarehouseID>0</_0:WarehouseID>
<_0:stage>0</_0:stage>
</_0:ADLoginRequest>
</_0:ModelRunProcessRequest>
</_0:runProcess>
</soapenv:Body>
</soapenv:Envelope>
Response will be like:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns1:runProcessResponse xmlns:ns1="http://idempiere.org/ADInterface/1_0">
<RunProcessResponse xmlns="http://idempiere.org/ADInterface/1_0">
<Summary>10000008</Summary>
<LogInfo/>
</RunProcessResponse>
</ns1:runProcessResponse>
</soap:Body>
</soap:Envelope>
3. Below is new service test
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:_0="http://idempiere.org/ADInterface/1_0">
<soapenv:Header/>
<soapenv:Body>
<_0:runProcessTrx>
<_0:ModelRunProcessRequest>
<_0:ModelRunProcess AD_Process_ID="1000073">
<_0:serviceType>Tripsy_GenerateDocumentNo</_0:serviceType>
<_0aramValues>
<_0:field column="TableName">
<_0:val>M_Product</_0:val>
</_0:field>
</_0aramValues>
</_0:ModelRunProcess>
<_0:ADLoginRequest>
<_0:user>GardenAdmin</_0:user>
<_0ass>GardenAdmin</_0
ass>
<_0:lang>192</_0:lang>
<_0:ClientID>11</_0:ClientID>
<_0:RoleID>102</_0:RoleID>
<_0:OrgID>0</_0:OrgID>
<_0:WarehouseID>0</_0:WarehouseID>
<_0:stage>0</_0:stage>
</_0:ADLoginRequest>
</_0:ModelRunProcessRequest>
</_0:runProcessTrx>
</soapenv:Body>
</soapenv:Envelope>
Response:
You will notice output fields which is more parsable way for out put parameters.
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns1:runProcessTrxResponse xmlns:ns1="http://idempiere.org/ADInterface/1_0">
<StandardResponse IsError="false" xmlns="http://idempiere.org/ADInterface/1_0">
<Error>10000009</Error>
<outputFields>
<outputField column="docNo" value="10000009"/>
</outputFields>
<RunProcessResponse>
<Summary>10000009</Summary>
<LogInfo/>
</RunProcessResponse>
</StandardResponse>
</ns1:runProcessTrxResponse>
</soap:Body>
</soap:Envelope>
Deepak Pansheriya October 20, 2015 at 1:03 PM
Carlos,
I reverted ValueNamePair and same is pushed to https://bitbucket.org/logilite/logilite-experiment.
Carlos Ruiz October 13, 2015 at 6:47 PM
@Deepak Pansheriya, I think the change to ValueNamePair is not needed, in the end you're returning again a String.
Also this class is widely used, and in iDempiere Value and Name are Strings.
Maybe if you want to add a new kind of manager for this then it would be better to add an ObjectNamePair - but I insist, reading the code it seems is not needed at all for this ticket.
Deepak Pansheriya October 13, 2015 at 6:32 PM
Carlos,
I will provide sample SOAP request for testing as well as webservice configuration required for same.
Also please note that ValueNamePair are used to pass output fields from process to web service. It now instead of string, can be any object as same is maintained in Ctx too for other service to consume.
I reverted PROCESS_RPT_M_MOVEMENT related missing code line. Those may be due to my merging of code.
Currently RunProcess uses RunProcessDocument which can be reduce. ModelRunProcess structure contains all detail which are in RunProcess.
Also need to add ctx variable support to make it compatible with composite service.
Following changes are done in modelRunProcess
1. Change return type from RunProcessResponse to StandardResponse.
2. Added support for Transaction Management so can run same from composite service
3. Added support for Ctx variable. Output parameter of RunProcess execution are available to next service in composite request as <Webservice Type>-<Output Name>
4. Out put of runResponse are OutputField element