messages wip
This commit is contained in:
parent
23a09bf432
commit
938bac6517
|
@ -210,8 +210,7 @@ bpmnModeler.on('spiff.messages.requested', (event) => {
|
|||
{ message_ref: 'table_seated', formal_expression: 'franchise_id' },
|
||||
{ message_ref: 'order_ready', formal_expression: 'franchise_id' },
|
||||
{
|
||||
message_ref: 'franchise_report',
|
||||
formal_expression: "franchise['id']",
|
||||
message_ref: 'end_of_day_receipts', formal_expression: "franchise['id']",
|
||||
},
|
||||
],
|
||||
},
|
||||
|
|
|
@ -24,16 +24,31 @@ export function MessageSelect(props) {
|
|||
const eventBus = useService('eventBus');
|
||||
|
||||
const getValue = () => {
|
||||
const messageRefElement = getMessageRefElement(shapeElement);
|
||||
console.log("The business Object event def is ", shapeElement.businessObject.eventDefinitions[0]);
|
||||
return shapeElement.businessObject.messageRef;
|
||||
/*
|
||||
const messageRefElement = getMessageRefElement(shapeElement);
|
||||
if (messageRefElement) {
|
||||
return messageRefElement.id;
|
||||
}
|
||||
return '';
|
||||
*/
|
||||
};
|
||||
|
||||
const setValue = (value) => {
|
||||
/* Need to add the selected message as the messageRef on the current message task */
|
||||
const { businessObject } = shapeElement;
|
||||
commandStack.execute('element.updateModdleProperties', {
|
||||
element: shapeElement,
|
||||
moddleElement: businessObject,
|
||||
properties: {
|
||||
messageRef: value,
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
/* Need to add the selected message as the messageRef on the current message task */
|
||||
/*
|
||||
const messages = findMessageModdleElements(shapeElement.businessObject);
|
||||
for (const message of messages) {
|
||||
if (message.id === value) {
|
||||
|
@ -69,6 +84,7 @@ export function MessageSelect(props) {
|
|||
}
|
||||
}
|
||||
}
|
||||
` */
|
||||
};
|
||||
|
||||
if (spiffExtensionOptions.messages === null || spiffExtensionOptions.messages === undefined) {
|
||||
|
|
|
@ -20,17 +20,7 @@ export default function MessagesPropertiesProvider(
|
|||
) {
|
||||
this.getGroups = function getGroupsCallback(element) {
|
||||
return function pushGroup(groups) {
|
||||
if (is(element, 'bpmn:Collaboration')) {
|
||||
groups.push(
|
||||
...createCollaborationGroup(
|
||||
element,
|
||||
translate,
|
||||
moddle,
|
||||
commandStack,
|
||||
elementRegistry
|
||||
)
|
||||
);
|
||||
} else if (isMessageElement(element)) {
|
||||
if (isMessageElement(element)) {
|
||||
const messageIndex = findEntry(groups, 'message');
|
||||
if (messageIndex) {
|
||||
groups.splice(messageIndex, 1);
|
||||
|
@ -70,8 +60,7 @@ MessagesPropertiesProvider.$inject = [
|
|||
];
|
||||
|
||||
/**
|
||||
* Adds a group to the properties panel for the script task that allows you
|
||||
* to set the script.
|
||||
* Adds a group to the properties panelfor correlations.
|
||||
* @param element
|
||||
* @param translate
|
||||
* @returns The components to add to the properties panel. */
|
||||
|
|
Loading…
Reference in New Issue