Skip to content

Commit 0eb4e75

Browse files
fix(hot): update variable overridden by controls (#61)
* fix: generate FIRST controls and then provide server vars to view * fix: generate FIRST controls and then provide server vars to view (#60) * fix: disable temporary condition visibility change (#60) * feat: fix overriding of variable from server * chore: bump version * chore: rm unused import --------- Co-authored-by: Volker Buzek <volker.buzek@camunda.com>
1 parent b151a4c commit 0eb4e75

3 files changed

Lines changed: 6 additions & 5 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@camunda8/sap-btp-plugin",
3-
"version": "1.0.3",
3+
"version": "1.0.4",
44
"description": "mono repo for the Camunda BTP plugin, part of the SAP Integration",
55
"repository": "https://github.com/camunda/sap-btp-plugin",
66
"license": "Camunda License 1.0",

user-task-fiori/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@camunda8/user-task-fiori",
3-
"version": "1.0.0",
3+
"version": "1.0.1",
44
"description": "rendering Camunda Forms into the Fiori Design System",
55
"license": "Camunda License 1.0",
66
"repository": "https://github.com/camunda/sap-btp-plugin",

user-task-fiori/src/BPMNForm.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import Core from "sap/ui/core/Core"
1010
import type { MetadataOptions } from "sap/ui/core/Element"
1111
import EventBus from "sap/ui/core/EventBus"
1212
import { ValueState } from "sap/ui/core/library"
13-
import JSONModel from "sap/ui/model/json/JSONModel"
1413
import BPMNFormRenderer from "./BPMNFormRenderer"
1514
import { BPMNformData, Component, ControlType, GeneratedControl, userFormData } from "./BPMNformData"
1615
import CheckBox from "sap/m/CheckBox"
@@ -37,7 +36,6 @@ import {
3736
addTextArea
3837
} from "./creations/index"
3938
import HBox from "sap/m/HBox"
40-
import Title from "sap/m/Title"
4139
import Icon from "sap/ui/core/Icon"
4240
import DeepJSONModel from "./model/DeepJSONModel"
4341

@@ -318,11 +316,13 @@ export default class BPMNForm extends Control {
318316
processForm(data: WebSocketData): void {
319317
const formData = JSON.parse(data.formData) as BPMNformData
320318

321-
// populate local model with variables from server for use in UI conditions
319+
320+
// populate local model with variables from server for use in UI conditions later
322321
this._updateFormVariables(data.variables)
323322

324323
// create controls and add to stage
325324
this._generateControls(formData.components)
325+
326326
}
327327

328328
getLocalModel(): DeepJSONModel {
@@ -336,6 +336,7 @@ export default class BPMNForm extends Control {
336336

337337
_updateFormVariables(variables: { [index: string]: string }): void {
338338
for (const key in variables) {
339+
this.getLocalModel().setProperty(`/BPMNform/${key}`, variables[key])
339340
this.getLocalModel().setProperty(`/BPMNform/variables/${key}`, variables[key])
340341
}
341342
}

0 commit comments

Comments
 (0)