Revision 41480
Added by Michele Artini over 8 years ago
WorkflowsController.java | ||
---|---|---|
166 | 166 |
f.setText(((Node) o).getText()); |
167 | 167 |
} |
168 | 168 |
|
169 |
final Element wfs = extra.addElement("workflows"); |
|
170 |
for (final WorkflowItem item : this.isLookupClient.listWorflowsForApi(repoId, ifaceId)) { |
|
171 |
final Element wf = wfs.addElement("workflow"); |
|
172 |
wf.addAttribute("id", item.getWfId()); |
|
173 |
wf.addAttribute("name", item.getName()); |
|
174 |
wf.addAttribute("description", item.getDesc()); |
|
175 |
} |
|
176 |
|
|
169 | 177 |
final Map<String, String> params = new HashMap<String, String>(); |
170 | 178 |
params.put("profileId", doc.valueOf("//RESOURCE_IDENTIFIER/@value")); |
171 | 179 |
params.put("ifaceId", ifaceId); |
... | ... | |
358 | 366 |
} |
359 | 367 |
|
360 | 368 |
@RequestMapping("/ui/wf/repohi.start") |
361 |
public @ResponseBody String newRepoWorkflow(@RequestParam(value = "id", required = true) final String repoId,
|
|
369 |
public @ResponseBody List<String> newRepoWorkflow(@RequestParam(value = "id", required = true) final String repoId,
|
|
362 | 370 |
@RequestParam(value = "iface", required = true) final String ifaceId, |
363 | 371 |
@RequestParam(value = "wf", required = true) final String wfId) throws Exception { |
364 | 372 |
|
... | ... | |
366 | 374 |
envParams.put(WorkflowsConstants.DATASOURCE_ID, repoId); |
367 | 375 |
envParams.put(WorkflowsConstants.DATASOURCE_INTERFACE, ifaceId); |
368 | 376 |
|
369 |
return this.workflowExecutor.startWorkflow(wfId, envParams, null);
|
|
377 |
return Lists.newArrayList(this.workflowExecutor.startWorkflow(wfId, envParams, null));
|
|
370 | 378 |
} |
371 | 379 |
|
372 | 380 |
@RequestMapping("/ui/wf/repobye.start") |
373 |
public @ResponseBody String destroyRepoWorkflow(@RequestParam(value = "destroyWf", required = true) final String destroyWfId)
|
|
381 |
public @ResponseBody List<String> destroyRepoWorkflow(@RequestParam(value = "destroyWf", required = true) final String destroyWfId)
|
|
374 | 382 |
throws Exception { |
375 |
return this.workflowExecutor.startWorkflow(destroyWfId, null, null);
|
|
383 |
return Lists.newArrayList(this.workflowExecutor.startWorkflow(destroyWfId, null, null));
|
|
376 | 384 |
} |
377 | 385 |
|
378 | 386 |
} |
Also available in: Unified diff
Repo HI