Skip to content

Instantly share code, notes, and snippets.

View ljmotta's full-sized avatar

Luiz João Motta ljmotta

  • Senior Software Engineer - IBM
  • São Paulo, SP - Brazil
View GitHub Profile
@ljmotta
ljmotta / sample2.dmn
Last active March 10, 2021 20:34
sample.dmn
<?xml version="1.0" encoding="UTF-8"?>
<dmn:definitions xmlns:dmn="http://www.omg.org/spec/DMN/20180521/MODEL/" id="_C6CBECEB-2BBC-4E14-80B0-17F576B2CF92" name="loan_pre_qualification" expressionLanguage="http://www.omg.org/spec/DMN/20180521/FEEL/" typeLanguage="http://www.omg.org/spec/DMN/20180521/FEEL/" namespace="https://kiegroup.org/dmn/_857FE424-BEDA-4772-AB8E-2F4CDDB864AB"><dmn:extensionElements/><dmn:itemDefinition id="_D40B0106-62E8-4AC0-A39A-C6C9506194A9" name="Requested_Product" isCollection="false"><dmn:itemComponent id="_68b4a96c-198a-4575-b29a-a2c8b0539a2c" name="Type" isCollection="false"><dmn:typeRef>Product_Type</dmn:typeRef></dmn:itemComponent><dmn:itemComponent id="_ab1647c2-cb63-4808-8d90-36d41591a40c" name="Rate" isCollection="false"><dmn:typeRef>number</dmn:typeRef></dmn:itemComponent><dmn:itemComponent id="_152917bb-6095-4057-8613-5b08b77db235" name="Term" isCollection="false"><dmn:typeRef>number</dmn:typeRef></dmn:itemComponent><dmn:itemComponent id="_e2f0e8cd-8f5a-43d4-b263-aaa5b9ae442
export function useEmbeddedRef() {
const [embedded, setEmbedded] = useState<EmbeddedRef | undefined>(null);
const embeddedRef = useCallback((node: EmbeddedRef) => {
if (node !== null) {
setEmbedded(node);
}
}, []);
return { embedded, embeddedRef };
}
@ljmotta
ljmotta / sample.dmn
Last active March 10, 2021 20:28
sample.dmn
<?xml version="1.0" encoding="UTF-8"?>
<dmn:definitions xmlns:dmn="http://www.omg.org/spec/DMN/20180521/MODEL/" id="_C6CBECEB-2BBC-4E14-80B0-17F576B2CF92" name="loan_pre_qualification" expressionLanguage="http://www.omg.org/spec/DMN/20180521/FEEL/" typeLanguage="http://www.omg.org/spec/DMN/20180521/FEEL/" namespace="https://kiegroup.org/dmn/_857FE424-BEDA-4772-AB8E-2F4CDDB864AB"><dmn:extensionElements/><dmn:itemDefinition id="_D40B0106-62E8-4AC0-A39A-C6C9506194A9" name="Requested_Product" isCollection="false"><dmn:itemComponent id="_68b4a96c-198a-4575-b29a-a2c8b0539a2c" name="Type" isCollection="false"><dmn:typeRef>Product_Type</dmn:typeRef></dmn:itemComponent><dmn:itemComponent id="_ab1647c2-cb63-4808-8d90-36d41591a40c" name="Rate" isCollection="false"><dmn:typeRef>number</dmn:typeRef></dmn:itemComponent><dmn:itemComponent id="_152917bb-6095-4057-8613-5b08b77db235" name="Term" isCollection="false"><dmn:typeRef>number</dmn:typeRef></dmn:itemComponent><dmn:itemComponent id="_e2f0e8cd-8f5a-43d4-b263-aaa5b9ae442
@ljmotta
ljmotta / new-file.bpmn
Last active February 9, 2021 14:36
new-file.bpmn
<bpmn2:definitions xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:bpsim="http://www.bpsim.org/schemas/1.0" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:drools="http://www.jboss.org/drools" id="_EV7oUE0SEDmbCcb1ViFUeg" exporter="jBPM Process Modeler" exporterVersion="2.0" targetNamespace="http://www.omg.org/bpmn20">
<bpmn2:process id="new-file" drools:packageName="com.example" drools:version="1.0" drools:adHoc="false" name="new-file" isExecutable="true" processType="Public">
<bpmn2:sequenceFlow id="_C6D9921A-DB95-43CC-90F7-E5E5DB833435" sourceRef="_EEB34335-D145-425A-85B9-88380B3120B8" targetRef="_10BBAD83-5815-483B-83FC-DA4E637EDFE6">
<bpmn2:extensionElements>
<drools:metaData name="isAutoConnection.source">
<drools:metaValue><![CDATA[true]]></drools:metaValue>
</drools:metaData>
<drools:metaData name="isAutoConnection.target">
@ljmotta
ljmotta / new-file.bpmn
Last active January 20, 2021 20:56
new-file.bpmn
<bpmn2:definitions xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:bpsim="http://www.bpsim.org/schemas/1.0" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:drools="http://www.jboss.org/drools" id="_723eQD2PEDm8FLK2Edk7rA" exporter="jBPM Process Modeler" exporterVersion="2.0" targetNamespace="http://www.omg.org/bpmn20">
<bpmn2:process id="new-file" drools:packageName="com.example" drools:version="1.0" drools:adHoc="false" name="new-file" isExecutable="true" processType="Public">
<bpmn2:sequenceFlow id="_1DE60E61-21D8-4D9F-937C-5C9E68266871" sourceRef="_1E5E5BFA-D1B8-4B27-A587-6039DA46B202" targetRef="_2BDF1EBE-2979-4DC0-9A9C-ABD9FA5743D1">
<bpmn2:extensionElements>
<drools:metaData name="isAutoConnection.source">
<drools:metaValue><![CDATA[true]]></drools:metaValue>
</drools:metaData>
<drools:metaData name="isAutoConnection.target">
@ljmotta
ljmotta / new-file.dmn
Last active January 20, 2021 20:25
new-file.dmn
<dmn:definitions xmlns:dmn="http://www.omg.org/spec/DMN/20180521/MODEL/" xmlns="https://kiegroup.org/dmn/_200ACB8D-151F-46D7-AAA1-7FB3FCDF745A" xmlns:feel="http://www.omg.org/spec/DMN/20180521/FEEL/" xmlns:kie="http://www.drools.org/kie/dmn/1.2" xmlns:dmndi="http://www.omg.org/spec/DMN/20180521/DMNDI/" xmlns:di="http://www.omg.org/spec/DMN/20180521/DI/" xmlns:dc="http://www.omg.org/spec/DMN/20180521/DC/" id="_E8222C11-C766-4EFA-B0BC-1B5643797D13" name="new-file" typeLanguage="http://www.omg.org/spec/DMN/20180521/FEEL/" namespace="https://kiegroup.org/dmn/_200ACB8D-151F-46D7-AAA1-7FB3FCDF745A">
<dmn:extensionElements/>
<dmn:inputData id="_66B3C1C2-CB29-4652-AFA6-75E959193E3A" name="InputData-1">
<dmn:extensionElements/>
<dmn:variable id="_BF32FDE0-6967-491F-9B53-74CC9E57C5E3" name="InputData-1"/>
</dmn:inputData>
<dmn:decision id="_4728AB52-B966-450A-831C-2EE54C9DF04C" name="Decision-1">
<dmn:extensionElements/>
<dmn:variable id="_B7A518D8-1936-403E-B823-1AF70BCCDA5C" name="Decision-1"/
@ljmotta
ljmotta / sample.dmn
Created January 20, 2021 17:03
sample.dmn
<dmn:definitions xmlns:dmn="http://www.omg.org/spec/DMN/20180521/MODEL/" xmlns="https://kiegroup.org/dmn/_857FE424-BEDA-4772-AB8E-2F4CDDB864AB" xmlns:di="http://www.omg.org/spec/DMN/20180521/DI/" xmlns:kie="http://www.drools.org/kie/dmn/1.2" xmlns:dmndi="http://www.omg.org/spec/DMN/20180521/DMNDI/" xmlns:dc="http://www.omg.org/spec/DMN/20180521/DC/" xmlns:feel="http://www.omg.org/spec/DMN/20180521/FEEL/" id="_C6CBECEB-2BBC-4E14-80B0-17F576B2CF92" name="loan_pre_qualification" expressionLanguage="http://www.omg.org/spec/DMN/20180521/FEEL/" typeLanguage="http://www.omg.org/spec/DMN/20180521/FEEL/" namespace="https://kiegroup.org/dmn/_857FE424-BEDA-4772-AB8E-2F4CDDB864AB">
<dmn:extensionElements/>
<dmn:itemDefinition id="_D40B0106-62E8-4AC0-A39A-C6C9506194A9" name="Requested_Product" isCollection="false">
<dmn:itemComponent id="_68b4a96c-198a-4575-b29a-a2c8b0539a2c" name="Type" isCollection="false">
<dmn:typeRef>Product_Type</dmn:typeRef>
</dmn:itemComponent>
<dmn:itemComponent id="_ab1647c
@ljmotta
ljmotta / embed.html
Last active January 12, 2021 20:55
Embed model with GitHubGist
<iframe width="100%" height="100%" srcdoc="<!DOCTYPE html> <html lang=&quot;en&quot;> <head> <script
src=&quot;https://kiegroup.github.io/kogito-online/standalone/bpmn/index.js&quot;></script> <title></title> <style>
html, body, iframe { margin: 0; border: 0; padding: 0; height: 100%;
width: 100%; } </style> </head> <body> <script>
fetch(&quot;https://gist.githubusercontent.com/ljmotta/9323333a2e5c64a4c78bf96c8487bd9c/raw/mygist.bpmn&quot;)
.then(response => response.text()) .then(content => BpmnEditor.open({container: document.body, readOnly: true,
initialContent: content, origin: &quot;*&quot; })) </script> </body> </html>"></iframe>
@ljmotta
ljmotta / mygist.bpmn
Last active January 4, 2021 21:31
mygist.bpmn
<?xml version="1.0" encoding="UTF-8"?>
<bpmn2:definitions xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" id="_IydvcTECEDmGo6lKsN5-Yg" exporter="jBPM Process Modeler" exporterVersion="2.0" targetNamespace="http://www.omg.org/bpmn20"><bpmn2:process id="new-file" drools:packageName="com.example" xmlns:drools="http://www.jboss.org/drools" drools:version="1.0" drools:adHoc="false" name="new-file" isExecutable="true" processType="Public"><bpmn2:sequenceFlow id="_E2C47401-652E-4C2E-AA50-96D29ED1F68B" sourceRef="_C560BECD-766E-4AC8-8A31-526C1F55F3CC" targetRef="_CE3D2293-A482-402B-96BD-225FEEF1C0DA"><bpmn2:extensionElements><drools:metaData name="isAutoConnection.source"><drools:metaValue>true</drools:metaValue></drools:metaData><drools:metaData name="isAutoConnection.target"><drools:metaValue>true</drools:metaValue></drools:metaData></bpmn2:extensionElements></bpmn2:sequenceFlow><bpmn2:endEvent id="_CE3D2293-A482-402B-96BD-225FEEF1C0DA"><bpmn2:incoming>_E2C47401-652E-4C2E-AA50-96D29ED1F68B</bpmn2:incoming
@ljmotta
ljmotta / myfile.dmn
Last active January 21, 2021 13:34
myfile.dmn
<dmn:definitions xmlns:dmn="http://www.omg.org/spec/DMN/20180521/MODEL/" xmlns="https://kiegroup.org/dmn/_CA7BA1C1-0994-4EF0-9E7F-B624B313F21B" xmlns:feel="http://www.omg.org/spec/DMN/20180521/FEEL/" xmlns:kie="http://www.drools.org/kie/dmn/1.2" xmlns:dmndi="http://www.omg.org/spec/DMN/20180521/DMNDI/" xmlns:di="http://www.omg.org/spec/DMN/20180521/DI/" xmlns:dc="http://www.omg.org/spec/DMN/20180521/DC/" id="_73F9344C-4AE5-463C-9C3A-783335FABA2C" name="new-file" typeLanguage="http://www.omg.org/spec/DMN/20180521/FEEL/" namespace="https://kiegroup.org/dmn/_CA7BA1C1-0994-4EF0-9E7F-B624B313F21B">
<dmn:extensionElements/>
<dmn:inputData id="_AE7197E2-E23E-49D5-BD48-6A94D5E16824" name="InputData-1">
<dmn:extensionElements/>
<dmn:variable id="_EFBE4266-6A29-4362-92D6-123F2BF1C601" name="InputData-1"/>
</dmn:inputData>
<dmn:knowledgeSource id="_99011382-61FE-413D-A39A-25AEB5F346D3" name="KnowledgeSource-1" locationURI="">
<dmn:extensionElements/>
<dmn:authorityRequirement id="_CCE47BD9-9B8A-4