@@ -6,7 +6,7 @@ import xml2js from "xml2js";
6
6
import { getWebserviceByName } from "../constants/globals" ;
7
7
import { app } from "../app" ;
8
8
import { CATEGORY_DATATEST , CATEGORY_SERVICE } from "../constants/constants" ;
9
- import { Validation , XMLBuilders } from "divaservices-utils" ;
9
+ import { Validation , XMLBuilders , DivaServices } from "divaservices-utils" ;
10
10
import { sendWorkflowSteps } from "../api/requests" ;
11
11
import { getOrderedElements } from "../elements/orderElement" ;
12
12
@@ -29,7 +29,7 @@ export const saveWorkflow = async (jsonGraph, installation = false) => {
29
29
// .filter(({ category }) => category != CATEGORY_DATATEST)
30
30
// .forEach((box, i) => {
31
31
const { type, boxId } = box ;
32
- const Name = type . replace ( / \s / g , "" ) ;
32
+ const Name = DivaServices . buildNameForRequest ( type ) ;
33
33
const No = i ;
34
34
const Inputs = { Parameter : [ ] , Data : [ ] } ;
35
35
@@ -120,7 +120,10 @@ export const saveWorkflow = async (jsonGraph, installation = false) => {
120
120
targetWebservice . Inputs . Data . push ( p ) ;
121
121
122
122
_targetWebservice . inputs . data . push ( {
123
- [ link . target . portName ] : `$${ name } /$${ link . source . portName } `
123
+ [ link . target . portName ] : DivaServices . buildInputReferenceName (
124
+ name ,
125
+ link . source . portName
126
+ )
124
127
} ) ;
125
128
} else {
126
129
const sourceDataBox = app . currentDataElements . find (
@@ -133,7 +136,12 @@ export const saveWorkflow = async (jsonGraph, installation = false) => {
133
136
const file = sourceDataBox . data [ 0 ] ; // suppose one file
134
137
allFiles . push ( file ) ;
135
138
const dataName =
136
- targetWebservice . Name + "_" + link . target . portName + "_" + i ++ ;
139
+ DivaServices . buildInputNameForService (
140
+ targetWebservice . Name ,
141
+ link . target . portName
142
+ ) +
143
+ "_" +
144
+ i ++ ;
137
145
const fileData = {
138
146
[ dataName ] : file . identifier
139
147
} ;
0 commit comments