wf templates
This commit is contained in:
parent
6b7275e3bc
commit
81424be9d1
|
@ -1,6 +1,7 @@
|
|||
package eu.dnetlib.manager.wf.nodes.conf;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
|
@ -32,6 +33,12 @@ public class RegisterWfConfigurationNode extends AbstractJobNode {
|
|||
@WfInputParam
|
||||
private Api api;
|
||||
|
||||
@WfInputParam
|
||||
private String nativeMdStoreId;
|
||||
|
||||
@WfInputParam
|
||||
private String cleanedMdStoreId;
|
||||
|
||||
@WfOutputParam
|
||||
private String wfConfId;
|
||||
|
||||
|
@ -72,8 +79,10 @@ public class RegisterWfConfigurationNode extends AbstractJobNode {
|
|||
}
|
||||
|
||||
private Map<String, String> prepareSystemParams() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
final Map<String, String> map = new LinkedHashMap<>();
|
||||
map.put("nativeMdStoreId", nativeMdStoreId);
|
||||
map.put("cleanedMdStoreId", cleanedMdStoreId);
|
||||
return map;
|
||||
}
|
||||
|
||||
private boolean verifyConfiguration() {
|
||||
|
|
|
@ -0,0 +1,123 @@
|
|||
{
|
||||
"parameters":[
|
||||
{
|
||||
"name":"wfConfId",
|
||||
"description":"the Configuration to delete"
|
||||
},
|
||||
{
|
||||
"name":"dsId",
|
||||
"description":"the Datasource ID"
|
||||
},
|
||||
{
|
||||
"name":"apiId",
|
||||
"description":"the Api ID"
|
||||
},
|
||||
{
|
||||
"name":"nativeMdStoreId",
|
||||
"description":"Native Metadata Store ID"
|
||||
},
|
||||
{
|
||||
"name":"cleanedMdStoreId",
|
||||
"description":"Cleaned Metadata Store ID"
|
||||
}
|
||||
],
|
||||
"graph":[
|
||||
{
|
||||
"name":"LOAD_DS_INFO",
|
||||
"type":"loadDatasourceInfo",
|
||||
"start": true,
|
||||
"input":[
|
||||
{
|
||||
"name":"dsId",
|
||||
"ref":"dsId"
|
||||
},
|
||||
{
|
||||
"name":"apiId",
|
||||
"ref":"apiId"
|
||||
}
|
||||
],
|
||||
"output":[
|
||||
{
|
||||
"name":"ds",
|
||||
"env":"ds"
|
||||
},
|
||||
{
|
||||
"name":"api",
|
||||
"env":"api"
|
||||
}
|
||||
],
|
||||
"arcs":[
|
||||
{
|
||||
"to":"DELETE_DC"
|
||||
},
|
||||
{
|
||||
"to":"DELETE_DMF"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"DELETE_DC",
|
||||
"type":"deleteMdStore",
|
||||
"input":[
|
||||
{
|
||||
"name":"mdId",
|
||||
"ref":"nativeMdStoreId"
|
||||
}
|
||||
],
|
||||
"arcs":[
|
||||
{
|
||||
"to":"DELETE_WF_CONF"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"DELETE_OAF",
|
||||
"type":"deleteMdStore",
|
||||
"input":[
|
||||
{
|
||||
"name":"mdId",
|
||||
"ref":"cleanedMdStoreId"
|
||||
}
|
||||
],
|
||||
"arcs":[
|
||||
{
|
||||
"to":"DELETE_WF_CONF"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"DELETE_WF_CONF",
|
||||
"type":"registerWfConfiguration",
|
||||
"join": true,
|
||||
"input":[
|
||||
{
|
||||
"name":"wfConfId",
|
||||
"ref":"wfConfId"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,234 @@
|
|||
{
|
||||
"parameters":[
|
||||
{
|
||||
"name":"wfId",
|
||||
"description":"the workflow to be configured",
|
||||
"defaultValue": "wf-aggr-dc2oaf"
|
||||
},
|
||||
{
|
||||
"name":"destroyWfId",
|
||||
"description":"the workflow to remove the configuration",
|
||||
"defaultValue": "wf-destroy-dc2oaf"
|
||||
},
|
||||
{
|
||||
"name":"dsId",
|
||||
"description":"the Datasource ID"
|
||||
},
|
||||
{
|
||||
"name":"apiId",
|
||||
"description":"the Api ID"
|
||||
},
|
||||
{
|
||||
"name":"expectedEoscDatasourceTypes",
|
||||
"description":"the expected ds types (comma separated)"
|
||||
},
|
||||
{
|
||||
"name":"expectedCompatibilities",
|
||||
"description":"the expected compatibilities (comma separated)"
|
||||
}
|
||||
],
|
||||
"graph":[
|
||||
{
|
||||
"name":"LOAD_DS_INFO",
|
||||
"type":"loadDatasourceInfo",
|
||||
"start": true,
|
||||
"input":[
|
||||
{
|
||||
"name":"dsId",
|
||||
"ref":"dsId"
|
||||
},
|
||||
{
|
||||
"name":"apiId",
|
||||
"ref":"apiId"
|
||||
}
|
||||
],
|
||||
"output":[
|
||||
{
|
||||
"name":"ds",
|
||||
"env":"ds"
|
||||
},
|
||||
{
|
||||
"name":"api",
|
||||
"env":"api"
|
||||
}
|
||||
],
|
||||
"arcs":[
|
||||
{
|
||||
"to":"VERIFY_DS"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"VERIFY_DS",
|
||||
"type":"verifyDatasource",
|
||||
"input":[
|
||||
{
|
||||
"name":"expectedEoscDatasourceTypes",
|
||||
"ref":"expectedEoscDatasourceTypes"
|
||||
},
|
||||
{
|
||||
"name":"expectedCompatibilities",
|
||||
"ref":"expectedCompatibilities"
|
||||
},
|
||||
{
|
||||
"name":"ds",
|
||||
"env":"ds"
|
||||
},
|
||||
{
|
||||
"name":"api",
|
||||
"env":"api"
|
||||
}
|
||||
|
||||
],
|
||||
"output":[
|
||||
{
|
||||
"name":"outputStream",
|
||||
"env":"origStream"
|
||||
}
|
||||
],
|
||||
"arcs":[
|
||||
{
|
||||
"to":"CREATE_DC"
|
||||
},
|
||||
{
|
||||
"to":"CREATE_OAF"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"CREATE_DC",
|
||||
"type":"createMdStore",
|
||||
"input":[
|
||||
{
|
||||
"name":"format",
|
||||
"value":"oai_dc"
|
||||
},
|
||||
{
|
||||
"name":"layout",
|
||||
"value":"native"
|
||||
},
|
||||
{
|
||||
"name":"interpretation",
|
||||
"value":"store"
|
||||
},
|
||||
{
|
||||
"name":"ds",
|
||||
"env":"ds"
|
||||
},
|
||||
{
|
||||
"name":"api",
|
||||
"env":"api"
|
||||
}
|
||||
],
|
||||
"output":[
|
||||
{
|
||||
"name":"mdId",
|
||||
"env":"mdId_dc"
|
||||
}
|
||||
],
|
||||
"arcs":[
|
||||
{
|
||||
"to":"REGISTER_WF_CONF"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"CREATE_OAF",
|
||||
"type":"createMdStore",
|
||||
"input":[
|
||||
{
|
||||
"name":"format",
|
||||
"value":"OAF"
|
||||
},
|
||||
{
|
||||
"name":"layout",
|
||||
"value":"cleaned"
|
||||
},
|
||||
{
|
||||
"name":"interpretation",
|
||||
"value":"store"
|
||||
},
|
||||
{
|
||||
"name":"ds",
|
||||
"env":"ds"
|
||||
},
|
||||
{
|
||||
"name":"api",
|
||||
"env":"api"
|
||||
}
|
||||
],
|
||||
"output":[
|
||||
{
|
||||
"name":"mdId",
|
||||
"env":"mdId_oaf"
|
||||
}
|
||||
],
|
||||
"arcs":[
|
||||
{
|
||||
"to":"REGISTER_WF_CONF"
|
||||
}
|
||||
]
|
||||
|
||||
},
|
||||
{
|
||||
"name":"REGISTER_WF_CONF",
|
||||
"type":"registerWfConfiguration",
|
||||
"join": true,
|
||||
"input":[
|
||||
{
|
||||
"name":"wfId",
|
||||
"ref":"wfId"
|
||||
},
|
||||
{
|
||||
"name":"destroyWfId",
|
||||
"ref":"destroyWfId"
|
||||
},
|
||||
{
|
||||
"name":"ds",
|
||||
"env":"ds"
|
||||
},
|
||||
{
|
||||
"name":"api",
|
||||
"env":"api"
|
||||
},
|
||||
{
|
||||
"name":"nativeMdStoreId",
|
||||
"env":"mdId_dc"
|
||||
},
|
||||
{
|
||||
"name":"cleanedMdStoreId",
|
||||
"env":"mdId_oaf"
|
||||
}
|
||||
],
|
||||
"output":[
|
||||
{
|
||||
"name":"wfConfId",
|
||||
"env":"wfConfId"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue