Revision 37199
Added by Michele Artini about 9 years ago
WorkflowsController.java | ||
---|---|---|
184 | 184 |
|
185 | 185 |
@RequestMapping("/ui/clone_metaworkflow.do") |
186 | 186 |
public @ResponseBody |
187 |
String cloneMetaWf(@RequestParam(value = "id", required = true) final String id,
|
|
187 |
String cloneMetaWf(@RequestParam(value = "code", required = true) final String code,
|
|
188 | 188 |
@RequestParam(value = "name", required = true) final String newName) throws Exception { |
189 | 189 |
|
190 | 190 |
if (newName.trim().length() > 0) { |
191 | 191 |
final String newCode = "metawf-" + UUID.randomUUID(); |
192 |
final MetaWorkflow metaWf = isLookupClient.getMetaWorkflow(id);
|
|
192 |
final MetaWorkflow metaWf = isLookupClient.getMetaWorkflow(code);
|
|
193 | 193 |
metaWf.setCode(newCode); |
194 | 194 |
metaWf.setName(newName); |
195 |
isRegistryClient.updateMetaWorkflow(metaWf);
|
|
195 |
isRegistryClient.registerMetaWorkflow(metaWf);
|
|
196 | 196 |
return newCode; |
197 | 197 |
} else { |
198 | 198 |
throw new IllegalArgumentException("Name is empty"); |
Also available in: Unified diff
partial adaptation to the new wf manager