Hallo zusammen,
das Problem hat mir gestern eine Menge Kopfschmerzen bereitet.
Die Variable row.rownumber fängt nicht immer bei 1 an. Wenn ein Spreadsheet mehrfach verarbeitet wird, zählt die rownumber bei der zweiten Verarbeitung dort weiter, wo die erste Verarbeitung aufgehört hat.
Unten findet ihr Beispielflow. Der erste HTMLWriter schreibt die Zahlen 1-10, der zweite macht dann bei 11 weiter und zählt bis 20.
Das Problem tritt nicht auf, wenn man die Caching-Option im Inputspreadsheet aktiviert. Es hat also etwas mit der wiederholten Neuberechnung der Daten zu tun.
Im ersten Schritt kann ein beliebiger Datastore gewählt werden. Der Step wird nur benutzt, um ein Spreadsheet mit 10 Zeilen zu erhalten.
JSON von Beispielflow
{
„description“ : „“,
„name“ : „rowNumber fängt nicht bei 1 an“,
„shareStatus“ : „PRIVATE“,
„redirectUrlPatternError“ : „“,
„redirectUrlPatternSuccess“ : „“,
„step“ : [ {
„executorflowuniqename“ : „“,
„description“ : „“,
„name“ : „SearchDatastore“,
„condition“ : „“,
„rank“ : 0,
„active“ : true,
„permaId“ : 21,
„stepprovider“ : „SearchMasterDatastore@com.asolida.delivor.core.apiservices“,
„stepproviderversion“ : „1.0“,
„stepProperty“ : [ {
„value“ : „Produktmodelle“,
„key“ : „datastoreName“,
„type“ : „IN“,
„datatype“ : „DATASTORE“,
„contextkey“ : null
}, {
„value“ : „“,
„key“ : „dateFrom“,
„type“ : „IN“,
„datatype“ : „DATETIME“,
„contextkey“ : null
}, {
„value“ : „“,
„key“ : „dateTo“,
„type“ : „IN“,
„datatype“ : „DATETIME“,
„contextkey“ : null
}, {
„value“ : „“,
„key“ : „filterDate“,
„type“ : „IN“,
„datatype“ : „STRING“,
„contextkey“ : null
}, {
„value“ : „“,
„key“ : „filterFolder“,
„type“ : „IN“,
„datatype“ : „STRINGLIST“,
„contextkey“ : null
}, {
„value“ : „“,
„key“ : „filterIdentifier“,
„type“ : „IN“,
„datatype“ : „STRING“,
„contextkey“ : null
}, {
„value“ : „“,
„key“ : „filterIdentifier2“,
„type“ : „IN“,
„datatype“ : „STRING“,
„contextkey“ : null
}, {
„value“ : „“,
„key“ : „filterIdentifier3“,
„type“ : „IN“,
„datatype“ : „STRING“,
„contextkey“ : null
}, {
„value“ : „all“,
„key“ : „filterIncludeVariants“,
„type“ : „IN“,
„datatype“ : „STRING“,
„contextkey“ : null
}, {
„value“ : „“,
„key“ : „filterMatchingStatus“,
„type“ : „IN“,
„datatype“ : „STRING“,
„contextkey“ : null
}, {
„value“ : „“,
„key“ : „filterOffers“,
„type“ : „IN“,
„datatype“ : „STRING“,
„contextkey“ : null
}, {
„value“ : „“,
„key“ : „filterShowParentsWithVariants“,
„type“ : „IN“,
„datatype“ : „STRING“,
„contextkey“ : null
}, {
„value“ : „“,
„key“ : „flowRun“,
„type“ : „IN“,
„datatype“ : „STRING“,
„contextkey“ : null
}, {
„value“ : „EQUALS“,
„key“ : „flowRunCompare“,
„type“ : „IN“,
„datatype“ : „STRING“,
„contextkey“ : null
}, {
„value“ : „10“,
„key“ : „limit“,
„type“ : „IN“,
„datatype“ : „STRING“,
„contextkey“ : null
}, {
„value“ : „“,
„key“ : „processingStatus“,
„type“ : „IN“,
„datatype“ : „STRING“,
„contextkey“ : null
}, {
„value“ : „false“,
„key“ : „showOffers“,
„type“ : „IN“,
„datatype“ : „STRING“,
„contextkey“ : null
}, {
„value“ : „“,
„key“ : „sortByField“,
„type“ : „IN“,
„datatype“ : „STRING“,
„contextkey“ : null
}, {
„value“ : „ASC“,
„key“ : „sortDir“,
„type“ : „IN“,
„datatype“ : „STRING“,
„contextkey“ : null
} ],
„steptype“ : „DEFAULT“,
„uiColor“ : null
}, {
„executorflowuniqename“ : „“,
„description“ : „“,
„name“ : „Mapper“,
„condition“ : „“,
„rank“ : 10,
„active“ : true,
„permaId“ : 22,
„stepprovider“ : „SpreadsheetMapper@com.synesty.stepesty.plugin.transformycore“,
„stepproviderversion“ : „1.0“,
„stepProperty“ : [ {
„value“ : „false“,
„key“ : „cacheMode“,
„type“ : „IN“,
„datatype“ : „STRING“,
„contextkey“ : null
}, {
„value“ : „“,
„key“ : „disableWarnings“,
„type“ : „IN“,
„datatype“ : „STRINGLIST“,
„contextkey“ : null
}, {
„value“ : „{„groupByColumn“:“",„groupMode“:"",„sortByCol“:"",„sortDir“:„ASC“,„colDefs“:[{„colDef“:{„name“:„rownumber“,„sourceColName“:"",„value“:"${_rowNumber!}",„commentField“:"",„colFunctions“:[]}}]}",
„key“ : „mappingdefinition“,
„type“ : „IN“,
„datatype“ : „STRING“,
„contextkey“ : null
}, {
„value“ : „“,
„key“ : „mappingMode“,
„type“ : „IN“,
„datatype“ : „STRING“,
„contextkey“ : null
}, {
„value“ : „“,
„key“ : „source“,
„type“ : „IN“,
„datatype“ : „SPREADSHEET“,
„contextkey“ : „spreadsheet@SearchMasterDatastore_21“
}, {
„value“ : „“,
„key“ : „targetSchemaName“,
„type“ : „IN“,
„datatype“ : „STRING“,
„contextkey“ : null
} ],
„steptype“ : „DEFAULT“,
„uiColor“ : null
}, {
„executorflowuniqename“ : „“,
„description“ : „“,
„name“ : „TextHTMLWriter“,
„condition“ : „“,
„rank“ : 20,
„active“ : true,
„permaId“ : 18,
„stepprovider“ : „TextHTMLWriter@com.synesty.delivor.plugin.steps.scripting“,
„stepproviderversion“ : „1.0“,
„stepProperty“ : [ {
„value“ : „<#list spreadsheet@SpreadsheetMapper_22.getRows() as row>${row.rowNumber}\r\n</#list>“,
„key“ : „template“,
„type“ : „IN“,
„datatype“ : „STRING“,
„contextkey“ : null
} ],
„steptype“ : „DEFAULT“,
„uiColor“ : null
}, {
„executorflowuniqename“ : „“,
„description“ : „“,
„name“ : „TextHTMLWriter“,
„condition“ : „“,
„rank“ : 30,
„active“ : true,
„permaId“ : 23,
„stepprovider“ : „TextHTMLWriter@com.synesty.delivor.plugin.steps.scripting“,
„stepproviderversion“ : „1.0“,
„stepProperty“ : [ {
„value“ : „<#list spreadsheet@SpreadsheetMapper_22.getRows() as row>${row.rowNumber}\r\n</#list>“,
„key“ : „template“,
„type“ : „IN“,
„datatype“ : „STRING“,
„contextkey“ : null
} ],
„steptype“ : „DEFAULT“,
„uiColor“ : null
} ],
„maxsteppermaid“ : 23,
„defaultResponseFormat“ : „“,
„jobProperty“ : [ ],
„stepGroups“ : [ {
„position“ : 0,
„description“ : „Description of first Stepgroup“,
„prefix“ : „A“,
„name“ : „Datenaufbereitung für Timo“,
„type“ : „GROUP“,
„configuration“ : {
„active“ : true,
„color“ : null
},
„sgIdentifier“ : „1“,
„permaIds“ : [ 21, 22, 18, 23 ]
} ],
„stepGroupsLinks“ : [ ],
„reponseMode“ : „“
}
P.S.: Plant ihr eigentlich irgendwann, eine Upload für JSON-Dateien hier im Forum zu ermöglichen?
Gruß
Gustav
Flowbeispiel.json (6,1 KB)