diff --git a/README.md b/README.md index 2317c3e314..7b73c0560b 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ Example: `1` `` -To insert/update this document with uri '/employee1.xml' into the database 'data-hub-in-a-box-STAGING' (with host 'localhost' and port '8010'), given a user 'admin' with password 'admin' and rest-writer role AND to be able to run the flow 'IngestFlow' of the 'Customer' entity, run the following: +To insert/update this document with uri '/employee1.xml' into the database 'data-hub-STAGING' (with host 'localhost' and port '8010'), given a user 'admin' with password 'admin' and rest-writer role AND to be able to run the flow 'IngestFlow' of the 'Customer' entity, run the following: `curl --anyauth --user admin:admin -X PUT -T ./documents/employee1.xml -H "Content-type:application/xml" 'http://localhost:8010/LATEST/documents?uri=/employee1.xml&transform=run-flow&trans:entity-name=Customer&trans:flow-name=IngestFlow'` @@ -75,7 +75,7 @@ If it is JSON ('application/json'), the content will be: Else if it is XML ('application/xml'), it will be: `` -`` +`` `` `` `` diff --git a/marklogic-data-hub/src/main/resources/ml-modules/transforms/run-flow.xqy b/marklogic-data-hub/src/main/resources/ml-modules/transforms/run-flow.xqy index b621a6e895..17bac8a257 100644 --- a/marklogic-data-hub/src/main/resources/ml-modules/transforms/run-flow.xqy +++ b/marklogic-data-hub/src/main/resources/ml-modules/transforms/run-flow.xqy @@ -2,7 +2,7 @@ xquery version "1.0-ml"; module namespace runFlow = "http://marklogic.com/rest-api/transform/run-flow"; -import module namespace flow = "http://marklogic.com/hub-in-a-box/flow-lib" +import module namespace flow = "http://marklogic.com/data-hub/flow-lib" at "/com.marklogic.hub/lib/flow-lib.xqy"; declare function runFlow:transform( @@ -13,9 +13,9 @@ declare function runFlow:transform( { let $entityName := map:get($params, 'entity-name') let $flowName := map:get($params, 'flow-name') - + let $flow := flow:get-flow($entityName,$flowName,()) - + let $uri := map:get($context, 'uri') let $transformedContent := flow:run-plugins($flow, $uri, $content, $params)