Revision 46885
Added by Michele Artini almost 7 years ago
WorkflowDispatcher.java | ||
---|---|---|
110 | 110 |
return wf; |
111 | 111 |
} |
112 | 112 |
|
113 |
public void startWorkflowTemplate(final WorkflowTemplate wf,
|
|
113 |
public WorkflowRef startWorkflowTemplate(final WorkflowTemplate wf,
|
|
114 | 114 |
final String localBaseUrl) throws MSROException { |
115 |
startWorkflowTemplate(wf.getId(), wf.getParent(), wf.getName(), wf.getFamily(), wf.getDsId(), wf.getIface(), wf.getParams(), localBaseUrl); |
|
115 |
return startWorkflowTemplate(wf.getId(), wf.getParent(), wf.getName(), wf.getFamily(), wf.getDsId(), wf.getIface(), wf.getParams(), localBaseUrl);
|
|
116 | 116 |
} |
117 | 117 |
|
118 |
public void startWorkflowTemplate(final String profileId,
|
|
118 |
public WorkflowRef startWorkflowTemplate(final String profileId,
|
|
119 | 119 |
final String parent, |
120 | 120 |
final String name, |
121 | 121 |
final String family, |
... | ... | |
155 | 155 |
wf.setGlobalParams(globalParams); |
156 | 156 |
wf.setParent(parent); |
157 | 157 |
|
158 |
executeWf(wf, localBaseUrl); |
|
158 |
return executeWf(wf, localBaseUrl);
|
|
159 | 159 |
} catch (final Exception e) { |
160 | 160 |
log.error("Error starting workflow template: " + profileId, e); |
161 | 161 |
throw new MSROException("Error starting workflow template", e); |
... | ... | |
169 | 169 |
|
170 | 170 |
log.info("Assigning wf " + wf.getProfileId() + " to worker " + worker.getBaseUrl() + ", procId: "); |
171 | 171 |
|
172 |
worker.execute(wf, localBaseUrl, new AsyncClientCallback() { |
|
172 |
return worker.execute(wf, localBaseUrl, new AsyncClientCallback() {
|
|
173 | 173 |
|
174 | 174 |
private ObjectMapper mapper = new ObjectMapper(); |
175 | 175 |
|
... | ... | |
200 | 200 |
} |
201 | 201 |
} |
202 | 202 |
}); |
203 |
|
|
204 |
return new WorkflowRef(null, worker.getBaseUrl()); |
|
205 | 203 |
} |
206 | 204 |
|
207 | 205 |
private void saveResponse(final WorkflowInstance wf, final boolean success, final Map<String, String> res) { |
Also available in: Unified diff
Partial response of async methods