Revision 46885
Added by Michele Artini almost 7 years ago
MsroWorkerClient.java | ||
---|---|---|
1 | 1 |
package eu.dnetlib.clients.msro; |
2 | 2 |
|
3 |
import java.util.Map; |
|
4 |
|
|
3 | 5 |
import org.springframework.beans.factory.annotation.Autowired; |
4 | 6 |
import org.springframework.context.annotation.Scope; |
5 | 7 |
import org.springframework.stereotype.Component; |
... | ... | |
9 | 11 |
import eu.dnetlib.enabling.annotations.DnetServiceClient; |
10 | 12 |
import eu.dnetlib.enabling.annotations.DnetServiceType; |
11 | 13 |
import eu.dnetlib.msro.workflows.WorkflowInstance; |
14 |
import eu.dnetlib.msro.workflows.WorkflowRef; |
|
12 | 15 |
import eu.dnetlib.services.async.AsyncClientCallback; |
13 | 16 |
import eu.dnetlib.services.async.AsyncClientUtils; |
14 | 17 |
|
... | ... | |
24 | 27 |
return (new RestTemplate()).getForObject(getBaseUrl(), MsroWorkerRunningInstance.class); |
25 | 28 |
} |
26 | 29 |
|
27 |
public void execute(final WorkflowInstance wf, final String localBaseUrl, final AsyncClientCallback callback) { |
|
28 |
asyncClientUtils.invokeRemoteMethod(getBaseUrl(), "startWorkflow", localBaseUrl, wf, callback); |
|
30 |
public WorkflowRef execute(final WorkflowInstance wf, final String localBaseUrl, final AsyncClientCallback callback) { |
|
31 |
final Map<String, String> info = asyncClientUtils.invokeRemoteMethod(getBaseUrl(), "startWorkflow", localBaseUrl, wf, callback); |
|
32 |
|
|
33 |
return new WorkflowRef(info.get("procId"), getBaseUrl()); |
|
29 | 34 |
} |
30 | 35 |
|
31 | 36 |
} |
Also available in: Unified diff
Partial response of async methods