initial work to get service tasks from backend w/ burnettk
This commit is contained in:
parent
3bcc867957
commit
4f27f5d103
|
@ -201,6 +201,29 @@ export default function ReactDiagramEditor({
|
|||
diagramModeler.on('element.click', (element: any) => {
|
||||
handleElementClick(element);
|
||||
});
|
||||
|
||||
diagramModeler.on('spiff.service_tasks.requested', (event: any) => {
|
||||
HttpService.makeCallToBackend({
|
||||
path: `/service_tasks`,
|
||||
successCallback: makeApiHandler(event),
|
||||
});
|
||||
});
|
||||
|
||||
function makeApiHandler(event: any) {
|
||||
return function (results: any) {
|
||||
console.log('results', results);
|
||||
event.eventBus.fire('spiff.service_tasks.returned', {
|
||||
serviceTaskOperators: results,
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
// function handleServiceTask(results: any) {
|
||||
// console.log('results', results);
|
||||
// event.eventBus.fire('spiff.service_task.data.returned', {
|
||||
// wePass: 'hello',
|
||||
// });
|
||||
// }
|
||||
}, [diagramModelerState, diagramType, onLaunchScriptEditor, onElementClick]);
|
||||
|
||||
useEffect(() => {
|
||||
|
|
Loading…
Reference in New Issue