Webservice run process as job (async behaviour)

126 views
Skip to first unread message

norber...@multimageweb.com

unread,
Jul 15, 2017, 10:46:26 AM7/15/17
to iDempiere

hi experts


We running processes by webservice - where running time is longer then API timeout.

we would like avoid timeout and inform client about status of running.


workflow

1. client send SOAP request

2. server start runProcess with “run as job” parameter or optional default run as job feauture

3. server process started - approx. running duration will take 3 minutes

4. server return process process_instance_idto soap client

5. client store instance id locally - also take action on client env e.g block user e.g. on device to take action until operation not finished.

7. client ask SOAP endpoint periodically does Process Instance still running 

- Response  Running = ‘Y’  so plan next request + 15sec

- Response  Running = ‘N’ OR processed = Y - client unlock device process. end.


we would like to run this feature in core - applicable above approach to any process.


if above feature is not available then we suggest improve idempiere web service method = Run Process by Run as Job flag or option receive this parameter and return process instance id to client

then we add a new endpoint to validate process instance status.


i would like to hear others opinion well.

WDYT ?


best regards. norbert.

norber...@multimageweb.com

unread,
Jul 25, 2017, 11:02:53 AM7/25/17
to iDempiere
anybody pls ? n

Heng Sin Low

unread,
Jul 26, 2017, 1:54:07 AM7/26/17
to idem...@googlegroups.com
Hi Norbert,

That would be a nice enhancement. Run as job should be an optional parameter for the runProcess call and should default to false for backward compatibility. The existing run as job option have the notification feature, you might want to include that as an option as well.

The status query endpoint should provide the ability for client to retrieve the process's artifacts ( log, export file, pdf, etc ) as well. 

Beside the passive pull, it will be nice to have a server push mechanism as well, for e.g, an url from the client that the server will call to notify the client.

Regards,
Low

This e-mail is confidential and may contain legally privileged information. It is intended only for the addressees and may not be reviewed or used in any way by other recipients. If you have received this e-mail in error, kindly notify us immediately by telephone or e-mail and delete the message and any attachments thereto from your system.

--
You received this message because you are subscribed to the Google Groups "iDempiere" group.
To unsubscribe from this group and stop receiving emails from it, send an email to idempiere+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/idempiere/ba028c80-fce5-4a50-974e-ff34b79fbb70%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages