@xeplr/ui-jobs 1.6.2 → 1.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/lib/jobChainModel.js +5 -3
package/package.json
CHANGED
package/src/lib/jobChainModel.js
CHANGED
|
@@ -246,11 +246,13 @@ export function workflowToRules(workflow) {
|
|
|
246
246
|
const arrows = Array.isArray(decide.transitions) ? decide.transitions : []
|
|
247
247
|
const rules = []
|
|
248
248
|
for (const a of arrows) {
|
|
249
|
-
|
|
249
|
+
// An arrow with no condition at all is "otherwise", however it was written.
|
|
250
|
+
const when = a.when !== undefined ? a.when : (a.condition == null ? null : undefined)
|
|
251
|
+
if (a.target === 'end_success' && !when) continue
|
|
250
252
|
const step = byKey[a.target]
|
|
251
|
-
if (!step ||
|
|
253
|
+
if (!step || when === undefined) return { editedElsewhere: true, rules: [] }
|
|
252
254
|
rules.push({
|
|
253
|
-
when: mapWhen(
|
|
255
|
+
when: mapWhen(when, fromTriggerField),
|
|
254
256
|
run: step.values.jobId,
|
|
255
257
|
inputs: mapBindings(step.values.inputs || {}, fromTriggerBindings),
|
|
256
258
|
carry: mapBindings(step.values.carry || {}, fromTriggerBindings)
|