dnet-applications/libs/dnet-wf-service/src/main/resources/wf_templates/collect.json

282 lines
4.1 KiB
JSON

{
"parameters":[
{
"name":"dsId",
"description":"Datasource ID"
},
{
"name":"dsPrefix",
"description":"Datasource Prefix"
},
{
"name":"dsName",
"description":"Datasource Name"
},
{
"name":"apiId",
"description":"Datasource API"
},
{
"name":"mode",
"description":"Collection Mode",
"defaultValue":"REFRESH"
},
{
"name":"mdStoreId",
"description":"Metadata Store ID"
},
{
"name":"overrideFromDate",
"description":"Override the default fromDate (history)",
"type":"DATE",
"required":"false"
},
{
"name":"overrideFromDate",
"description":"Override the default untilDate (now)",
"type":"DATE",
"required":"false"
}
],
"graph":[
{
"name":"SELECT_MODE",
"start":true,
"arcs":[
{
"to":"COLLECT_REFRESH",
"condition":"mode != 'INCREMENTAL'"
},
{
"to":"PREPARE_INCREMENTAL",
"condition":"mode == 'INCREMENTAL'"
}
]
},
{
"name":"COLLECT_REFRESH",
"type":"collect",
"input":[
{
"name":"dsId",
"ref":"dsId"
},
{
"name":"apiId",
"ref":"apiId"
}
],
"output":[
{
"name":"outputStream",
"env":"collectStream"
},
{
"name": "xpathForRecordId",
"env" : "xpathForRecordId"
}
],
"arcs":[
{
"to":"MD_BUILDER"
}
]
},
{
"name":"PREPARE_INCREMENTAL",
"type":"findDateRangeForIncrementalHarvesting",
"input":[
{
"name":"dsId",
"ref":"dsId"
},
{
"name":"apiId",
"ref":"apiId"
},
{
"name":"from",
"ref":"overrideFromDate"
},
{
"name":"until",
"ref":"overrideUntilDate"
}
],
"output":[
{
"name":"from",
"env":"fromDate"
},
{
"name":"until",
"env":"untilDate"
}
],
"arcs":[
{
"to":"COLLECT_INCREMENTAL"
}
]
},
{
"name":"COLLECT_INCREMENTAL",
"type":"dateRangeCollect",
"input":[
{
"name":"dsId",
"ref":"dsId"
},
{
"name":"apiId",
"ref":"apiId"
},
{
"name":"fromDate",
"env":"fromDate"
},
{
"name":"untilDate",
"env":"untilDate"
}
],
"output":[
{
"name":"outputStream",
"env":"collectStream"
},
{
"name": "xpathForRecordId",
"env" : "xpathForRecordId"
}
],
"arcs":[
{
"to":"MD_BUILDER"
}
]
},
{
"name":"MD_BUILDER",
"type":"openaireMdBuilder",
"input":[
{
"name":"dsId",
"ref":"dsId"
},
{
"name":"dsPrefix",
"ref":"dsPrefix"
},
{
"name":"dsName",
"ref":"dsName"
},
{
"name":"apiId",
"ref":"apiId"
},
{
"name": "xpathForRecordId",
"env" : "xpathForRecordId"
},
{
"name":"inputStream",
"env":"collectStream"
},
{
"name":"inferred",
"value":"false"
},
{
"name":"deletedbyinference",
"value":"false"
},
{
"name":"inferenceprovenance",
"value":""
},
{
"name":"trust",
"value":"0.9"
},
{
"name":"provenanceactionclassname",
"value":"sysimport:crosswalk:repository"
},
{
"name":"provenanceactionclassid",
"value":"sysimport:crosswalk:repository"
}
],
"output":[
{
"name":"outputStream",
"env":"mdBuilderStream"
}
],
"arcs":[
{
"to":"STORE"
}
]
},
{
"name":"STORE",
"type":"feedMdStore",
"input":[
{
"name":"mdId",
"ref":"mdStoreId"
},
{
"name":"inputStream",
"env":"mdBuilderStream"
},
{
"name":"storingType",
"ref":"mode"
}
],
"output":[
{
"name":"total",
"env": "total"
}
],
"arcs":[
{
"to":"UPDATE_INFO"
}
]
},
{
"name":"UPDATE_INFO",
"type":"updateApiExtraFields",
"input":[
{
"name":"dsId",
"ref":"dsId"
},
{
"name":"apiId",
"ref":"apiId"
},
{
"name":"infoType",
"value":"Collect"
},
{
"name":"mdId",
"ref":"mdStoreId"
},
{
"name":"total",
"env":"total"
}
]
}
]
}