Hi
Could anybody please tell me how to invoke flow service asynchronously from another flow service, where both flow services will run from same IS server.
thanks
Srini
Hi
Could anybody please tell me how to invoke flow service asynchronously from another flow service, where both flow services will run from same IS server.
thanks
Srini
Hello,
If you do an async run of a service, then you would not be expected a return value from that service, because you will not no the return time and the rest of the code running would not be should of certain states of the system. Given this, you can use the publish/subscribe approach to invoking a service. There are even two forms, publish (no return) and publishAndWait (optional return), so if you don’t care of the return value you can just publish the information in a simple document type you define and have a trigger call the service you want to run async.
Good day.
Yemi Bedu
Yemi Bedu,
Thanks for your help, We found different approach, which invoking Java Service which internally call Service.doThreadInvoke method. If possible please tell me which approach is better in performance.
Thanks
Srini
Hello,
I could not really tell for two reasons:
I like the Trigger setup only because I like developing as visual as possible. Also, I think the doThreadInvoke may be more flexible for things like kill the thread early. I do know that there are enough features with Triggers so that I don’t have to type that in and can just work on the main business problem.
Good day.
Yemi Bedu
Srini,
You can use the Service.doThreadInvoke method to execute multiple tasks in parallel. If the integration problem you are trying to solve lends itself to being split into multiple discrete parts which can be assembled together at a later point using pub.sync:wait and pub.sync:notify, then you can decrease the overall time to complete your integration task significantly.
However, if the sequence of events in your integration task must be performed sequentially, using doThreadInvoke won’t affect performance significantly one way or another.
See this post for more discussion on this topic.
Mark