Skip to content

Commit 3ed35b3

Browse files
committed
fixed #523
1 parent b508db2 commit 3ed35b3

File tree

3 files changed

+18
-5
lines changed

3 files changed

+18
-5
lines changed

marklogic-data-hub/src/main/resources/ml-modules/root/com.marklogic.hub/mlcp-flow-transform.xqy

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,12 @@ declare function mlcpFlow:transform(
4444
map:entry($parts[1], $parts[2])
4545
))
4646

47+
let $job-id := (map:get($params, "job-id"), sem:uuid-string())[1]
48+
let $entity-name := map:get($params, 'entity-name') ! xdmp:url-decode(.)
49+
let $flow-name := map:get($params, 'flow-name') ! xdmp:url-decode(.)
4750
let $flow := flow:get-flow(
48-
map:get($params, 'entity-name'),
49-
map:get($params, 'flow-name'),
51+
$entity-name,
52+
$flow-name,
5053
$consts:INPUT_FLOW
5154
)
5255

@@ -64,7 +67,7 @@ declare function mlcpFlow:transform(
6467

6568
(: this can throw, but we want MLCP to know about problems, so let it :)
6669
let $envelope := mlcpFlow:run-flow(
67-
map:get($params, "job-id"), $flow, $uri, map:get($content, "value"), $options
70+
$job-id, $flow, $uri, map:get($content, "value"), $options
6871
)
6972
let $_ := map:put($content, "value", $envelope)
7073
return

ml-data-hub-plugin/src/main/groovy/com/marklogic/gradle/task/HubTask.groovy

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,41 +6,51 @@ import com.marklogic.appdeployer.command.CommandContext
66
import com.marklogic.client.DatabaseClient
77
import com.marklogic.hub.*
88
import org.gradle.api.DefaultTask
9+
import org.gradle.api.tasks.Internal
910

1011
abstract class HubTask extends DefaultTask {
1112

13+
@Internal
1214
HubConfig getHubConfig() {
1315
getProject().property("hubConfig")
1416
}
1517

18+
@Internal
1619
DataHub getDataHub() {
1720
getProject().property("dataHub")
1821
}
1922

23+
@Internal
2024
Tracing getTracing() {
2125
return new Tracing(getStagingClient())
2226
}
2327

28+
@Internal
2429
Debugging getDebugging() {
2530
return new Debugging(getStagingClient())
2631
}
2732

33+
@Internal
2834
FlowManager getFlowManager() {
2935
return new FlowManager(getHubConfig())
3036
}
3137

38+
@Internal
3239
DatabaseClient getStagingClient() {
3340
return getHubConfig().newStagingClient()
3441
}
3542

43+
@Internal
3644
DatabaseClient getFinalClient() {
3745
return getHubConfig().newFinalClient()
3846
}
3947

48+
@Internal
4049
CommandContext getCommandContext() {
4150
getProject().property("mlCommandContext")
4251
}
4352

53+
@Internal
4454
boolean isHubInstalled() {
4555
InstallInfo installInfo = getDataHub().isInstalled();
4656
return installInfo.isInstalled();

quick-start/src/main/ui/app/mlcp-ui/mlcp-ui.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ export class MlcpUiComponent implements OnChanges {
145145
field: 'output_collections',
146146
type: 'comma-list',
147147
description: 'A comma separated list of collection URIs. Loaded documents are added to these collections.',
148-
value: entityName + ',' + flowName + ',input',
148+
value: entityName.replace(new RegExp(' ', 'g'), '') + ',' + flowName.replace(new RegExp(' ', 'g'), '') + ',input',
149149
},
150150
{
151151
label: 'Output Permissions',
@@ -384,7 +384,7 @@ export class MlcpUiComponent implements OnChanges {
384384
field: 'transform_param',
385385
type: 'string',
386386
description: 'Optional extra data to pass through to a custom transformation function. Ignored if -transform_module is not specified.\nDefault: no namespace. For details, see Transforming Content During Ingestion.',
387-
value: `entity-name=${entityName},flow-name=${flowName}`,
387+
value: `entity-name=${encodeURIComponent(entityName)},flow-name=${encodeURIComponent(flowName)}`,
388388
readOnly: true,
389389
},
390390
],

0 commit comments

Comments
 (0)